vite-hub 0.0.4 → 0.3.1
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/README.md +265 -14
- package/dist/_internal/auth/internal/server.d.ts +1 -0
- package/dist/_internal/auth/internal/server.js +2 -0
- package/dist/_internal/auth/runtime/server.d.ts +1 -0
- package/dist/_internal/auth/runtime/server.js +2 -0
- package/dist/_internal/runtime/browser-errors.d.ts +22 -0
- package/dist/_internal/runtime/browser-errors.js +156 -0
- package/dist/_internal/runtime/internal/h3.d.ts +1 -0
- package/dist/_internal/runtime/internal/h3.js +2 -0
- package/dist/_internal/runtime/redirects.d.ts +37 -0
- package/dist/_internal/runtime/redirects.js +71 -0
- package/dist/_internal/runtime/request-policy.d.ts +43 -0
- package/dist/_internal/runtime/request-policy.js +62 -0
- package/dist/_internal/runtime/security.d.ts +27 -0
- package/dist/_internal/runtime/security.js +104 -0
- package/dist/access-F0YP5D5E.js +439 -0
- package/dist/access-policy-B_DCpZUt.js +73 -0
- package/dist/access-policy-BsB3QVe5.d.ts +109 -0
- package/dist/account-Bsu-LBOF.d.ts +195 -0
- package/dist/agent/capabilities.d.ts +1 -20
- package/dist/agent/capabilities.js +1 -7
- package/dist/agent/invocations/database.d.ts +1 -0
- package/dist/agent/invocations/database.js +2 -0
- package/dist/agent/invocations/drizzle.d.ts +1 -0
- package/dist/agent/invocations/drizzle.js +2 -0
- package/dist/agent/invocations.d.ts +1 -0
- package/dist/agent/invocations.js +2 -0
- package/dist/agent/observability.d.ts +1 -0
- package/dist/agent/observability.js +2 -0
- package/dist/agent/page.d.ts +1 -0
- package/dist/agent/page.js +2 -0
- package/dist/agent/process.d.ts +1 -0
- package/dist/agent/process.js +2 -0
- package/dist/agent/state.d.ts +1 -0
- package/dist/agent/state.js +2 -0
- package/dist/agent/ui/vue.d.ts +1 -0
- package/dist/agent/ui/vue.js +2 -0
- package/dist/agent/ui.d.ts +1 -0
- package/dist/agent/ui.js +2 -0
- package/dist/agent/vite.d.ts +1 -0
- package/dist/agent/vite.js +2 -0
- package/dist/agent-invocations.post-DIm8tJV2.js +423 -0
- package/dist/agent.d.ts +1 -7
- package/dist/agent.js +1 -31
- package/dist/agents-C94A4N9u.d.ts +29 -0
- package/dist/agents-DnHexzTJ.js +123 -0
- package/dist/agents-y5hBFHUQ.js +2 -0
- package/dist/auth/abilities.d.ts +1 -0
- package/dist/auth/abilities.js +2 -0
- package/dist/auth/database.d.ts +1 -0
- package/dist/auth/database.js +2 -0
- package/dist/auth/forward.d.ts +1 -0
- package/dist/auth/forward.js +2 -0
- package/dist/auth/mcp.d.ts +1 -0
- package/dist/auth/mcp.js +2 -0
- package/dist/auth/presets.d.ts +1 -0
- package/dist/auth/presets.js +2 -0
- package/dist/auth/schema.d.ts +1 -0
- package/dist/auth/schema.js +2 -0
- package/dist/auth-BFVHYizM.d.ts +120 -0
- package/dist/auth-operations-GcQk0O0X.js +34 -0
- package/dist/auth-types-DWpTBZvp.d.ts +90 -0
- package/dist/bin.d.ts +1 -1
- package/dist/bin.js +318 -50
- package/dist/blob/client.d.ts +1 -0
- package/dist/blob/client.js +2 -0
- package/dist/blob/media.d.ts +1 -0
- package/dist/blob/media.js +2 -0
- package/dist/blob/nuxt-image.d.ts +3 -0
- package/dist/blob/nuxt-image.js +3 -0
- package/dist/blob/vue.d.ts +1 -0
- package/dist/blob/vue.js +2 -0
- package/dist/blob-BRV6_wZa.js +26 -0
- package/dist/blob-CiUmptIp.d.ts +9 -0
- package/dist/bundle.d.ts +1 -0
- package/dist/bundle.js +2 -0
- package/dist/cache/operations.d.ts +5 -0
- package/dist/cache/operations.js +51 -0
- package/dist/cache.d.ts +28 -0
- package/dist/cache.js +219 -0
- package/dist/cli-DjoDGgT4.js +36 -0
- package/dist/cli-config--rAg6V-a.js +2 -0
- package/dist/cli-config-Bpjjfz5j.js +105 -0
- package/dist/cloudflare-env-lookup-DKXdr4P_.js +16 -0
- package/dist/cloudflare-prerender.mjs +3 -0
- package/dist/cloudflare-workers.d.ts +12 -0
- package/dist/cms/access.d.ts +1 -0
- package/dist/cms/access.js +2 -0
- package/dist/cms/vite.d.ts +1 -0
- package/dist/cms/vite.js +2 -0
- package/dist/cms.d.ts +3 -0
- package/dist/cms.js +3 -0
- package/dist/comments/anchor.d.ts +1 -0
- package/dist/comments/anchor.js +2 -0
- package/dist/comments/client.d.ts +1 -0
- package/dist/comments/client.js +2 -0
- package/dist/comments/database/postgres.d.ts +1 -0
- package/dist/comments/database/postgres.js +2 -0
- package/dist/comments/database.d.ts +1 -0
- package/dist/comments/database.js +2 -0
- package/dist/comments/realtime.d.ts +1 -0
- package/dist/comments/realtime.js +2 -0
- package/dist/comments/rpc.d.ts +1 -0
- package/dist/comments/rpc.js +2 -0
- package/dist/comments/runtime/auth.d.ts +1 -0
- package/dist/comments/runtime/auth.js +2 -0
- package/dist/comments/runtime.d.ts +1 -0
- package/dist/comments/runtime.js +2 -0
- package/dist/comments/server.d.ts +1 -0
- package/dist/comments/server.js +2 -0
- package/dist/comments/testing.d.ts +1 -0
- package/dist/comments/testing.js +2 -0
- package/dist/comments.d.ts +1 -0
- package/dist/comments.js +2 -0
- package/dist/connections/agent.d.ts +1 -0
- package/dist/connections/agent.js +2 -0
- package/dist/connections/chatgpt.d.ts +1 -0
- package/dist/connections/chatgpt.js +2 -0
- package/dist/connections/google.d.ts +1 -0
- package/dist/connections/google.js +2 -0
- package/dist/connections/operations.d.ts +1 -0
- package/dist/connections/operations.js +2 -0
- package/dist/connections/server.d.ts +1 -0
- package/dist/connections/server.js +2 -0
- package/dist/connections.d.ts +1 -0
- package/dist/connections.js +2 -0
- package/dist/console/auth-types.d.ts +2 -0
- package/dist/console/auth-types.js +1 -0
- package/dist/console/auth.d.ts +6 -0
- package/dist/console/auth.js +9 -0
- package/dist/console/runtime/auth-operations.d.ts +35 -0
- package/dist/console/runtime/auth-operations.js +2 -0
- package/dist/console/runtime/client/account-views.d.ts +17 -0
- package/dist/console/runtime/client/account-views.js +8 -0
- package/dist/console/runtime/client/account.d.ts +2 -0
- package/dist/console/runtime/client/account.js +1125 -0
- package/dist/console/runtime/client/add-primitive.ts +59 -0
- package/dist/console/runtime/client/app-identity.ts +44 -0
- package/dist/console/runtime/client/appearance.d.ts +62 -0
- package/dist/console/runtime/client/appearance.js +87 -0
- package/dist/console/runtime/client/auth-management.ts +67 -0
- package/dist/console/runtime/client/blob-media.d.ts +46 -0
- package/dist/console/runtime/client/blob-media.js +257 -0
- package/dist/console/runtime/client/command-search.ts +103 -0
- package/dist/console/runtime/client/comment-thread.d.ts +33 -0
- package/dist/console/runtime/client/comment-thread.js +62 -0
- package/dist/console/runtime/client/document-cache.ts +13 -0
- package/dist/console/runtime/client/documents.d.ts +3 -0
- package/dist/console/runtime/client/documents.js +2 -0
- package/dist/console/runtime/client/editor.d.ts +83 -0
- package/dist/console/runtime/client/editor.js +269 -0
- package/dist/console/runtime/client/env-groups.d.ts +28 -0
- package/dist/console/runtime/client/env-groups.js +39 -0
- package/dist/console/runtime/client/env-status.d.ts +35 -0
- package/dist/console/runtime/client/env-status.js +68 -0
- package/dist/console/runtime/client/format.d.ts +91 -0
- package/dist/console/runtime/client/format.js +2 -0
- package/dist/console/runtime/client/format.ts +267 -0
- package/dist/console/runtime/client/highlight-languages.ts +27 -0
- package/dist/console/runtime/client/invocation-deletion.d.ts +17 -0
- package/dist/console/runtime/client/invocation-deletion.js +25 -0
- package/dist/console/runtime/client/invocation.d.ts +28 -0
- package/dist/console/runtime/client/invocation.js +81 -0
- package/dist/console/runtime/client/live.d.ts +67 -0
- package/dist/console/runtime/client/live.js +158 -0
- package/dist/console/runtime/client/mcp-client.d.ts +58 -0
- package/dist/console/runtime/client/mcp-client.js +125 -0
- package/dist/console/runtime/client/media-library.d.ts +2 -0
- package/dist/console/runtime/client/media-library.js +2 -0
- package/dist/console/runtime/client/media-uploads.d.ts +33 -0
- package/dist/console/runtime/client/media-uploads.js +97 -0
- package/dist/console/runtime/client/media.d.ts +2 -0
- package/dist/console/runtime/client/media.js +13 -0
- package/dist/console/runtime/client/operation-view.d.ts +44 -0
- package/dist/console/runtime/client/operation-view.js +161 -0
- package/dist/console/runtime/client/presence.d.ts +98 -0
- package/dist/console/runtime/client/presence.js +255 -0
- package/dist/console/runtime/client/preview.d.ts +86 -0
- package/dist/console/runtime/client/preview.js +125 -0
- package/dist/console/runtime/client/problem.d.ts +19 -0
- package/dist/console/runtime/client/problem.js +59 -0
- package/dist/console/runtime/client/project-link.d.ts +2 -0
- package/dist/console/runtime/client/project-link.js +2 -0
- package/dist/console/runtime/client/project-session.d.ts +221 -0
- package/dist/console/runtime/client/project-session.js +723 -0
- package/dist/console/runtime/client/project.d.ts +48 -0
- package/dist/console/runtime/client/project.js +2 -0
- package/dist/console/runtime/client/projects.d.ts +2 -0
- package/dist/console/runtime/client/projects.js +2 -0
- package/dist/console/runtime/client/publish.d.ts +12 -0
- package/dist/console/runtime/client/publish.js +18 -0
- package/dist/console/runtime/client/rate-limit.d.ts +36 -0
- package/dist/console/runtime/client/rate-limit.js +96 -0
- package/dist/console/runtime/client/read-only.d.ts +9 -0
- package/dist/console/runtime/client/read-only.js +12 -0
- package/dist/console/runtime/client/request.d.ts +55 -8
- package/dist/console/runtime/client/request.js +2 -133
- package/dist/console/runtime/client/route-query.d.ts +60 -0
- package/dist/console/runtime/client/route-query.js +2 -0
- package/dist/console/runtime/client/schedule-run.d.ts +13 -0
- package/dist/console/runtime/client/schedule-run.js +47 -0
- package/dist/console/runtime/client/schema-form.d.ts +2 -0
- package/dist/console/runtime/client/schema-form.js +296 -0
- package/dist/console/runtime/client/sections.d.ts +2 -12
- package/dist/console/runtime/client/sections.js +2 -41
- package/dist/console/runtime/client/sidebar.ts +84 -0
- package/dist/console/runtime/client/site-access.d.ts +32 -0
- package/dist/console/runtime/client/site-access.js +932 -0
- package/dist/console/runtime/client/stored.d.ts +33 -0
- package/dist/console/runtime/client/stored.js +2 -0
- package/dist/console/runtime/client/ticket.d.ts +2 -0
- package/dist/console/runtime/client/ticket.js +2 -0
- package/dist/console/runtime/client/toast.d.ts +39 -0
- package/dist/console/runtime/client/toast.js +35 -0
- package/dist/console/runtime/client/workflow.d.ts +20 -0
- package/dist/console/runtime/client/workflow.js +79 -0
- package/dist/console/runtime/components/console-account-api-keys.vue +195 -0
- package/dist/console/runtime/components/console-account-env.vue +286 -0
- package/dist/console/runtime/components/console-account-home.vue +427 -0
- package/dist/console/runtime/components/console-account-link.vue +68 -0
- package/dist/console/runtime/components/console-account-menu.vue +126 -0
- package/dist/console/runtime/components/console-account-rename.vue +67 -0
- package/dist/console/runtime/components/console-account-settings.vue +184 -0
- package/dist/console/runtime/components/console-account-setup.vue +82 -0
- package/dist/console/runtime/components/console-account-shell.vue +339 -0
- package/dist/console/runtime/components/console-account-sign-in.vue +152 -0
- package/dist/console/runtime/components/console-account-snippet.vue +89 -0
- package/dist/console/runtime/components/console-account-team-settings.vue +131 -0
- package/dist/console/runtime/components/console-account-team.vue +199 -0
- package/dist/console/runtime/components/console-account-unlink.vue +52 -0
- package/dist/console/runtime/components/console-activity-feed.vue +69 -0
- package/dist/console/runtime/components/console-add-primitive.vue +176 -0
- package/dist/console/runtime/components/console-agent-list.ts +61 -0
- package/dist/console/runtime/components/console-agent-session.vue +301 -0
- package/dist/console/runtime/components/console-app-crumb.vue +52 -0
- package/dist/console/runtime/components/console-app-logo.vue +44 -0
- package/dist/console/runtime/components/console-app-settings.vue +271 -0
- package/dist/console/runtime/components/console-app.vue +894 -669
- package/dist/console/runtime/components/console-auth-action.vue +241 -0
- package/dist/console/runtime/components/console-auth-activity.vue +162 -0
- package/dist/console/runtime/components/console-auth-chart.vue +105 -0
- package/dist/console/runtime/components/console-auth-detail.vue +379 -0
- package/dist/console/runtime/components/console-auth-event-list.vue +79 -0
- package/dist/console/runtime/components/console-auth-event-setup.vue +39 -0
- package/dist/console/runtime/components/console-auth-overview.vue +95 -0
- package/dist/console/runtime/components/console-auth-user-events.vue +62 -0
- package/dist/console/runtime/components/console-auth.vue +651 -0
- package/dist/console/runtime/components/console-blob-detail.vue +83 -0
- package/dist/console/runtime/components/console-blob.vue +160 -300
- package/dist/console/runtime/components/console-cache.vue +358 -0
- package/dist/console/runtime/components/console-code-text.vue +18 -0
- package/dist/console/runtime/components/console-comark-component.vue +146 -0
- package/dist/console/runtime/components/console-comment-thread.vue +320 -0
- package/dist/console/runtime/components/console-confirm.vue +46 -0
- package/dist/console/runtime/components/console-connection-state.vue +40 -0
- package/dist/console/runtime/components/console-connection.ts +18 -0
- package/dist/console/runtime/components/console-database-model.ts +51 -6
- package/dist/console/runtime/components/console-database.vue +310 -380
- package/dist/console/runtime/components/console-definitions.vue +491 -306
- package/dist/console/runtime/components/console-document-dashboard.vue +473 -0
- package/dist/console/runtime/components/console-document-diff.vue +43 -0
- package/dist/console/runtime/components/console-document-editor.vue +2806 -0
- package/dist/console/runtime/components/console-document-history.vue +118 -0
- package/dist/console/runtime/components/console-document-list.vue +575 -0
- package/dist/console/runtime/components/console-document-preview.vue +409 -0
- package/dist/console/runtime/components/console-document-settings.vue +106 -0
- package/dist/console/runtime/components/console-documents.vue +544 -0
- package/dist/console/runtime/components/console-env-details.vue +49 -0
- package/dist/console/runtime/components/console-env.vue +322 -0
- package/dist/console/runtime/components/console-facts.ts +13 -0
- package/dist/console/runtime/components/console-frame.vue +201 -1
- package/dist/console/runtime/components/console-home.vue +575 -155
- package/dist/console/runtime/components/console-icon.vue +19 -0
- package/dist/console/runtime/components/console-invocation-composer.vue +155 -0
- package/dist/console/runtime/components/console-kv.vue +225 -235
- package/dist/console/runtime/components/console-lazy-views.ts +2 -0
- package/dist/console/runtime/components/console-loading.vue +29 -0
- package/dist/console/runtime/components/console-mark.vue +3 -8
- package/dist/console/runtime/components/console-markdown-editor.vue +681 -0
- package/dist/console/runtime/components/console-mcp-callback.vue +76 -0
- package/dist/console/runtime/components/console-mcp-client.vue +255 -0
- package/dist/console/runtime/components/console-mcp-connect.vue +162 -0
- package/dist/console/runtime/components/console-mcp-connection.vue +219 -0
- package/dist/console/runtime/components/console-mcp-content.vue +157 -0
- package/dist/console/runtime/components/console-mcp-items.vue +346 -0
- package/dist/console/runtime/components/console-media-browser.vue +956 -0
- package/dist/console/runtime/components/console-media-crops.vue +168 -0
- package/dist/console/runtime/components/console-media-detail.vue +278 -0
- package/dist/console/runtime/components/console-media-dialog.vue +74 -0
- package/dist/console/runtime/components/console-media-field.vue +161 -0
- package/dist/console/runtime/components/console-media-focal.vue +138 -0
- package/dist/console/runtime/components/console-media-library.vue +132 -0
- package/dist/console/runtime/components/console-media-move.vue +161 -0
- package/dist/console/runtime/components/console-media-picker.vue +196 -0
- package/dist/console/runtime/components/console-media-uploads.vue +75 -0
- package/dist/console/runtime/components/console-new-chat.ts +27 -0
- package/dist/console/runtime/components/console-operation-view.vue +327 -0
- package/dist/console/runtime/components/console-page-changes.vue +207 -0
- package/dist/console/runtime/components/console-page-header.vue +82 -0
- package/dist/console/runtime/components/console-page-toolbar.vue +41 -0
- package/dist/console/runtime/components/console-presence-avatars.vue +74 -0
- package/dist/console/runtime/components/console-project-switcher.vue +212 -0
- package/dist/console/runtime/components/console-property-list.vue +41 -0
- package/dist/console/runtime/components/console-property-row.vue +59 -0
- package/dist/console/runtime/components/console-rail.vue +237 -0
- package/dist/console/runtime/components/console-rate-limit.vue +175 -0
- package/dist/console/runtime/components/console-relative-time.vue +74 -0
- package/dist/console/runtime/components/console-schema-date-input.vue +88 -0
- package/dist/console/runtime/components/console-schema-field.vue +450 -0
- package/dist/console/runtime/components/console-schema-form.vue +76 -0
- package/dist/console/runtime/components/console-schema-list.vue +157 -0
- package/dist/console/runtime/components/console-search-palette.vue +1051 -0
- package/dist/console/runtime/components/console-search.vue +17 -424
- package/dist/console/runtime/components/console-section-icon.vue +18 -0
- package/dist/console/runtime/components/console-section.vue +68 -0
- package/dist/console/runtime/components/console-seo-panel.vue +261 -0
- package/dist/console/runtime/components/console-session-actions.vue +158 -0
- package/dist/console/runtime/components/console-session-bootstrap.ts +0 -26
- package/dist/console/runtime/components/console-session-cancel.vue +89 -0
- package/dist/console/runtime/components/console-session-code-language.ts +32 -0
- package/dist/console/runtime/components/console-session-code-preview.vue +42 -40
- package/dist/console/runtime/components/console-session-copy-link.vue +11 -0
- package/dist/console/runtime/components/console-session-inspector.vue +392 -235
- package/dist/console/runtime/components/console-session-loading.vue +19 -27
- package/dist/console/runtime/components/console-session-navbar.vue +44 -27
- package/dist/console/runtime/components/console-session-trace.vue +30 -84
- package/dist/console/runtime/components/console-session.css +438 -818
- package/dist/console/runtime/components/console-settings-card.vue +76 -0
- package/dist/console/runtime/components/console-settings-value.vue +46 -0
- package/dist/console/runtime/components/console-settings.vue +100 -0
- package/dist/console/runtime/components/console-setup-hint.vue +15 -0
- package/dist/console/runtime/components/console-sidebar-item.vue +62 -0
- package/dist/console/runtime/components/console-sidebar-trigger.vue +34 -0
- package/dist/console/runtime/components/console-sidebar.vue +352 -0
- package/dist/console/runtime/components/console-site.vue +370 -0
- package/dist/console/runtime/components/console-skill-file.vue +73 -0
- package/dist/console/runtime/components/console-skill-tree.vue +62 -0
- package/dist/console/runtime/components/console-skills.vue +193 -0
- package/dist/console/runtime/components/console-stat-grid.vue +64 -0
- package/dist/console/runtime/components/console-state.vue +150 -0
- package/dist/console/runtime/components/console-toaster.vue +75 -0
- package/dist/console/runtime/components/console-usage-chart.vue +210 -0
- package/dist/console/runtime/components/console-usage-model-detail.vue +138 -0
- package/dist/console/runtime/components/console-usage-model.ts +376 -0
- package/dist/console/runtime/components/console-usage-share-bar.vue +48 -0
- package/dist/console/runtime/components/console-usage.vue +1086 -508
- package/dist/console/runtime/components/console-user-menu.vue +42 -0
- package/dist/console/runtime/components/console-value.vue +36 -0
- package/dist/console/runtime/components/console-workflow-actions.vue +174 -0
- package/dist/console/runtime/components/console-workspace-browser.vue +507 -0
- package/dist/console/runtime/components/console-workspace-file.ts +12 -0
- package/dist/console/runtime/components/console-workspace-history.vue +76 -0
- package/dist/console/runtime/components/console-wrap.ts +10 -0
- package/dist/console/runtime/components/invocation/agent-capability-inspector.ts +165 -0
- package/dist/console/runtime/components/invocation/agent-invocation-list.ts +260 -0
- package/dist/console/runtime/components/invocation/agent-invocation-timeline.ts +112 -0
- package/dist/console/runtime/components/invocation/agent-invocation.ts +1991 -0
- package/dist/console/runtime/components/invocation/index.ts +8 -0
- package/dist/console/runtime/components/invocation/internal/brand-icons.ts +65 -0
- package/dist/console/runtime/components/invocation/internal/channel-icon.ts +51 -0
- package/dist/console/runtime/components/invocation/internal/invocation-activity.ts +745 -0
- package/dist/console/runtime/components/invocation/internal/invocation-brand.ts +173 -0
- package/dist/console/runtime/components/invocation/internal/invocation-conversation.ts +167 -0
- package/dist/console/runtime/components/invocation/internal/invocation-page-changes.ts +64 -0
- package/dist/console/runtime/components/invocation/internal/payload-text.ts +27 -0
- package/dist/console/runtime/components/invocation/internal/url.ts +8 -0
- package/dist/console/runtime/components/invocation/invocation-display.ts +56 -0
- package/dist/console/runtime/components/invocation/invocation.css +2789 -0
- package/dist/console/runtime/components/invocation/types.ts +97 -0
- package/dist/console/runtime/console-route.d.ts +15 -9
- package/dist/console/runtime/console-route.js +2 -37
- package/dist/console/runtime/definitions.d.ts +2 -2
- package/dist/console/runtime/definitions.js +2 -15
- package/dist/console/runtime/diagnostics.ts +287 -0
- package/dist/console/runtime/mcp-client.d.ts +2 -0
- package/dist/console/runtime/mcp-client.js +2 -0
- package/dist/console/runtime/page/loader.js +142 -0
- package/dist/console/runtime/page-tool/page-tool.js +10 -0
- package/dist/console/runtime/public/skills/index.json +47 -0
- package/dist/console/runtime/public/skills/vitehub/SKILL.md +99 -0
- package/dist/console/runtime/public/skills/vitehub/agents/openai.yaml +4 -0
- package/dist/console/runtime/public/skills/vitehub/references/agent-definitions.md +36 -0
- package/dist/console/runtime/public/skills/vitehub/references/bundle.md +57 -0
- package/dist/console/runtime/public/skills/vitehub/references/capabilities-authority.md +30 -0
- package/dist/console/runtime/public/skills/vitehub/references/channels-triggers.md +27 -0
- package/dist/console/runtime/public/skills/vitehub/references/framework-composition.md +29 -0
- package/dist/console/runtime/public/skills/vitehub/references/preview-contract.md +36 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/auth.md +14 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/blob.md +13 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/browser.md +17 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/cache.md +13 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/channels.md +11 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/connections.md +14 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/content.md +13 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/database.md +15 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/email.md +11 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/env.md +13 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/kv.md +13 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/markdown-template.md +13 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/queue.md +14 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/rate-limit.md +11 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/realtime.md +19 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/sandbox-task.md +11 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/sandbox.md +13 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/schedule.md +11 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/shell.md +11 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/source.md +11 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/workflow.md +11 -0
- package/dist/console/runtime/public/skills/vitehub/references/primitives/workspace.md +11 -0
- package/dist/console/runtime/public/skills/vitehub/references/project-patterns.md +19 -0
- package/dist/console/runtime/public/skills/vitehub/references/project-shapes.md +81 -0
- package/dist/console/runtime/public/skills/vitehub/references/proof-recovery.md +31 -0
- package/dist/console/runtime/public/skills/vitehub/references/sandboxes-hosts.md +26 -0
- package/dist/console/runtime/public/skills/vitehub/references/schedules-workflows-invocations.md +28 -0
- package/dist/console/runtime/public/skills/vitehub/references/server-primitives.md +39 -0
- package/dist/console/runtime/public/skills/vitehub/references/workspaces-sources-access.md +26 -0
- package/dist/console/runtime/rpc.d.ts +2 -35
- package/dist/console/runtime/rpc.js +2 -16
- package/dist/console/runtime/sections.d.ts +2 -2
- package/dist/console/runtime/sections.js +2 -126
- package/dist/console/runtime/server/access-policy.d.ts +2 -0
- package/dist/console/runtime/server/access-policy.js +2 -0
- package/dist/console/runtime/server/agents.get.d.ts +10 -5
- package/dist/console/runtime/server/agents.get.js +18 -10
- package/dist/console/runtime/server/auth.d.ts +2 -0
- package/dist/console/runtime/server/auth.js +81 -0
- package/dist/console/runtime/server/blob.d.ts +2 -2
- package/dist/console/runtime/server/blob.js +2 -18
- package/dist/console/runtime/server/channel-replay.d.ts +23 -0
- package/dist/console/runtime/server/channel-replay.js +52 -0
- package/dist/console/runtime/server/database.d.ts +1 -1
- package/dist/console/runtime/server/database.get.d.ts +34 -6
- package/dist/console/runtime/server/database.get.js +77 -40
- package/dist/console/runtime/server/database.js +1 -16
- package/dist/console/runtime/server/definitions.d.ts +2 -2
- package/dist/console/runtime/server/definitions.get.d.ts +10 -9
- package/dist/console/runtime/server/definitions.get.js +76 -15
- package/dist/console/runtime/server/definitions.js +2 -22
- package/dist/console/runtime/server/development.d.ts +2 -0
- package/dist/console/runtime/server/development.js +2 -0
- package/dist/console/runtime/server/documents.d.ts +2 -0
- package/dist/console/runtime/server/documents.js +3 -0
- package/dist/console/runtime/server/env.d.ts +6 -0
- package/dist/console/runtime/server/env.get.d.ts +9 -0
- package/dist/console/runtime/server/env.get.js +16 -0
- package/dist/console/runtime/server/env.js +2 -0
- package/dist/console/runtime/server/invocation-capabilities.get.d.ts +6 -5
- package/dist/console/runtime/server/invocation-capabilities.get.js +14 -11
- package/dist/console/runtime/server/invocation-workspace.get.d.ts +8 -0
- package/dist/console/runtime/server/invocation-workspace.get.js +77 -0
- package/dist/console/runtime/server/invocation.get.d.ts +36 -25
- package/dist/console/runtime/server/invocation.get.js +140 -25
- package/dist/console/runtime/server/invocations.get.d.ts +12 -5
- package/dist/console/runtime/server/invocations.get.js +56 -69
- package/dist/console/runtime/server/logs.get.d.ts +16 -0
- package/dist/console/runtime/server/logs.get.js +56 -0
- package/dist/console/runtime/server/mcp-client-operations.d.ts +5 -0
- package/dist/console/runtime/server/mcp-client-operations.js +139 -0
- package/dist/console/runtime/server/operation-contributions.d.ts +2 -0
- package/dist/console/runtime/server/operation-contributions.js +2 -0
- package/dist/console/runtime/server/page-auth.d.ts +18 -0
- package/dist/console/runtime/server/page-auth.js +44 -0
- package/dist/console/runtime/server/page-session.d.ts +2 -0
- package/dist/console/runtime/server/page-session.js +5 -0
- package/dist/console/runtime/server/page-tool.d.ts +2 -0
- package/dist/console/runtime/server/page-tool.js +105 -0
- package/dist/console/runtime/server/rpc.d.ts +27 -0
- package/dist/console/runtime/server/rpc.js +222 -0
- package/dist/console/runtime/server/runtime.d.ts +2 -0
- package/dist/console/runtime/server/runtime.js +2 -0
- package/dist/console/runtime/server/search.get.d.ts +2 -6
- package/dist/console/runtime/server/search.get.js +97 -2
- package/dist/console/runtime/server/sections.d.ts +6 -2
- package/dist/console/runtime/server/sections.get.d.ts +2 -9
- package/dist/console/runtime/server/sections.get.js +47 -9
- package/dist/console/runtime/server/sections.js +7 -16
- package/dist/console/runtime/server/setup.d.ts +5 -0
- package/dist/console/runtime/server/setup.js +5 -0
- package/dist/console/runtime/server/site-entry.d.ts +24 -0
- package/dist/console/runtime/server/site-entry.js +142 -0
- package/dist/console/runtime/server/site-session.d.ts +85 -0
- package/dist/console/runtime/server/site-session.js +2 -0
- package/dist/console/runtime/server/status.get.d.ts +16 -0
- package/dist/console/runtime/server/status.get.js +30 -0
- package/dist/console/runtime/server/tickets.d.ts +2 -0
- package/dist/console/runtime/server/tickets.js +2 -0
- package/dist/console/runtime/server/usage.get.d.ts +7 -3
- package/dist/console/runtime/server/usage.get.js +74 -26
- package/dist/console/runtime/server/workspace-files.get.d.ts +12 -0
- package/dist/console/runtime/server/workspace-files.get.js +55 -0
- package/dist/console/runtime/site-access.d.ts +2 -0
- package/dist/console/runtime/site-access.js +2 -0
- package/dist/console/runtime/skills.d.ts +18 -0
- package/dist/console/runtime/skills.js +17 -0
- package/dist/console/server.d.ts +33 -7
- package/dist/console/server.js +9 -28
- package/dist/console/ui.d.ts +217 -0
- package/dist/console/ui.js +3233 -0
- package/dist/console-lazy-views-DXnIkdyd.js +2 -0
- package/dist/console-route-COvNB_Xj.js +49 -0
- package/dist/console.d.ts +3 -2
- package/dist/content/client.d.ts +1 -0
- package/dist/content/client.js +2 -0
- package/dist/content/collections.d.ts +1 -0
- package/dist/content/collections.js +2 -0
- package/dist/content/database.d.ts +1 -0
- package/dist/content/database.js +2 -0
- package/dist/content/editor.d.ts +1 -0
- package/dist/content/editor.js +2 -0
- package/dist/content/markdown.d.ts +1 -0
- package/dist/content/markdown.js +2 -0
- package/dist/content/preview.d.ts +1 -0
- package/dist/content/preview.js +2 -0
- package/dist/content/realtime.d.ts +1 -0
- package/dist/content/realtime.js +2 -0
- package/dist/content/sqlite.d.ts +1 -0
- package/dist/content/sqlite.js +2 -0
- package/dist/content.d.ts +1 -0
- package/dist/content.js +2 -0
- package/dist/database-BVyhAxq-.d.ts +6 -0
- package/dist/database-J7M0B3ED.js +17 -0
- package/dist/decisions/vue.d.ts +1 -0
- package/dist/decisions/vue.js +2 -0
- package/dist/decisions.d.ts +1 -0
- package/dist/decisions.js +2 -0
- package/dist/definitions-BDRkT5-f.js +336 -0
- package/dist/definitions-CGTWTj67.d.ts +19 -0
- package/dist/definitions-CxDT8D8Y.d.ts +243 -0
- package/dist/definitions-bepsXY5G.js +98 -0
- package/dist/dev-peer-am78OsHH.js +472 -0
- package/dist/development-BzeSHZGH.js +18 -0
- package/dist/development-DgaQ05jw.d.ts +9 -0
- package/dist/device/vue.d.ts +1 -0
- package/dist/device/vue.js +2 -0
- package/dist/device.d.ts +1 -0
- package/dist/device.js +2 -0
- package/dist/diagnostics-CjGiniKb.d.ts +11 -0
- package/dist/diagnostics-D0DefmQj.js +79 -0
- package/dist/docs/assistant.d.ts +1 -0
- package/dist/docs/assistant.js +2 -0
- package/dist/docs/nuxt.d.ts +3 -0
- package/dist/docs/nuxt.js +3 -0
- package/dist/docs/server.d.ts +1 -0
- package/dist/docs/server.js +2 -0
- package/dist/docs.d.ts +1 -0
- package/dist/docs.js +2 -0
- package/dist/doctor.d.ts +13 -0
- package/dist/doctor.js +3096 -0
- package/dist/documents-8US1nUgK.js +547 -0
- package/dist/documents-C97WMaJZ.d.ts +474 -0
- package/dist/documents-DwPfR-fz.js +136 -0
- package/dist/documents-RVHsQKFw.d.ts +87 -0
- package/dist/durability/operations.d.ts +5 -0
- package/dist/durability/operations.js +28 -0
- package/dist/email/test.d.ts +1 -0
- package/dist/email/test.js +2 -0
- package/dist/entries-D48wVEaS.js +142 -0
- package/dist/env/bridge.d.ts +1 -0
- package/dist/env/bridge.js +2 -0
- package/dist/env/database.d.ts +1 -0
- package/dist/env/database.js +2 -0
- package/dist/env/seal.d.ts +1 -0
- package/dist/env/seal.js +2 -0
- package/dist/env-Dg1I_DWr.js +11 -0
- package/dist/error-diagnostics-C2rjmOlX.js +630 -0
- package/dist/error-diagnostics.ts +639 -0
- package/dist/forge.d.ts +1 -0
- package/dist/forge.js +2 -0
- package/dist/format-BOYlanIZ.js +304 -0
- package/dist/forms/client.d.ts +1 -0
- package/dist/forms/client.js +2 -0
- package/dist/forms/database.d.ts +1 -0
- package/dist/forms/database.js +2 -0
- package/dist/forms/formisch.d.ts +1 -0
- package/dist/forms/formisch.js +2 -0
- package/dist/forms/operations.d.ts +1 -0
- package/dist/forms/operations.js +2 -0
- package/dist/forms/runtime.d.ts +1 -0
- package/dist/forms/runtime.js +2 -0
- package/dist/forms/vue.d.ts +1 -0
- package/dist/forms/vue.js +2 -0
- package/dist/forms.d.ts +1 -0
- package/dist/forms.js +2 -0
- package/dist/gateways/ai-sdk.d.ts +1 -0
- package/dist/gateways/ai-sdk.js +2 -0
- package/dist/gateways.d.ts +1 -0
- package/dist/gateways.js +2 -0
- package/dist/host-CkL0jjBq.js +11 -0
- package/dist/http-error-Bs6e8_-8.js +30 -0
- package/dist/i18n/runtime.d.ts +1 -0
- package/dist/i18n/runtime.js +2 -0
- package/dist/i18n/server.d.ts +1 -0
- package/dist/i18n/server.js +2 -0
- package/dist/i18n/vue.d.ts +1 -0
- package/dist/i18n/vue.js +2 -0
- package/dist/i18n.d.ts +1 -0
- package/dist/i18n.js +2 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.js +39 -3
- package/dist/inspect-CDw7e0vK.js +127 -0
- package/dist/internal/agent-invocations-libsql.d.ts +2 -0
- package/dist/internal/agent-invocations-libsql.js +2 -0
- package/dist/internal/disabled-redis-driver.d.ts +3 -0
- package/dist/internal/disabled-redis-driver.js +7 -0
- package/dist/internal/disabled-upstash-driver.d.ts +3 -0
- package/dist/internal/disabled-upstash-driver.js +7 -0
- package/dist/internal/test-loader.d.ts +8 -0
- package/dist/internal/test-loader.js +75 -0
- package/dist/internal/test-server.d.ts +1 -0
- package/dist/internal/test-server.js +84 -0
- package/dist/internal-BP_O70ic.d.ts +59 -0
- package/dist/internal-BreyUsQ6.js +31 -0
- package/dist/invariant-DolT9EEx.js +22 -0
- package/dist/invocation-page-undo-BkUau8X7.js +54 -0
- package/dist/invocations-CsucCJuq.js +86 -0
- package/dist/limits-BUlwWYQE.js +34 -0
- package/dist/logs/host.d.ts +6 -0
- package/dist/logs/host.js +2 -0
- package/dist/logs/memory.d.ts +2 -0
- package/dist/logs/memory.js +2 -0
- package/dist/logs/source.d.ts +2 -0
- package/dist/logs/source.js +2 -0
- package/dist/logs.d.ts +3 -0
- package/dist/logs.js +3 -0
- package/dist/markdown-template/file.d.ts +1 -0
- package/dist/markdown-template/file.js +2 -0
- package/dist/mcp-client-CTbTbn7d.js +10 -0
- package/dist/mcp-client-C_sEmyQw.d.ts +118 -0
- package/dist/mcp-client-D0mUt18v.js +1024 -0
- package/dist/mcp.d.ts +1 -0
- package/dist/mcp.js +2 -0
- package/dist/media-library-BChf8XOd.js +279 -0
- package/dist/media-library-CEo-Ye2B.d.ts +212 -0
- package/dist/media-uKX4Wy-c.d.ts +74 -0
- package/dist/media-wZMY6f2M.js +478 -0
- package/dist/memory-2bbl4hcV.d.ts +19 -0
- package/dist/memory-DhirB6SA.js +86 -0
- package/dist/nuxt-server-imports-Lnaf5Fe-.js +97 -0
- package/dist/nuxt.d.ts +14 -60
- package/dist/nuxt.js +966 -374
- package/dist/object-D8pRdprI.js +15 -0
- package/dist/operation-contributions-DflAv5AC.js +50 -0
- package/dist/operation-contributions-fZyVo662.d.ts +21 -0
- package/dist/operation-definition-Bn8V2hab.js +430 -0
- package/dist/operation-registry-BogGwk_I.js +22 -0
- package/dist/operation-rpc-DI9txNxK.js +158 -0
- package/dist/operations-B6N-ja8x.js +863 -0
- package/dist/operations-DX9EkHwb.d.ts +153 -0
- package/dist/operations-Dj_cp-UK.js +235 -0
- package/dist/operations-H9q0QB2C.js +2 -0
- package/dist/operations.d.ts +1 -0
- package/dist/operations.js +2 -0
- package/dist/optional-owners-Crm6kVS5.js +889 -0
- package/dist/owned-paths-BnjT0FhU.js +15 -0
- package/dist/page/pill.iife.js +70 -0
- package/dist/page-tool-BCRyx3pM.d.ts +68 -0
- package/dist/page-tools-BkSSBFoi.js +444 -0
- package/dist/page-tools-shared-D3fFoEV2.js +122 -0
- package/dist/page-tools-sw4I-Nqx.d.ts +23 -0
- package/dist/plugins-5uDXr9Km.d.ts +2124 -0
- package/dist/plugins-DQ8pF-38.js +11325 -0
- package/dist/presets/babysitter/server.d.ts +1 -0
- package/dist/presets/babysitter/server.js +2 -0
- package/dist/presets/babysitter.d.ts +1 -0
- package/dist/presets/babysitter.js +2 -0
- package/dist/presets/labeller.d.ts +1 -0
- package/dist/presets/labeller.js +2 -0
- package/dist/presets/workspace.d.ts +3 -0
- package/dist/presets/workspace.js +3 -0
- package/dist/project-5EN7JaXI.d.ts +26 -0
- package/dist/project-C2dnB9Kf.js +30 -0
- package/dist/project-DOeM0zg3.js +57 -0
- package/dist/project-link-D_XQvBOC.d.ts +94 -0
- package/dist/project-link-Qi7nltHM.js +149 -0
- package/dist/project-root-v6ba4tn7.js +12 -0
- package/dist/projects-CAcXztf4.js +154 -0
- package/dist/projects-Ddvl9EJp.d.ts +66 -0
- package/dist/rate-limit/drivers/cloudflare.d.ts +1 -0
- package/dist/rate-limit/drivers/cloudflare.js +2 -0
- package/dist/rate-limit/drivers/kv.d.ts +1 -0
- package/dist/rate-limit/drivers/kv.js +2 -0
- package/dist/rate-limit/drivers/memory.d.ts +1 -0
- package/dist/rate-limit/drivers/memory.js +2 -0
- package/dist/realtime/agent.d.ts +1 -0
- package/dist/realtime/agent.js +2 -0
- package/dist/realtime/bus.d.ts +1 -0
- package/dist/realtime/bus.js +2 -0
- package/dist/realtime/client.d.ts +1 -0
- package/dist/realtime/client.js +2 -0
- package/dist/registry-CDKLACCZ.js +16 -0
- package/dist/registry-zw6aE2N9.js +18 -0
- package/dist/request-BUYAlAJl.js +162 -0
- package/dist/request-D7h3SQ92.d.ts +21 -0
- package/dist/request-origin-Bq7mDQG9.js +23 -0
- package/dist/request-yCybBeqT.js +468 -0
- package/dist/route-query-CRVWXIrc.js +222 -0
- package/dist/rpc-7nlHSv3y.d.ts +37 -0
- package/dist/rpc-DIUA61pv.js +4 -0
- package/dist/runtime/durability.d.ts +1 -0
- package/dist/runtime/durability.js +2 -0
- package/dist/runtime-B_btezs1.d.ts +7 -0
- package/dist/runtime-DG34DLXc.js +55 -0
- package/dist/runtime-DM8Z6KLT.js +10 -0
- package/dist/runtime-DxfJOfCd.js +25 -0
- package/dist/runtime-YLWfdrtO.js +65 -0
- package/dist/runtime-feature-guard-rpZz1eMF.js +55 -0
- package/dist/sandbox/ssh.d.ts +1 -0
- package/dist/sandbox/ssh.js +2 -0
- package/dist/sandbox/task.d.ts +1 -0
- package/dist/sandbox/task.js +2 -0
- package/dist/scan-module-BTeOuZsp.js +2 -0
- package/dist/scan-module-DlHQ8a0X.js +148 -0
- package/dist/schedule/os.d.ts +1 -0
- package/dist/schedule/os.js +2 -0
- package/dist/schedule/runtime/kv.d.ts +1 -0
- package/dist/schedule/runtime/kv.js +2 -0
- package/dist/schema-form-C-fy3xaU.d.ts +79 -0
- package/dist/secret-AZLhaNyr.js +44 -0
- package/dist/sections-4xyBoiar.d.ts +159 -0
- package/dist/sections-ACHVTCWn.d.ts +10 -0
- package/dist/sections-BriKrBgN.d.ts +57 -0
- package/dist/sections-C83x0slv.js +13 -0
- package/dist/sections-CUJyQA9d.js +122 -0
- package/dist/sections-D6AM5Gy5.js +369 -0
- package/dist/sections.get-1lHjyKCI.d.ts +20 -0
- package/dist/seo/runtime.d.ts +64 -0
- package/dist/seo/runtime.js +123 -0
- package/dist/seo-CtLywyRx.d.ts +24 -0
- package/dist/seo.d.ts +2 -0
- package/dist/seo.js +17 -0
- package/dist/server-DbjFYSeU.js +18 -0
- package/dist/setup-C-5nB7aY.js +22 -0
- package/dist/setup-DLZFzuLv.d.ts +12 -0
- package/dist/site-access-Bhsty_v4.js +2 -0
- package/dist/site-access-BycrwM2v.js +18 -0
- package/dist/site-access-CyRtc0gZ.js +292 -0
- package/dist/site-access-DxfdOel1.d.ts +55 -0
- package/dist/site-session-Jf21TVw8.js +272 -0
- package/dist/skills/operations.d.ts +17 -0
- package/dist/skills/operations.js +51 -0
- package/dist/skills-DdpSMiCI.js +500 -0
- package/dist/skills.d.ts +197 -0
- package/dist/skills.get-CHQMzSD_.js +48 -0
- package/dist/skills.js +2 -0
- package/dist/source/drizzle.d.ts +1 -0
- package/dist/source/drizzle.js +2 -0
- package/dist/source/server.d.ts +1 -24
- package/dist/source/server.js +1 -24
- package/dist/source/vite.d.ts +1 -8
- package/dist/source/vite.js +2 -18
- package/dist/source-S-LChQvw.d.ts +59 -0
- package/dist/source-w9BHUwyO.js +60 -0
- package/dist/source.d.ts +1 -66
- package/dist/source.js +1 -103
- package/dist/stored-Dhv2qsQv.js +40 -0
- package/dist/sync/client.d.ts +1 -0
- package/dist/sync/client.js +2 -0
- package/dist/sync/database.d.ts +1 -0
- package/dist/sync/database.js +2 -0
- package/dist/sync/operations.d.ts +1 -0
- package/dist/sync/operations.js +2 -0
- package/dist/sync/runtime.d.ts +1 -0
- package/dist/sync/runtime.js +2 -0
- package/dist/sync/vue.d.ts +1 -0
- package/dist/sync/vue.js +2 -0
- package/dist/sync.d.ts +1 -0
- package/dist/sync.js +2 -0
- package/dist/task/operations.d.ts +22 -0
- package/dist/task/operations.js +36 -0
- package/dist/test/register.d.ts +1 -0
- package/dist/test/register.js +68 -0
- package/dist/test.d.ts +175 -0
- package/dist/test.js +49 -0
- package/dist/ticket-Pr_8ZtXW.d.ts +14 -0
- package/dist/ticket-RKQF6Wy9.js +31 -0
- package/dist/tickets-CfJhT7d0.js +358 -0
- package/dist/ui/markdown-editor.d.ts +1 -0
- package/dist/ui/markdown-editor.js +2 -0
- package/dist/ui/playground.d.ts +1 -0
- package/dist/ui/playground.js +2 -0
- package/dist/ui/styles.css +2 -2562
- package/dist/ui/theme.css +2 -0
- package/dist/ui/theme.d.ts +1 -0
- package/dist/ui/theme.js +2 -0
- package/dist/ui/workspace.d.ts +1 -0
- package/dist/ui/workspace.js +2 -0
- package/dist/usage-Bc0YY_ka.js +569 -0
- package/dist/usage-CoQXs5nW.d.ts +22 -0
- package/dist/usage-index-CMMT4cXQ.js +335 -0
- package/dist/version-DDRL_OYz.js +1080 -0
- package/dist/vue-router-C68IU1jM.d.ts +1914 -0
- package/dist/web-container/connect.d.ts +1 -0
- package/dist/web-container/connect.js +2 -0
- package/dist/web-container/env.d.ts +1 -0
- package/dist/web-container/env.js +2 -0
- package/dist/web-container/snapshot.d.ts +1 -0
- package/dist/web-container/snapshot.js +2 -0
- package/dist/web-container.d.ts +1 -0
- package/dist/web-container.js +2 -0
- package/dist/webhooks/database.d.ts +1 -0
- package/dist/webhooks/database.js +2 -0
- package/dist/webhooks/operations.d.ts +1 -0
- package/dist/webhooks/operations.js +2 -0
- package/dist/webhooks/runtime.d.ts +1 -0
- package/dist/webhooks/runtime.js +2 -0
- package/dist/webhooks.d.ts +1 -0
- package/dist/webhooks.js +2 -0
- package/dist/workflow/openworkflow.d.ts +1 -0
- package/dist/workflow/openworkflow.js +2 -0
- package/dist/workspace/blob-database.d.ts +1 -0
- package/dist/workspace/blob-database.js +2 -0
- package/dist/workspace/checkout.d.ts +1 -0
- package/dist/workspace/checkout.js +2 -0
- package/dist/workspace/files.d.ts +1 -0
- package/dist/workspace/files.js +2 -0
- package/dist/workspace/lineage.d.ts +1 -0
- package/dist/workspace/lineage.js +2 -0
- package/dist/workspace-history-CeVwBB6Q.d.ts +52 -0
- package/dist/workspace-history-l47NPVSy.js +248 -0
- package/package.json +1320 -207
- package/dist/_internal/agent/cloudflare/state.d.ts +0 -1
- package/dist/_internal/agent/cloudflare/state.js +0 -2
- package/dist/_internal/agent/cloudflare.d.ts +0 -1
- package/dist/_internal/agent/cloudflare.js +0 -2
- package/dist/_internal/agent/eve.d.ts +0 -1
- package/dist/_internal/agent/eve.js +0 -2
- package/dist/_internal/agent/runtime/workflow.d.ts +0 -1
- package/dist/_internal/agent/runtime/workflow.js +0 -2
- package/dist/_internal/agent/server/internal.d.ts +0 -1
- package/dist/_internal/agent/server/internal.js +0 -2
- package/dist/_internal/agent/server/workspace.d.ts +0 -1
- package/dist/_internal/agent/server/workspace.js +0 -2
- package/dist/_internal/agent/server.d.ts +0 -1
- package/dist/_internal/agent/server.js +0 -2
- package/dist/_internal/agent/state/sqlite.d.ts +0 -1
- package/dist/_internal/agent/state/sqlite.js +0 -2
- package/dist/_internal/agent.d.ts +0 -1
- package/dist/_internal/agent.js +0 -2
- package/dist/_internal/blob/runtime/state.d.ts +0 -1
- package/dist/_internal/blob/runtime/state.js +0 -2
- package/dist/_internal/blob.d.ts +0 -1
- package/dist/_internal/blob.js +0 -2
- package/dist/_internal/database/runtime/state.d.ts +0 -4
- package/dist/_internal/database/runtime/state.js +0 -5
- package/dist/_internal/kv/runtime/disabled-upstash.d.ts +0 -4
- package/dist/_internal/kv/runtime/disabled-upstash.js +0 -6
- package/dist/_internal/kv.d.ts +0 -1
- package/dist/_internal/kv.js +0 -2
- package/dist/_internal/markdown-template.d.ts +0 -2
- package/dist/_internal/markdown-template.js +0 -2
- package/dist/_internal/rate-limit/runtime.d.ts +0 -1
- package/dist/_internal/rate-limit/runtime.js +0 -2
- package/dist/_internal/sandbox/runtime/state.d.ts +0 -1
- package/dist/_internal/sandbox/runtime/state.js +0 -2
- package/dist/_internal/schedule/runtime/driver.d.ts +0 -1
- package/dist/_internal/schedule/runtime/driver.js +0 -2
- package/dist/_internal/schedule/runtime/process.d.ts +0 -1
- package/dist/_internal/schedule/runtime/process.js +0 -2
- package/dist/_internal/schedule/runtime/static.d.ts +0 -1
- package/dist/_internal/schedule/runtime/static.js +0 -2
- package/dist/_internal/schedule/runtime.d.ts +0 -1
- package/dist/_internal/schedule/runtime.js +0 -2
- package/dist/_internal/schedule.d.ts +0 -1
- package/dist/_internal/schedule.js +0 -2
- package/dist/_internal/workflow/runtime/cloudflare-runner.d.ts +0 -1
- package/dist/_internal/workflow/runtime/cloudflare-runner.js +0 -2
- package/dist/_internal/workflow/runtime/cloudflare-vite.d.ts +0 -1
- package/dist/_internal/workflow/runtime/cloudflare-vite.js +0 -2
- package/dist/_internal/workflow/runtime/execute.d.ts +0 -1
- package/dist/_internal/workflow/runtime/execute.js +0 -2
- package/dist/_internal/workflow/runtime/state.d.ts +0 -1
- package/dist/_internal/workflow/runtime/state.js +0 -2
- package/dist/_internal/workflow/runtime/vercel-vite.d.ts +0 -1
- package/dist/_internal/workflow/runtime/vercel-vite.js +0 -2
- package/dist/_internal/workflow.d.ts +0 -1
- package/dist/_internal/workflow.js +0 -2
- package/dist/_internal/workspace/internal/runtime/hosted-vercel-blob.d.ts +0 -1
- package/dist/_internal/workspace/internal/runtime/hosted-vercel-blob.js +0 -2
- package/dist/_internal/workspace/internal/runtime/hosted.d.ts +0 -1
- package/dist/_internal/workspace/internal/runtime/hosted.js +0 -2
- package/dist/_internal/workspace/internal/runtime/state.d.ts +0 -1
- package/dist/_internal/workspace/internal/runtime/state.js +0 -2
- package/dist/_internal/workspace/runtime.d.ts +0 -1
- package/dist/_internal/workspace/runtime.js +0 -2
- package/dist/_internal/workspace.d.ts +0 -1
- package/dist/_internal/workspace.js +0 -2
- package/dist/agent/invocations/sqlite.d.ts +0 -1
- package/dist/agent/invocations/sqlite.js +0 -2
- package/dist/agent/runtime/process.d.ts +0 -1
- package/dist/agent/runtime/process.js +0 -2
- package/dist/agent/state/sqlite.d.ts +0 -1
- package/dist/agent/state/sqlite.js +0 -2
- package/dist/agents-DGL-2SS3.js +0 -53
- package/dist/blob/content-type.d.ts +0 -1
- package/dist/blob/content-type.js +0 -2
- package/dist/blob-_CeYUuZh.d.ts +0 -8
- package/dist/box.d.ts +0 -1
- package/dist/box.js +0 -2
- package/dist/browser/actions.d.ts +0 -1
- package/dist/browser/actions.js +0 -2
- package/dist/console/runtime/client/time.d.ts +0 -4
- package/dist/console/runtime/client/time.js +0 -8
- package/dist/console/runtime/components/console-brand.vue +0 -37
- package/dist/console/runtime/components/console-health-model.ts +0 -54
- package/dist/console/runtime/components/console-health.vue +0 -236
- package/dist/console/runtime/components/console-primitive-switcher.vue +0 -69
- package/dist/console/runtime/components/console-provider.vue +0 -12
- package/dist/console/runtime/pages/agents.vue +0 -58
- package/dist/console/runtime/pages/blob.vue +0 -30
- package/dist/console/runtime/pages/databases.vue +0 -67
- package/dist/console/runtime/pages/index.vue +0 -29
- package/dist/console/runtime/pages/kv.vue +0 -68
- package/dist/console/runtime/pages/queues.vue +0 -30
- package/dist/console/runtime/pages/rate-limits.vue +0 -30
- package/dist/console/runtime/pages/sandboxes.vue +0 -27
- package/dist/console/runtime/pages/schedules.vue +0 -30
- package/dist/console/runtime/pages/workflows.vue +0 -30
- package/dist/console/runtime/pages/workspaces.vue +0 -30
- package/dist/console/runtime/public/console/chunks/ChatMessage-CVruGJWM.js +0 -1
- package/dist/console/runtime/public/console/chunks/ChatPrompt-BmTjPf5_.js +0 -1
- package/dist/console/runtime/public/console/chunks/ChatPromptSubmit-DcxguvaS.js +0 -1
- package/dist/console/runtime/public/console/chunks/ChatReasoning-DIMO2K2F.js +0 -1
- package/dist/console/runtime/public/console/chunks/ChatShimmer-C613EbHI.js +0 -1
- package/dist/console/runtime/public/console/chunks/ChatTool-DDmc-ZK6.js +0 -1
- package/dist/console/runtime/public/console/chunks/Collapsible-C0CXnWpw.js +0 -1
- package/dist/console/runtime/public/console/chunks/CollapsibleTrigger-CmJucLnT.js +0 -1
- package/dist/console/runtime/public/console/chunks/Icon-D-AnqCok.js +0 -1
- package/dist/console/runtime/public/console/chunks/abap-LtYK6g-v-CLvhMVsD.js +0 -1
- package/dist/console/runtime/public/console/chunks/actionscript-3-Czo0lKSf--17pq3dv.js +0 -1
- package/dist/console/runtime/public/console/chunks/ada-twHwrVWN-C5qYipkI.js +0 -1
- package/dist/console/runtime/public/console/chunks/andromeeda-DnSv6o6l-vGVdxbeo.js +0 -1
- package/dist/console/runtime/public/console/chunks/andromeeda-vGVdxbeo.js +0 -1
- package/dist/console/runtime/public/console/chunks/angular-html-Ct-40ew8-D8X9MCxo.js +0 -1
- package/dist/console/runtime/public/console/chunks/angular-html-DTyieMYv.js +0 -1
- package/dist/console/runtime/public/console/chunks/angular-ts-D3gV1N-x.js +0 -1
- package/dist/console/runtime/public/console/chunks/angular-ts-D6akBVit-CAEqTior.js +0 -1
- package/dist/console/runtime/public/console/chunks/apache-BIl2qPOf-U0d_L8uA.js +0 -1
- package/dist/console/runtime/public/console/chunks/apex-BkQQFAhi-VAyPSnFM.js +0 -1
- package/dist/console/runtime/public/console/chunks/apl-Cxjn4xYu-QUZjoXcb.js +0 -1
- package/dist/console/runtime/public/console/chunks/applescript-CJ80B5XJ-CCn79oCD.js +0 -1
- package/dist/console/runtime/public/console/chunks/ara-IxnQjO6j-4CJ0cIlV.js +0 -1
- package/dist/console/runtime/public/console/chunks/asciidoc-Dsw6zvwf-DE70LPWp.js +0 -1
- package/dist/console/runtime/public/console/chunks/asm-wBDSgBbA-Cmm7eHzH.js +0 -1
- package/dist/console/runtime/public/console/chunks/astro-BPVTb8uX-BMHg0UsI.js +0 -1
- package/dist/console/runtime/public/console/chunks/astro-CLAWI0Fn.js +0 -1
- package/dist/console/runtime/public/console/chunks/aurora-x-CDeNXAV0.js +0 -1
- package/dist/console/runtime/public/console/chunks/aurora-x-XJ5I8rFc-CDeNXAV0.js +0 -1
- package/dist/console/runtime/public/console/chunks/awk-D6dA05Ye-BWXHIvNe.js +0 -1
- package/dist/console/runtime/public/console/chunks/ayu-dark-CBRGL64--DluEY0Gj.js +0 -1
- package/dist/console/runtime/public/console/chunks/ayu-dark-DluEY0Gj.js +0 -1
- package/dist/console/runtime/public/console/chunks/ayu-light-BlrCS3Ih-C3h-C4tm.js +0 -1
- package/dist/console/runtime/public/console/chunks/ayu-light-C3h-C4tm.js +0 -1
- package/dist/console/runtime/public/console/chunks/ayu-mirage-Bqwy1Gya.js +0 -1
- package/dist/console/runtime/public/console/chunks/ayu-mirage-CqpTmLcF-Bqwy1Gya.js +0 -1
- package/dist/console/runtime/public/console/chunks/ballerina-DIdXD2KH-B7ZEbQpA.js +0 -1
- package/dist/console/runtime/public/console/chunks/bat-hQslfzu--Bo4NYOV-.js +0 -1
- package/dist/console/runtime/public/console/chunks/beancount-CXtOQ8oS-D-usSTwE.js +0 -1
- package/dist/console/runtime/public/console/chunks/berry-CgA2ea0_-DKpUyyne.js +0 -1
- package/dist/console/runtime/public/console/chunks/bibtex-BzgdqG3s-Ci_nEsc7.js +0 -1
- package/dist/console/runtime/public/console/chunks/bicep-CZ338dSk-CUHmPFLl.js +0 -1
- package/dist/console/runtime/public/console/chunks/bird2-GLyzhwkD-C6vDhewU.js +0 -1
- package/dist/console/runtime/public/console/chunks/blade-0LMawyyw-CZBPwR53.js +0 -1
- package/dist/console/runtime/public/console/chunks/blade-CP_mgflB.js +0 -1
- package/dist/console/runtime/public/console/chunks/bsl-0NWGiiFE-mk7PqslV.js +0 -1
- package/dist/console/runtime/public/console/chunks/bundle-web-DTJmdyvB.js +0 -13
- package/dist/console/runtime/public/console/chunks/c-BhmuwSav.js +0 -1
- package/dist/console/runtime/public/console/chunks/c-Dc0_AVM6-CjS7AEt5.js +0 -1
- package/dist/console/runtime/public/console/chunks/c3-BLXk7BLN-BFHwR3_K.js +0 -1
- package/dist/console/runtime/public/console/chunks/cadence-B1ELWULD-CQ2zXKGN.js +0 -1
- package/dist/console/runtime/public/console/chunks/cairo-DjG4M3vq-xb-J0v0e.js +0 -1
- package/dist/console/runtime/public/console/chunks/catppuccin-frappe-3VR1Za6u.js +0 -1
- package/dist/console/runtime/public/console/chunks/catppuccin-frappe-COUg_LSX-3VR1Za6u.js +0 -1
- package/dist/console/runtime/public/console/chunks/catppuccin-latte-DwIHMF0Q.js +0 -1
- package/dist/console/runtime/public/console/chunks/catppuccin-latte-r30LFfsa-DwIHMF0Q.js +0 -1
- package/dist/console/runtime/public/console/chunks/catppuccin-macchiato-D-EwZyPh-DYnBP6_5.js +0 -1
- package/dist/console/runtime/public/console/chunks/catppuccin-macchiato-DYnBP6_5.js +0 -1
- package/dist/console/runtime/public/console/chunks/catppuccin-mocha-C6RD5yh3-DYhrFGRu.js +0 -1
- package/dist/console/runtime/public/console/chunks/catppuccin-mocha-DYhrFGRu.js +0 -1
- package/dist/console/runtime/public/console/chunks/chunk-DK3Fl9T5.js +0 -1
- package/dist/console/runtime/public/console/chunks/clarity-2iIoRiLx-SemFz856.js +0 -1
- package/dist/console/runtime/public/console/chunks/clojure-DDsQ0FaV-DqKBuwfJ.js +0 -1
- package/dist/console/runtime/public/console/chunks/cmake-DPsCB_V6-Bj61d0ZC.js +0 -1
- package/dist/console/runtime/public/console/chunks/cobol-CocL1RYn-DoHa8rFw.js +0 -1
- package/dist/console/runtime/public/console/chunks/codeowners-CxEKPWu0-C8r90Shi.js +0 -1
- package/dist/console/runtime/public/console/chunks/codeql-BwdvwJnv-oeQT6MSM.js +0 -1
- package/dist/console/runtime/public/console/chunks/coffee-DtqnQNu5-Ca3s2Keu.js +0 -1
- package/dist/console/runtime/public/console/chunks/coffee-PUiKoj8Q.js +0 -1
- package/dist/console/runtime/public/console/chunks/common-lisp-DJtwvW4V-Cv5bFMCO.js +0 -1
- package/dist/console/runtime/public/console/chunks/coq-Ds6Ye5el-BrsZFFmf.js +0 -1
- package/dist/console/runtime/public/console/chunks/cpp-CxycoGSa.js +0 -1
- package/dist/console/runtime/public/console/chunks/cpp-Mb4ikSI3-tLY9dtiu.js +0 -1
- package/dist/console/runtime/public/console/chunks/crystal-D4OMbAh_-C9omPlZ-.js +0 -1
- package/dist/console/runtime/public/console/chunks/csharp-CFKaLbHg-oqKa8noW.js +0 -1
- package/dist/console/runtime/public/console/chunks/css-DLlZbWMi.js +0 -1
- package/dist/console/runtime/public/console/chunks/css-DTzmO9U0-CbxoEllx.js +0 -1
- package/dist/console/runtime/public/console/chunks/csv-DqIVFkK7-Dx-8-gkx.js +0 -1
- package/dist/console/runtime/public/console/chunks/csv-Dx-8-gkx.js +0 -1
- package/dist/console/runtime/public/console/chunks/cue-B5KneM5p-CE9AQfxI.js +0 -1
- package/dist/console/runtime/public/console/chunks/cypher-D8Bb8Cq2-ClKdZ_lG.js +0 -1
- package/dist/console/runtime/public/console/chunks/d-BQY8TDgQ-qD-0Kul2.js +0 -1
- package/dist/console/runtime/public/console/chunks/dark-plus-BCxGtnt0-Cs2F2srj.js +0 -1
- package/dist/console/runtime/public/console/chunks/dark-plus-Cs2F2srj.js +0 -1
- package/dist/console/runtime/public/console/chunks/dart-C6DUdjib-CnvKMtbv.js +0 -1
- package/dist/console/runtime/public/console/chunks/dax-S-Noo-ku-BkyTk9wS.js +0 -1
- package/dist/console/runtime/public/console/chunks/desktop-BgOb7Aj4-Dlh5hvp9.js +0 -1
- package/dist/console/runtime/public/console/chunks/diff-Blb4MjsC-woXpYk--.js +0 -1
- package/dist/console/runtime/public/console/chunks/docker-PC1tuYpa-IyjqRm3v.js +0 -1
- package/dist/console/runtime/public/console/chunks/dotenv-Dkdv7Sm2-_5a1GRtc.js +0 -1
- package/dist/console/runtime/public/console/chunks/dracula-BHWKrbxM.js +0 -1
- package/dist/console/runtime/public/console/chunks/dracula-fPErIccy-BHWKrbxM.js +0 -1
- package/dist/console/runtime/public/console/chunks/dracula-soft-5eyTD99u.js +0 -1
- package/dist/console/runtime/public/console/chunks/dracula-soft-BrQbqXs8-5eyTD99u.js +0 -1
- package/dist/console/runtime/public/console/chunks/dream-maker-CngiPd8U-DW3nJb8Q.js +0 -1
- package/dist/console/runtime/public/console/chunks/edge-DrFNu-N9-BY3pzybO.js +0 -1
- package/dist/console/runtime/public/console/chunks/elixir-OpZyQ8Ht-CwWfuiQ1.js +0 -1
- package/dist/console/runtime/public/console/chunks/elm-CjX_545P-Dn-DqM39.js +0 -1
- package/dist/console/runtime/public/console/chunks/emacs-lisp-DxhFFVu_-B4R74twV.js +0 -1
- package/dist/console/runtime/public/console/chunks/erb-trZRdc47-DRBdWH-D.js +0 -1
- package/dist/console/runtime/public/console/chunks/erlang-BJeTH9QH-BfDtvnHZ.js +0 -1
- package/dist/console/runtime/public/console/chunks/everforest-dark-gTeBQCos-sB-x3p7T.js +0 -1
- package/dist/console/runtime/public/console/chunks/everforest-dark-sB-x3p7T.js +0 -1
- package/dist/console/runtime/public/console/chunks/everforest-light-DUjxsp-2-Df2xbC6M.js +0 -1
- package/dist/console/runtime/public/console/chunks/everforest-light-Df2xbC6M.js +0 -1
- package/dist/console/runtime/public/console/chunks/fennel-B3wtZRne-DQxkIbk2.js +0 -1
- package/dist/console/runtime/public/console/chunks/fish-D7qAeWQz-BJitypiv.js +0 -1
- package/dist/console/runtime/public/console/chunks/fluent-BjfpB34g-C03EYrpw.js +0 -1
- package/dist/console/runtime/public/console/chunks/fortran-fixed-form-B_eBTsj9-C2-rkbip.js +0 -1
- package/dist/console/runtime/public/console/chunks/fortran-free-form-yxJ7igsv-CYNrtFtB.js +0 -1
- package/dist/console/runtime/public/console/chunks/fsharp-UvrT6oWG-LCdvSpj6.js +0 -1
- package/dist/console/runtime/public/console/chunks/gdresource-Dl9wvKCd-C3MGX-jo.js +0 -1
- package/dist/console/runtime/public/console/chunks/gdscript-jjgTGGzd-Cp2uCuqX.js +0 -1
- package/dist/console/runtime/public/console/chunks/gdshader-D7JfdFV3-CBce3t8t.js +0 -1
- package/dist/console/runtime/public/console/chunks/genie-DnK2KWIP-CV2tkWYe.js +0 -1
- package/dist/console/runtime/public/console/chunks/gherkin-D6Lr12YQ-DExj1W_8.js +0 -1
- package/dist/console/runtime/public/console/chunks/git-commit-2LMniMoO-CfgJCLX7.js +0 -1
- package/dist/console/runtime/public/console/chunks/git-rebase-DUOURRPN-DbPsFIae.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-dark-C-LZuMrd.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-dark-Dg1hl_QD-C-LZuMrd.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-dark-default-DXG-b-1a.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-dark-default-Dym2P842-DXG-b-1a.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-dark-dimmed-7iDMx266-Bx1FflLF.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-dark-dimmed-Bx1FflLF.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-dark-high-contrast-B_tTalzw.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-dark-high-contrast-DkV2fyPG-B_tTalzw.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-light-BQKYgor9-EUqPIrTm.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-light-EUqPIrTm.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-light-default-BXViO-2h.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-light-default-BZhIfzqQ-BXViO-2h.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-light-high-contrast-B68TUdTA.js +0 -1
- package/dist/console/runtime/public/console/chunks/github-light-high-contrast-C7zHfx4C-B68TUdTA.js +0 -1
- package/dist/console/runtime/public/console/chunks/gleam-CTllUdfC-CSRkHgEL.js +0 -1
- package/dist/console/runtime/public/console/chunks/glimmer-js-D_32hFh8-Dv_1Q6fk.js +0 -1
- package/dist/console/runtime/public/console/chunks/glimmer-ts-CVt002zd-PmMLyqBp.js +0 -1
- package/dist/console/runtime/public/console/chunks/glsl-8MDrjpMp.js +0 -1
- package/dist/console/runtime/public/console/chunks/glsl-pHhzolba-D3h1XPFw.js +0 -1
- package/dist/console/runtime/public/console/chunks/gn-DDjbVPF4-ilITqXS6.js +0 -1
- package/dist/console/runtime/public/console/chunks/gnuplot-DgWvVXI8-7GGW24-e.js +0 -1
- package/dist/console/runtime/public/console/chunks/go-aXtTCanQ-rLFTqkRN.js +0 -1
- package/dist/console/runtime/public/console/chunks/graphql-BjqekQIR-CtUxCAnJ.js +0 -1
- package/dist/console/runtime/public/console/chunks/graphql-C4iAGs1_.js +0 -1
- package/dist/console/runtime/public/console/chunks/groovy-Bw2Ku4bU-CacY0gHj.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-dark-hard-C820rvS2.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-dark-hard-CQiwpF03-C820rvS2.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-dark-medium-BKe6XKBS-BPjhmG05.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-dark-medium-BPjhmG05.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-dark-soft-Cz6U6pa4-MrdJrrXF.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-dark-soft-MrdJrrXF.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-light-hard-BC_s9l72.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-light-hard-DgU_i19B-BC_s9l72.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-light-medium-BAWPOn9u.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-light-medium-D64I06ER-BAWPOn9u.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-light-soft-B-YxAs1L-BSMLrYjP.js +0 -1
- package/dist/console/runtime/public/console/chunks/gruvbox-light-soft-BSMLrYjP.js +0 -1
- package/dist/console/runtime/public/console/chunks/hack-BITNGzgt-BwY4KWmq.js +0 -1
- package/dist/console/runtime/public/console/chunks/haml-BJGeH8A5.js +0 -1
- package/dist/console/runtime/public/console/chunks/haml-DVwRP8W9-C4Ue42xj.js +0 -1
- package/dist/console/runtime/public/console/chunks/handlebars-OC1LcHwO.js +0 -1
- package/dist/console/runtime/public/console/chunks/handlebars-T3TJj8Il-BLQCwuJT.js +0 -1
- package/dist/console/runtime/public/console/chunks/haskell-CfGsE1Cf-D8IpX4py.js +0 -1
- package/dist/console/runtime/public/console/chunks/haxe-B0odltAZ-OTjmBuCE.js +0 -1
- package/dist/console/runtime/public/console/chunks/hcl-DHg_Osgo-Dh228itO.js +0 -1
- package/dist/console/runtime/public/console/chunks/hjson-Cuaphql8-CxZEssPk.js +0 -1
- package/dist/console/runtime/public/console/chunks/hlsl-BJLUNfne-Cvrh5tZx.js +0 -1
- package/dist/console/runtime/public/console/chunks/horizon-CE9ld1lL.js +0 -1
- package/dist/console/runtime/public/console/chunks/horizon-DYoumREk-CE9ld1lL.js +0 -1
- package/dist/console/runtime/public/console/chunks/horizon-bright-CPyV7XIA-DSNQnXHK.js +0 -1
- package/dist/console/runtime/public/console/chunks/horizon-bright-DSNQnXHK.js +0 -1
- package/dist/console/runtime/public/console/chunks/houston-B3NWfq0V-CsvMBhTu.js +0 -1
- package/dist/console/runtime/public/console/chunks/houston-CsvMBhTu.js +0 -1
- package/dist/console/runtime/public/console/chunks/html-CamevgpM-BbT95zHF.js +0 -1
- package/dist/console/runtime/public/console/chunks/html-Cs160JwT.js +0 -1
- package/dist/console/runtime/public/console/chunks/html-derivative-GiQ9zDJU.js +0 -1
- package/dist/console/runtime/public/console/chunks/html-derivative-jMOJf6rB-Kh3SdD3S.js +0 -1
- package/dist/console/runtime/public/console/chunks/http-BEHztmFP-BxphIJE7.js +0 -1
- package/dist/console/runtime/public/console/chunks/http-Cgwuv9UR.js +0 -1
- package/dist/console/runtime/public/console/chunks/hurl-DMKCZZMv.js +0 -1
- package/dist/console/runtime/public/console/chunks/hurl-LmFBxrwm-CGo4dqUD.js +0 -1
- package/dist/console/runtime/public/console/chunks/hxml-BQ4V4Tez-BaHUc7lX.js +0 -1
- package/dist/console/runtime/public/console/chunks/hy-CJKxDzbh-CZbG8q4J.js +0 -1
- package/dist/console/runtime/public/console/chunks/imba-96qKoJCa-DsUTQ-LC.js +0 -1
- package/dist/console/runtime/public/console/chunks/imba-DsUTQ-LC.js +0 -1
- package/dist/console/runtime/public/console/chunks/ini-C24lZfdM-B5eOa1yu.js +0 -1
- package/dist/console/runtime/public/console/chunks/java-CUcXVav_.js +0 -1
- package/dist/console/runtime/public/console/chunks/java-Cfowl-Ex-BnGnzH2k.js +0 -1
- package/dist/console/runtime/public/console/chunks/javascript-C4sF7sej-B29qPxDa.js +0 -1
- package/dist/console/runtime/public/console/chunks/javascript-DrVpc-sp.js +0 -1
- package/dist/console/runtime/public/console/chunks/jinja-C17UUgXU.js +0 -1
- package/dist/console/runtime/public/console/chunks/jinja-CCAEwzP4-PaInFpq5.js +0 -1
- package/dist/console/runtime/public/console/chunks/jison-BKCoBkyT-BRL7eVgb.js +0 -1
- package/dist/console/runtime/public/console/chunks/jison-ByjIV4zh.js +0 -1
- package/dist/console/runtime/public/console/chunks/json-E4f3l6hr-DuNL0Aj9.js +0 -1
- package/dist/console/runtime/public/console/chunks/json-qhed-kSA.js +0 -1
- package/dist/console/runtime/public/console/chunks/json5-BR5RXkoi.js +0 -1
- package/dist/console/runtime/public/console/chunks/json5-xULSgPQI-BR5RXkoi.js +0 -1
- package/dist/console/runtime/public/console/chunks/jsonc-CYpm1nAK.js +0 -1
- package/dist/console/runtime/public/console/chunks/jsonc-Cu6rqcrJ-CYpm1nAK.js +0 -1
- package/dist/console/runtime/public/console/chunks/jsonl-Bp0qqr10-CmCQp5Yx.js +0 -1
- package/dist/console/runtime/public/console/chunks/jsonl-CmCQp5Yx.js +0 -1
- package/dist/console/runtime/public/console/chunks/jsonnet-BafgE6cE-CJTPZ8u_.js +0 -1
- package/dist/console/runtime/public/console/chunks/jssm-Dx5A5sBR-DXw9l8Rf.js +0 -1
- package/dist/console/runtime/public/console/chunks/jsx-BZjOirBP-Dga5sQe3.js +0 -1
- package/dist/console/runtime/public/console/chunks/jsx-C-HlKHLe.js +0 -1
- package/dist/console/runtime/public/console/chunks/julia-Ca_tGyZB.js +0 -1
- package/dist/console/runtime/public/console/chunks/julia-nEdJo0dp-CJRta6ZT.js +0 -1
- package/dist/console/runtime/public/console/chunks/just-Brtw3q7S-DmytbepJ.js +0 -1
- package/dist/console/runtime/public/console/chunks/kanagawa-dragon-CXtmUGW6.js +0 -1
- package/dist/console/runtime/public/console/chunks/kanagawa-dragon-DExkuQAs-CXtmUGW6.js +0 -1
- package/dist/console/runtime/public/console/chunks/kanagawa-lotus-BN08jTvb.js +0 -1
- package/dist/console/runtime/public/console/chunks/kanagawa-lotus-qdYh7_RY-BN08jTvb.js +0 -1
- package/dist/console/runtime/public/console/chunks/kanagawa-wave-CSW_hADG-CTweb8Dz.js +0 -1
- package/dist/console/runtime/public/console/chunks/kanagawa-wave-CTweb8Dz.js +0 -1
- package/dist/console/runtime/public/console/chunks/kdl-DkTyxPcj-CsD5j6eV.js +0 -1
- package/dist/console/runtime/public/console/chunks/kotlin-BHE8CoV9-DhhofPvG.js +0 -1
- package/dist/console/runtime/public/console/chunks/kusto-6FdaWTzR-C7mF5XQf.js +0 -1
- package/dist/console/runtime/public/console/chunks/laserwave-C_8bwKvT.js +0 -1
- package/dist/console/runtime/public/console/chunks/laserwave-DkfjiLxA-C_8bwKvT.js +0 -1
- package/dist/console/runtime/public/console/chunks/latex-QHQNiZDD-fcyJN6QK.js +0 -1
- package/dist/console/runtime/public/console/chunks/lean-BwOKScIt-CewbzKMR.js +0 -1
- package/dist/console/runtime/public/console/chunks/less-BzbdhFUi-DVTAwKKz.js +0 -1
- package/dist/console/runtime/public/console/chunks/less-DVTAwKKz.js +0 -1
- package/dist/console/runtime/public/console/chunks/light-plus-DVQuIRkW.js +0 -1
- package/dist/console/runtime/public/console/chunks/light-plus-DuO6rXxZ-DVQuIRkW.js +0 -1
- package/dist/console/runtime/public/console/chunks/liquid-DYQ7uW5u-JGNMHTpg.js +0 -1
- package/dist/console/runtime/public/console/chunks/llvm-uY68ROGz-Cm23YOpf.js +0 -1
- package/dist/console/runtime/public/console/chunks/log-Dad54gsi-BNLmms1o.js +0 -1
- package/dist/console/runtime/public/console/chunks/logo-DTXV8SKw-Cluzi2Zq.js +0 -1
- package/dist/console/runtime/public/console/chunks/lua-BhkUWs1q-CVcL4bwV.js +0 -1
- package/dist/console/runtime/public/console/chunks/luau-YC4aaMmR-FMPmPwt6.js +0 -1
- package/dist/console/runtime/public/console/chunks/make-B2ukzWs3-Dixweg8N.js +0 -1
- package/dist/console/runtime/public/console/chunks/markdown-BYOwaDjH.js +0 -1
- package/dist/console/runtime/public/console/chunks/markdown-CkmxmzqY-BYOwaDjH.js +0 -1
- package/dist/console/runtime/public/console/chunks/marko-BHWvxp04-U7nYXRKW.js +0 -1
- package/dist/console/runtime/public/console/chunks/marko-DmV4Eg2F.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-Bm3Qr25_.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-C_YrwKEa-Bm3Qr25_.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-darker-2IIEA8gg.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-darker-DB3YVCla-2IIEA8gg.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-lighter-D2fgNrBK-uhdI0v04.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-lighter-uhdI0v04.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-ocean-CHQ94UKr.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-ocean-DVy172Rs-CHQ94UKr.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-palenight-B5W6OYN7.js +0 -1
- package/dist/console/runtime/public/console/chunks/material-theme-palenight-uMMwIfpG-B5W6OYN7.js +0 -1
- package/dist/console/runtime/public/console/chunks/matlab-CfRK6IMC-D7qyCx1q.js +0 -1
- package/dist/console/runtime/public/console/chunks/mdc-BVkdQPZX.js +0 -1
- package/dist/console/runtime/public/console/chunks/mdc-Dg7VPYLa-CshLRYP7.js +0 -1
- package/dist/console/runtime/public/console/chunks/mdx-BK9ZufRc-DQZ5AkYe.js +0 -1
- package/dist/console/runtime/public/console/chunks/mdx-DQZ5AkYe.js +0 -1
- package/dist/console/runtime/public/console/chunks/mermaid-r7OoIYpE-Bk4SNUv9.js +0 -1
- package/dist/console/runtime/public/console/chunks/min-dark-BSWPekZh.js +0 -1
- package/dist/console/runtime/public/console/chunks/min-dark-C7Ec8I_2-BSWPekZh.js +0 -1
- package/dist/console/runtime/public/console/chunks/min-light-Be6foA7m-DDpmG2fV.js +0 -1
- package/dist/console/runtime/public/console/chunks/min-light-DDpmG2fV.js +0 -1
- package/dist/console/runtime/public/console/chunks/mipsasm-EL46Y4Xg-BMqwQI7S.js +0 -1
- package/dist/console/runtime/public/console/chunks/mojo-YCzvCoMT-BgCJLMeH.js +0 -1
- package/dist/console/runtime/public/console/chunks/monokai-CREPpJ3k-CdkpiU2Y.js +0 -1
- package/dist/console/runtime/public/console/chunks/monokai-CdkpiU2Y.js +0 -1
- package/dist/console/runtime/public/console/chunks/moonbit-B_9L5rST-CaWjb8XO.js +0 -1
- package/dist/console/runtime/public/console/chunks/move-Dqi5fhOb-B1IS1UjX.js +0 -1
- package/dist/console/runtime/public/console/chunks/narrat-D9rrR0H5-_X_XdTYD.js +0 -1
- package/dist/console/runtime/public/console/chunks/nextflow-CgUAk9iA-CTMUe4Ca.js +0 -1
- package/dist/console/runtime/public/console/chunks/nextflow-groovy-CdFFX-gF-DJMQeKeT.js +0 -1
- package/dist/console/runtime/public/console/chunks/nginx-Q-E8IJvs-DiQO9reH.js +0 -1
- package/dist/console/runtime/public/console/chunks/night-owl-CqqbiLON-DhmEMT88.js +0 -1
- package/dist/console/runtime/public/console/chunks/night-owl-DhmEMT88.js +0 -1
- package/dist/console/runtime/public/console/chunks/night-owl-light-B9vYgGRt-eJ-hLW7d.js +0 -1
- package/dist/console/runtime/public/console/chunks/night-owl-light-eJ-hLW7d.js +0 -1
- package/dist/console/runtime/public/console/chunks/nim-CNcTuF14-W9Ucwkhx.js +0 -1
- package/dist/console/runtime/public/console/chunks/nix-Bm1Ax-Z3-IvuFDN5E.js +0 -1
- package/dist/console/runtime/public/console/chunks/nord-BZ9DVmcN-Cb4Vim4T.js +0 -1
- package/dist/console/runtime/public/console/chunks/nord-Cb4Vim4T.js +0 -1
- package/dist/console/runtime/public/console/chunks/nushell-r7hBzeS_-DcLAeLz5.js +0 -1
- package/dist/console/runtime/public/console/chunks/objective-c-6dJF64Dt-D1A_Heim.js +0 -1
- package/dist/console/runtime/public/console/chunks/objective-cpp-_ooRQ-PY-BsSzOQcm.js +0 -1
- package/dist/console/runtime/public/console/chunks/ocaml-vm1Y8An6-O90oeIOV.js +0 -1
- package/dist/console/runtime/public/console/chunks/odin-vjOJSyfV-B1RWQWA5.js +0 -1
- package/dist/console/runtime/public/console/chunks/one-dark-pro-CLwyXe_n.js +0 -1
- package/dist/console/runtime/public/console/chunks/one-dark-pro-Ev8UPkf4-CLwyXe_n.js +0 -1
- package/dist/console/runtime/public/console/chunks/one-light-CzxBC38_-D7Lr4KcI.js +0 -1
- package/dist/console/runtime/public/console/chunks/one-light-D7Lr4KcI.js +0 -1
- package/dist/console/runtime/public/console/chunks/openscad-jn-f1Ocl-BUDT5pXO.js +0 -1
- package/dist/console/runtime/public/console/chunks/pascal-D8-gNZ2I-4ZHwLPI5.js +0 -1
- package/dist/console/runtime/public/console/chunks/perl-Bbgb6Twx-CHGXAzGq.js +0 -1
- package/dist/console/runtime/public/console/chunks/php-CBOR45_G-D5pyod9R.js +0 -1
- package/dist/console/runtime/public/console/chunks/php-J5BBb-PR.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-code-view-DYpF5M8R-BiohFcCD.js +0 -1511
- package/dist/console/runtime/public/console/chunks/pierre-dark-DDWDl8g6-CpLgRqie.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-dark-protanopia-deuteranopia-C35UMuvO-B35FxJx-.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-dark-soft-Bb-4-biO-kZQmAZld.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-dark-tritanopia-CIJISGWF-CpjhbsIL.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-dark-vibrant-8oZzB3gw-CpQYzh95.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-light-CWhW4NrH-CoaEpmwp.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-light-protanopia-deuteranopia-u0U7N4Hn-0fSaH845.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-light-soft-BCU6fuhO-lWLdNTOI.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-light-tritanopia-3c8Yx3co-CEbqgOJL.js +0 -1
- package/dist/console/runtime/public/console/chunks/pierre-light-vibrant-Cwh332o_-D80Fkn33.js +0 -1
- package/dist/console/runtime/public/console/chunks/pkl-C7lWzykI-ot-7Btpt.js +0 -1
- package/dist/console/runtime/public/console/chunks/plastic-BGkJ2das-DQwYfKfQ.js +0 -1
- package/dist/console/runtime/public/console/chunks/plastic-DQwYfKfQ.js +0 -1
- package/dist/console/runtime/public/console/chunks/plsql-DCNXypXO-DGHpHOYJ.js +0 -1
- package/dist/console/runtime/public/console/chunks/po-IjpR1yHO-BiJDBrnU.js +0 -1
- package/dist/console/runtime/public/console/chunks/poimandres-CpnMgZuc-DRFjx7u4.js +0 -1
- package/dist/console/runtime/public/console/chunks/poimandres-DRFjx7u4.js +0 -1
- package/dist/console/runtime/public/console/chunks/polar-4pN1JrJ8-C7UOKdEL.js +0 -1
- package/dist/console/runtime/public/console/chunks/postcss-BXeXVLqQ.js +0 -1
- package/dist/console/runtime/public/console/chunks/postcss-D1gKt4z_-BXeXVLqQ.js +0 -1
- package/dist/console/runtime/public/console/chunks/powerquery-SrvS_NBM-DNMTfnFr.js +0 -1
- package/dist/console/runtime/public/console/chunks/powershell-CpTLv_ai-DshXNtvi.js +0 -1
- package/dist/console/runtime/public/console/chunks/prisma-BWfa4-tI-BsRQq5mF.js +0 -1
- package/dist/console/runtime/public/console/chunks/prolog-Bacii3Ue-iXnhIJG7.js +0 -1
- package/dist/console/runtime/public/console/chunks/proto-ClkOcAW0-DB4EqR-F.js +0 -1
- package/dist/console/runtime/public/console/chunks/pug-CfJcGJfh.js +0 -1
- package/dist/console/runtime/public/console/chunks/pug-Cn_U_o_I-Cw4zFEpZ.js +0 -1
- package/dist/console/runtime/public/console/chunks/puppet-CQlPp728-CDv2pdJW.js +0 -1
- package/dist/console/runtime/public/console/chunks/purescript-CLpaGMbw-9MfHhQsQ.js +0 -1
- package/dist/console/runtime/public/console/chunks/python-BjnOIxPe-gzcpVVnB.js +0 -1
- package/dist/console/runtime/public/console/chunks/python-gzcpVVnB.js +0 -1
- package/dist/console/runtime/public/console/chunks/qml-DNlrbxJT-B_IzAFFX.js +0 -1
- package/dist/console/runtime/public/console/chunks/qmldir-Dz8ttxjf-DCQb3MpD.js +0 -1
- package/dist/console/runtime/public/console/chunks/qss-Iltvkn1C-Fe1Jh2GI.js +0 -1
- package/dist/console/runtime/public/console/chunks/r-Dzep-lPg.js +0 -1
- package/dist/console/runtime/public/console/chunks/r-VqTZMNY_-EnO4GoeC.js +0 -1
- package/dist/console/runtime/public/console/chunks/racket-DRv7j6nv-DcIDlBhZ.js +0 -1
- package/dist/console/runtime/public/console/chunks/raku-DI9yGpeW-B3gFvitq.js +0 -1
- package/dist/console/runtime/public/console/chunks/razor-Bw2un3e8-CtGvw0jo.js +0 -1
- package/dist/console/runtime/public/console/chunks/red-CJ3rzSJv.js +0 -1
- package/dist/console/runtime/public/console/chunks/red-EHiRGXSv-CJ3rzSJv.js +0 -1
- package/dist/console/runtime/public/console/chunks/reg-DpJf71oO-CRGYupPL.js +0 -1
- package/dist/console/runtime/public/console/chunks/regexp-5HbFqwky-C3xQXL6t.js +0 -1
- package/dist/console/runtime/public/console/chunks/regexp-R83qIIH_.js +0 -1
- package/dist/console/runtime/public/console/chunks/rel-BT0iIKKw-BtDbiS_P.js +0 -1
- package/dist/console/runtime/public/console/chunks/riscv-CvzikGLb-Ckw8ddFX.js +0 -1
- package/dist/console/runtime/public/console/chunks/ron-DzAo6FTJ-VUp2lXgN.js +0 -1
- package/dist/console/runtime/public/console/chunks/rose-pine-BthvhNj6.js +0 -1
- package/dist/console/runtime/public/console/chunks/rose-pine-DTI-z1Qp-BthvhNj6.js +0 -1
- package/dist/console/runtime/public/console/chunks/rose-pine-dawn-BIiGXpWs-Dg85fqjY.js +0 -1
- package/dist/console/runtime/public/console/chunks/rose-pine-dawn-Dg85fqjY.js +0 -1
- package/dist/console/runtime/public/console/chunks/rose-pine-moon-DU4wt90U-hon4tzzS.js +0 -1
- package/dist/console/runtime/public/console/chunks/rose-pine-moon-hon4tzzS.js +0 -1
- package/dist/console/runtime/public/console/chunks/rosmsg-CyYq6XdT-CAekHB0j.js +0 -1
- package/dist/console/runtime/public/console/chunks/rst-BZPDb03W-BDIwqmQR.js +0 -1
- package/dist/console/runtime/public/console/chunks/ruby-BbVp0_gQ-BUOn3oxT.js +0 -1
- package/dist/console/runtime/public/console/chunks/rust-COBzcmTx-Cfkwpbl8.js +0 -1
- package/dist/console/runtime/public/console/chunks/sas-DSkdG4wF-BE4zxtJ7.js +0 -1
- package/dist/console/runtime/public/console/chunks/sass-DI2zJwx7-DXrisJhu.js +0 -1
- package/dist/console/runtime/public/console/chunks/sass-DXrisJhu.js +0 -1
- package/dist/console/runtime/public/console/chunks/scala-CtSYTRYT-DKOlJaKm.js +0 -1
- package/dist/console/runtime/public/console/chunks/scheme-D3A2QBtM-DQCgrYNe.js +0 -1
- package/dist/console/runtime/public/console/chunks/scss-BQ7uffpQ-D2aPazKS.js +0 -1
- package/dist/console/runtime/public/console/chunks/scss-DTeHeodw.js +0 -1
- package/dist/console/runtime/public/console/chunks/sdbl-CdQg5gu1-bTVj8UrX.js +0 -1
- package/dist/console/runtime/public/console/chunks/shaderlab-CWP9wBCf-C6U2tjWC.js +0 -1
- package/dist/console/runtime/public/console/chunks/shellscript-B42c0JAn-D5OxpxEd.js +0 -1
- package/dist/console/runtime/public/console/chunks/shellscript-CLZ0U2zV.js +0 -1
- package/dist/console/runtime/public/console/chunks/shellsession-Oc9-NqAv-C1K_F4Is.js +0 -1
- package/dist/console/runtime/public/console/chunks/slack-dark-BS2AOOdo-DnToyrRv.js +0 -1
- package/dist/console/runtime/public/console/chunks/slack-dark-DnToyrRv.js +0 -1
- package/dist/console/runtime/public/console/chunks/slack-ochin-B2OO5cIa.js +0 -1
- package/dist/console/runtime/public/console/chunks/slack-ochin-Nc7Cucwk-B2OO5cIa.js +0 -1
- package/dist/console/runtime/public/console/chunks/smalltalk-BEQkVl4K-B16xEiuN.js +0 -1
- package/dist/console/runtime/public/console/chunks/snazzy-light-4G7pJPwS.js +0 -1
- package/dist/console/runtime/public/console/chunks/snazzy-light-C2ghKZXY-4G7pJPwS.js +0 -1
- package/dist/console/runtime/public/console/chunks/solarized-dark-DV17i1UV.js +0 -1
- package/dist/console/runtime/public/console/chunks/solarized-dark-UHgjRWhr-DV17i1UV.js +0 -1
- package/dist/console/runtime/public/console/chunks/solarized-light-B-Zcwve2-DSh2HLQt.js +0 -1
- package/dist/console/runtime/public/console/chunks/solarized-light-DSh2HLQt.js +0 -1
- package/dist/console/runtime/public/console/chunks/solidity-lB9VjfB9-CKzVLygQ.js +0 -1
- package/dist/console/runtime/public/console/chunks/soy-tgh9u9aW-Cm_LtJoW.js +0 -1
- package/dist/console/runtime/public/console/chunks/sparql-B4t0ZbEe-CXgkFCv7.js +0 -1
- package/dist/console/runtime/public/console/chunks/splunk-xP_ZjUH2-BC2Px7Mm.js +0 -1
- package/dist/console/runtime/public/console/chunks/sql-C7n9abzK.js +0 -1
- package/dist/console/runtime/public/console/chunks/sql-CrPlEQn4-COghB3-E.js +0 -1
- package/dist/console/runtime/public/console/chunks/ssh-config-DXFPABYp-BgfXC-Er.js +0 -1
- package/dist/console/runtime/public/console/chunks/stata-D_KqT8cj-oQQpG6t_.js +0 -1
- package/dist/console/runtime/public/console/chunks/stylus-B6D30XZt.js +0 -1
- package/dist/console/runtime/public/console/chunks/stylus-ZZDn1yUO-B6D30XZt.js +0 -1
- package/dist/console/runtime/public/console/chunks/surrealql-C0KhgoyZ-DqXNFH_A.js +0 -1
- package/dist/console/runtime/public/console/chunks/svelte-CRpWSJAY.js +0 -1
- package/dist/console/runtime/public/console/chunks/svelte-DuHT0xxw-Bs0TxuUS.js +0 -1
- package/dist/console/runtime/public/console/chunks/swift-BTPQlRLK-DonLKvLd.js +0 -1
- package/dist/console/runtime/public/console/chunks/synthwave-84-CPtGYwOz-nFMaYfgc.js +0 -1
- package/dist/console/runtime/public/console/chunks/synthwave-84-nFMaYfgc.js +0 -1
- package/dist/console/runtime/public/console/chunks/system-verilog-BEoxaBuU-DJ5XKQeo.js +0 -1
- package/dist/console/runtime/public/console/chunks/systemd-DFbUltlW-BxMlprV5.js +0 -1
- package/dist/console/runtime/public/console/chunks/talonscript-CLxaFu-b-CohzipZa.js +0 -1
- package/dist/console/runtime/public/console/chunks/tasl-_AAbKiWM-DMoTqEGO.js +0 -1
- package/dist/console/runtime/public/console/chunks/tcl-DLe0Tsfm-CZd0xW_V.js +0 -1
- package/dist/console/runtime/public/console/chunks/templ-DF54artD-BPb_zNLV.js +0 -1
- package/dist/console/runtime/public/console/chunks/terraform-v0KN9QQh-DswuEJGm.js +0 -1
- package/dist/console/runtime/public/console/chunks/tex-Bbhb8xAP-9R8lE_en.js +0 -1
- package/dist/console/runtime/public/console/chunks/tokyo-night-BKYoawWu-oM2G3aXe.js +0 -1
- package/dist/console/runtime/public/console/chunks/tokyo-night-oM2G3aXe.js +0 -1
- package/dist/console/runtime/public/console/chunks/toml-B7BHZIqX-CcmNWLt0.js +0 -1
- package/dist/console/runtime/public/console/chunks/ts-tags-DH1AB-Ri-CgEe3BFX.js +0 -1
- package/dist/console/runtime/public/console/chunks/ts-tags-DJjZLMnt.js +0 -1
- package/dist/console/runtime/public/console/chunks/tsv-BorGVq2Z-sltzmVWM.js +0 -1
- package/dist/console/runtime/public/console/chunks/tsx-B7QamQLF.js +0 -1
- package/dist/console/runtime/public/console/chunks/tsx-BR8s1Lhs-DiW36VFk.js +0 -1
- package/dist/console/runtime/public/console/chunks/turtle-BEG5g_eT-ByJddavk.js +0 -1
- package/dist/console/runtime/public/console/chunks/tv-WsfYJXat.js +0 -1
- package/dist/console/runtime/public/console/chunks/twig-DziFF7iU-DLOFbR4k.js +0 -1
- package/dist/console/runtime/public/console/chunks/typescript-D8TR6ff2-CCKRkaRI.js +0 -1
- package/dist/console/runtime/public/console/chunks/typescript-DzLO-qqB.js +0 -1
- package/dist/console/runtime/public/console/chunks/typespec-C_R5TbvO-BRdr0IET.js +0 -1
- package/dist/console/runtime/public/console/chunks/typst-BV9w0z8--DI99ib-x.js +0 -1
- package/dist/console/runtime/public/console/chunks/v-DfbeXLo8-DETTlOr0.js +0 -1
- package/dist/console/runtime/public/console/chunks/vala-BnnASFsX-zf12oZj6.js +0 -1
- package/dist/console/runtime/public/console/chunks/vb-DU29mvss-Djn5o6TS.js +0 -1
- package/dist/console/runtime/public/console/chunks/verilog-BW5U03XW-CiiDBU1e.js +0 -1
- package/dist/console/runtime/public/console/chunks/vesper-ClvmKzqD-DdrHHSXu.js +0 -1
- package/dist/console/runtime/public/console/chunks/vesper-DdrHHSXu.js +0 -1
- package/dist/console/runtime/public/console/chunks/vhdl-Co2XFKY7-BroJfC0k.js +0 -1
- package/dist/console/runtime/public/console/chunks/viml-BReTXeDA-DvXPmvsu.js +0 -1
- package/dist/console/runtime/public/console/chunks/vitesse-black-BY6Qtyq--fwtXNY1n.js +0 -1
- package/dist/console/runtime/public/console/chunks/vitesse-black-fwtXNY1n.js +0 -1
- package/dist/console/runtime/public/console/chunks/vitesse-dark-BT-v_EgR-BZCL-v6S.js +0 -1
- package/dist/console/runtime/public/console/chunks/vitesse-dark-BZCL-v6S.js +0 -1
- package/dist/console/runtime/public/console/chunks/vitesse-light-Box8ZFz6-VbXTXTou.js +0 -1
- package/dist/console/runtime/public/console/chunks/vitesse-light-VbXTXTou.js +0 -1
- package/dist/console/runtime/public/console/chunks/vue-BRy8iDCZ-CL7P9CNz.js +0 -1
- package/dist/console/runtime/public/console/chunks/vue-CQQ6_PvN.js +0 -1
- package/dist/console/runtime/public/console/chunks/vue-html-B24bjO_3-BY2skbNe.js +0 -1
- package/dist/console/runtime/public/console/chunks/vue-html-Ce5SCNOK.js +0 -1
- package/dist/console/runtime/public/console/chunks/vue-vine-DKH1_YEZ.js +0 -1
- package/dist/console/runtime/public/console/chunks/vue-vine-l7O7Mg81-CFWzX3HC.js +0 -1
- package/dist/console/runtime/public/console/chunks/vue.runtime.esm-bundler-COh-O3z7.js +0 -3
- package/dist/console/runtime/public/console/chunks/vyper-C6KGx0YU-CgoNMtux.js +0 -1
- package/dist/console/runtime/public/console/chunks/wasm-BRCjOXGL-BnjxR4X6.js +0 -1
- package/dist/console/runtime/public/console/chunks/wasm-BnjxR4X6.js +0 -1
- package/dist/console/runtime/public/console/chunks/wasm-ByWQv1Qj.js +0 -1
- package/dist/console/runtime/public/console/chunks/wasm-gNIKwGlD-ByWQv1Qj.js +0 -1
- package/dist/console/runtime/public/console/chunks/wenyan-BeysbCrW-C8pVoKbM.js +0 -1
- package/dist/console/runtime/public/console/chunks/wgsl-1s5rV5xS-BsKzXJz4.js +0 -1
- package/dist/console/runtime/public/console/chunks/wgsl-BsKzXJz4.js +0 -1
- package/dist/console/runtime/public/console/chunks/wikitext-wjhjmmzD-ClFFjSW2.js +0 -1
- package/dist/console/runtime/public/console/chunks/wit-CeQiCbz_-DdvCle-K.js +0 -1
- package/dist/console/runtime/public/console/chunks/wit-DdvCle-K.js +0 -1
- package/dist/console/runtime/public/console/chunks/wolfram-CcZPfnLd-DLL8P-h_.js +0 -1
- package/dist/console/runtime/public/console/chunks/xml-CduVPlYa-BZCwbgEk.js +0 -1
- package/dist/console/runtime/public/console/chunks/xml-G-voesMw.js +0 -1
- package/dist/console/runtime/public/console/chunks/xsl-BeH_vLTK-DeKk-5KU.js +0 -1
- package/dist/console/runtime/public/console/chunks/yaml-Cb0uRU1q-CkSC4c4u.js +0 -1
- package/dist/console/runtime/public/console/chunks/yaml-rwi0_p6S.js +0 -1
- package/dist/console/runtime/public/console/chunks/zenscript-BoijL7rl-BnlCZFoB.js +0 -1
- package/dist/console/runtime/public/console/chunks/zig-lTQvxhLD-CMLA9XwU.js +0 -1
- package/dist/console/runtime/public/console/console-Bwq3z75a.css +0 -3
- package/dist/console/runtime/public/console/console-Cl-xrMah.js +0 -1371
- package/dist/console/runtime/server/blob.get.d.ts +0 -25
- package/dist/console/runtime/server/blob.get.js +0 -74
- package/dist/console/runtime/server/devframe.d.ts +0 -13
- package/dist/console/runtime/server/devframe.js +0 -133
- package/dist/console/runtime/server/kv.d.ts +0 -2
- package/dist/console/runtime/server/kv.get.d.ts +0 -24
- package/dist/console/runtime/server/kv.get.js +0 -236
- package/dist/console/runtime/server/kv.js +0 -18
- package/dist/console/runtime/server/page.get.d.ts +0 -6
- package/dist/console/runtime/server/page.get.js +0 -33
- package/dist/database/drizzle.d.ts +0 -16
- package/dist/database/drizzle.js +0 -9
- package/dist/database-CW-WjW4u.d.ts +0 -8
- package/dist/definitions-BHmB22eM.d.ts +0 -7
- package/dist/definitions-CfSmoS5G.d.ts +0 -17
- package/dist/email/server.d.ts +0 -1
- package/dist/email/server.js +0 -2
- package/dist/env/presets.d.ts +0 -1
- package/dist/env/presets.js +0 -2
- package/dist/env/provider.d.ts +0 -1
- package/dist/env/provider.js +0 -2
- package/dist/env/schema.d.ts +0 -1
- package/dist/env/schema.js +0 -2
- package/dist/env/secret.d.ts +0 -1
- package/dist/env/secret.js +0 -2
- package/dist/index-B072hyCd.d.ts +0 -59
- package/dist/internal-12r-XCbk.d.ts +0 -20
- package/dist/internal-DzLLx0iR.js +0 -304
- package/dist/invocations-qwMRTSy7.js +0 -364
- package/dist/kv-DLGscNQ_.d.ts +0 -8
- package/dist/request-DxBwxGnk.js +0 -72
- package/dist/request-NErg_P5m.d.ts +0 -43
- package/dist/runtime/node.d.ts +0 -1
- package/dist/runtime/node.js +0 -2
- package/dist/schedule/runtime/driver.d.ts +0 -1
- package/dist/schedule/runtime/driver.js +0 -2
- package/dist/search.get-ClTCn-mh.js +0 -100
- package/dist/sections-7HoMOIGH.d.ts +0 -9
- package/dist/sections-DVsqeLAF.d.ts +0 -100
- package/dist/server-BFxDhCzA.d.ts +0 -78
- package/dist/shell/providers/cloudflare.d.ts +0 -1
- package/dist/shell/providers/cloudflare.js +0 -2
- package/dist/source/content/client.d.ts +0 -1
- package/dist/source/content/client.js +0 -2
- package/dist/source/content.d.ts +0 -1
- package/dist/source/content.js +0 -2
- package/dist/source/file.d.ts +0 -1
- package/dist/source/file.js +0 -2
- package/dist/source/github.d.ts +0 -1
- package/dist/source/github.js +0 -2
- package/dist/source/glob.d.ts +0 -1
- package/dist/source/glob.js +0 -2
- package/dist/source/markdown.d.ts +0 -1
- package/dist/source/markdown.js +0 -2
- package/dist/src-XEJGHDr9.js +0 -5247
- package/dist/types-BucGTJnk.js +0 -168
- package/dist/ui/nuxt.d.ts +0 -3
- package/dist/ui/nuxt.js +0 -3
- package/dist/usage-CoZa_8fx.js +0 -361
- package/dist/workspace/collections/client.d.ts +0 -1
- package/dist/workspace/collections/client.js +0 -2
- package/dist/workspace/collections.d.ts +0 -1
- package/dist/workspace/collections.js +0 -2
- package/dist/workspace/publish.d.ts +0 -1
- package/dist/workspace/publish.js +0 -2
package/dist/nuxt.js
CHANGED
|
@@ -1,42 +1,179 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { a as
|
|
8
|
-
import {
|
|
1
|
+
import { t as invariant } from "./invariant-DolT9EEx.js";
|
|
2
|
+
import { a as isPackageInstalled, c as requireOptionalOwner, i as importOptionalOwner, l as startPackageChecks } from "./optional-owners-Crm6kVS5.js";
|
|
3
|
+
import { n as isRecord } from "./object-D8pRdprI.js";
|
|
4
|
+
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-C2rjmOlX.js";
|
|
5
|
+
import { n as removeViteHubDevServerFile, r as writeViteHubDevServerFile } from "./cli-DjoDGgT4.js";
|
|
6
|
+
import { D as resolveConsoleSectionIds, v as insertConsoleSection } from "./sections-D6AM5Gy5.js";
|
|
7
|
+
import { $ as defaultDatabaseD1Binding, A as assertAgentInvocationsRetention, B as redisDriverSpecifier, C as discoverConsoleEntrySections, D as cloudflareEmailDevShimSource, E as staleChunkReloadPluginName, F as disabledKVConfigModule, G as hostFromNitroPreset, H as markCmsPresetFeaturesResolved, I as disabledRedisDriver, J as resolveDeploymentPlan, K as normalizeNitroPreset, L as disabledUpstashDriver, M as defaultJournalNeedsLibsql, N as writeAgentInvocationsNitroPlugin, O as cloudflareWorkersDevShimSource, P as generatedModules, Q as agentJournalStateUrl, R as hasRedisStore, S as consoleDocumentEditorSectionIds, T as installStaleChunkReloadNuxt, U as resolveCmsPresetFeatures, V as upstashDriverSpecifier, X as nitroCacheBypass, Y as writeFileIfChanged, Z as describeDeploymentPlanOutput, _ as serializeConsoleRefresh, a as assertConsoleAccess, at as ownerModules, b as discoverConsoleBuildCatalog, c as consoleOperationContributions, ct as VITEHUB_APP_BASE_URL, d as resolveConsoleOptions, dt as VITEHUB_PREPARE, et as withComments, f as resolveGeneratedConsolePlugin, ft as VITEHUB_PROJECT_ROOT, g as addConsoleRpcHandler, gt as resolveViteHubProjectRoot, h as addConsoleAppRoutes, ht as resolveNuxtServerDirs, i as cloudflareExportConditions, it as hasSyncDirectory, j as assertAgentInvocationsUrl, k as VITEHUB_AGENT_JOURNAL_D1, l as generatedConsolePluginRegistration, lt as VITEHUB_GENERATED_ROOT, m as consoleOperationFeatures, mt as getResolvedFeatureOptions, n as viteHubPlugins, nt as withDataDir, o as assertConsoleProductionAuth, ot as isIncludedNitroPlugin, p as consoleDevAccessNotice, pt as VITEHUB_SERVER_DIRS, q as resolveBuildHost, r as installBrowserErrorsNuxt, rt as isDefaultAgentJournal, s as consoleInvocationRootPlugin, t as resolveSandboxTaskDriver, tt as withConnectionsDatabase, u as resolveConsoleAccessBuild, ut as VITEHUB_NITRO_CONFIG_CONTEXT, v as writeConsoleNitroPlugin, w as isConsoleContributedSectionId, x as consoleContributedSections, y as resolveConsoleProjectName, z as hasUpstashStore } from "./plugins-DQ8pF-38.js";
|
|
8
|
+
import { n as addViteHubDevPeerUpgradeSigner, t as addViteHubDevPeerDevHandler } from "./dev-peer-am78OsHH.js";
|
|
9
|
+
import { n as installConsoleProjectName, r as installConsoleSections } from "./setup-C-5nB7aY.js";
|
|
10
|
+
import { t as resolveViteHubServerImports } from "./nuxt-server-imports-Lnaf5Fe-.js";
|
|
11
|
+
import { n as assertNoRemovedViteHubOptions } from "./version-DDRL_OYz.js";
|
|
12
|
+
import { findPackageJSON } from "node:module";
|
|
13
|
+
import { dirname, extname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
14
|
+
import { existsSync, readFileSync, readdirSync, realpathSync } from "node:fs";
|
|
9
15
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
16
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
17
|
+
import * as v from "valibot";
|
|
18
|
+
import { mergeGeneratedSourceNitroConfig } from "@vite-hub/source/vite";
|
|
10
19
|
import { mergeConfig } from "vite";
|
|
11
|
-
import { resolveAuthViteConfig } from "@vite-hub/auth/vite";
|
|
12
|
-
import { resolveBlobViteConfig } from "@vite-hub/blob/vite";
|
|
13
|
-
import { resolveEmailTemplateModulePath } from "@vite-hub/email/vite";
|
|
14
20
|
import { createEnvImportAliases } from "@vite-hub/env/vite";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
|
|
21
|
+
import { nuxtPageRoutes } from "@vite-hub/bundle/vite";
|
|
22
|
+
import { parseJSONC } from "confbox/jsonc";
|
|
23
|
+
import { parseTOML } from "confbox/toml";
|
|
24
|
+
import { findNearestFile } from "pkg-types";
|
|
25
|
+
//#region src/internal/nitro-optional-peers.ts
|
|
26
|
+
const manifestSchema = v.object({
|
|
27
|
+
optionalDependencies: v.optional(v.record(v.string(), v.string())),
|
|
28
|
+
peerDependenciesMeta: v.optional(v.record(v.string(), v.object({ optional: v.optional(v.boolean()) })))
|
|
29
|
+
});
|
|
30
|
+
/** Honor each importing package's optional dependencies before Nitro rejects unresolved Worker imports. */
|
|
31
|
+
function nitroOptionalPeers(config = {}) {
|
|
32
|
+
const manifests = /* @__PURE__ */ new Map();
|
|
33
|
+
return {
|
|
34
|
+
name: "vite-hub/nitro-optional-peers",
|
|
35
|
+
async resolveId(source, importer, options) {
|
|
36
|
+
if (!importer || !isAbsolute(importer) && !importer.startsWith("file://") || /^[./#\0]|:/.test(source)) return;
|
|
37
|
+
if (config.alias && Object.keys(config.alias).some((alias) => source === alias || source.startsWith(`${alias}/`))) return;
|
|
38
|
+
const packageName = source.startsWith("@") ? source.split("/").slice(0, 2).join("/") : source.split("/")[0];
|
|
39
|
+
const parent = importer.startsWith("file://") ? importer : pathToFileURL(importer).href;
|
|
40
|
+
let owner;
|
|
41
|
+
try {
|
|
42
|
+
owner = findPackageJSON(parent);
|
|
43
|
+
} catch {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (!owner || !/[\\/]package\.json$/.test(owner)) return;
|
|
47
|
+
let optional = manifests.get(owner);
|
|
48
|
+
if (!optional) {
|
|
49
|
+
const input = JSON.parse(readFileSync(owner, "utf8"));
|
|
50
|
+
const manifest = v.parse(manifestSchema, input);
|
|
51
|
+
optional = /* @__PURE__ */ new Set([...Object.keys(manifest.optionalDependencies ?? {}), ...Object.entries(manifest.peerDependenciesMeta ?? {}).filter(([, metadata]) => metadata.optional).map(([name]) => name)]);
|
|
52
|
+
manifests.set(owner, optional);
|
|
53
|
+
}
|
|
54
|
+
if (!optional.has(packageName)) return;
|
|
55
|
+
try {
|
|
56
|
+
findPackageJSON(`${packageName}/package.json`, parent);
|
|
57
|
+
} catch (error) {
|
|
58
|
+
if (!(error instanceof Error && "code" in error && error.code === "ERR_MODULE_NOT_FOUND")) return;
|
|
59
|
+
return await this.resolve(source, importer, {
|
|
60
|
+
...options,
|
|
61
|
+
skipSelf: true
|
|
62
|
+
}) ?? {
|
|
63
|
+
id: source,
|
|
64
|
+
external: true
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region src/internal/nuxt-image.ts
|
|
72
|
+
function usesNuxtImage(modules) {
|
|
73
|
+
return (modules ?? []).some((entry) => (Array.isArray(entry) ? entry[0] : entry) === "@nuxt/image");
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Registers the `vitehub` Nuxt Image provider when the app enables `@nuxt/image` and serves a Blob Store. Nuxt reads
|
|
77
|
+
* dependency defaults before any module setup, so the order of `modules` does not matter, and an
|
|
78
|
+
* `image.providers.vitehub` entry in the app config wins. Reads `vitehub.blob` from `nuxt.config.ts` only.
|
|
79
|
+
*/
|
|
80
|
+
function nuxtImageProviderDependency(options) {
|
|
81
|
+
const blob = options.vitehub?.blob;
|
|
82
|
+
if (!blob || blob === true || !blob.serve || !usesNuxtImage(options.modules)) return void 0;
|
|
83
|
+
const serve = blob.serve;
|
|
84
|
+
const route = `/${(serve.route?.trim() || "/api/_vitehub/blob").replace(/^\/+|\/+$/g, "")}`;
|
|
85
|
+
const baseURL = `${(serve.publicBaseUrl?.trim() || options.app?.baseURL || "").replace(/\/+$/, "")}${route}`;
|
|
86
|
+
const sizes = blob.images ? blob.images.sizes : void 0;
|
|
87
|
+
return { "@nuxt/image": {
|
|
88
|
+
defaults: { providers: { vitehub: {
|
|
89
|
+
options: {
|
|
90
|
+
baseURL,
|
|
91
|
+
...sizes ? { imageSizes: sizes } : {}
|
|
92
|
+
},
|
|
93
|
+
provider: "vite-hub/blob/nuxt-image"
|
|
94
|
+
} } },
|
|
95
|
+
optional: true
|
|
96
|
+
} };
|
|
97
|
+
}
|
|
98
|
+
//#endregion
|
|
20
99
|
//#region src/nuxt.ts
|
|
21
|
-
const
|
|
100
|
+
const doctorExtensionEntry = fileURLToPath(new URL("./doctor", import.meta.url));
|
|
22
101
|
const consoleRuntimeRoot = fileURLToPath(new URL("./console/runtime", import.meta.url));
|
|
102
|
+
/** True when the app names a Blob driver or stores, which works on hosts without a default Blob store. */
|
|
103
|
+
function explicitBlobOption(value) {
|
|
104
|
+
return Boolean(value && value !== true && ("driver" in value || "stores" in value));
|
|
105
|
+
}
|
|
23
106
|
function configuredProjectRoot(root, value) {
|
|
24
107
|
return value && typeof value === "object" && "projectRoot" in value && typeof value.projectRoot === "string" ? resolve(root, value.projectRoot) : void 0;
|
|
25
108
|
}
|
|
26
109
|
function configuredProjectRootOption(value) {
|
|
27
110
|
return value && typeof value === "object" && "projectRoot" in value && typeof value.projectRoot === "string" ? value.projectRoot : void 0;
|
|
28
111
|
}
|
|
112
|
+
/** The project's wrangler config, found and parsed the way Nitro's Cloudflare preset does. */
|
|
113
|
+
async function readProjectWranglerConfig(rootDir) {
|
|
114
|
+
const configPath = await findNearestFile([
|
|
115
|
+
"wrangler.json",
|
|
116
|
+
"wrangler.jsonc",
|
|
117
|
+
"wrangler.toml"
|
|
118
|
+
], { startingFrom: rootDir }).catch(() => void 0);
|
|
119
|
+
if (!configPath) return void 0;
|
|
120
|
+
const text = await readFile(configPath, "utf8");
|
|
121
|
+
const extension = extname(configPath);
|
|
122
|
+
const config = extension === ".toml" ? parseTOML(text) : extension === ".jsonc" ? parseJSONC(text) : JSON.parse(text);
|
|
123
|
+
return isRecord(config) ? config : void 0;
|
|
124
|
+
}
|
|
125
|
+
async function writeCloudflareAssetsMiddleware(projectRoot) {
|
|
126
|
+
const file = join(projectRoot, ".vitehub/nitro/cloudflare-assets.mjs");
|
|
127
|
+
await writeFileIfChanged(file, [
|
|
128
|
+
"import { defineHandler } from \"nitro\"",
|
|
129
|
+
"export default defineHandler(async event => {",
|
|
130
|
+
" const request = event.req",
|
|
131
|
+
" if (request.method !== \"GET\" && request.method !== \"HEAD\") return",
|
|
132
|
+
" const assets = request.runtime?.cloudflare?.env.ASSETS",
|
|
133
|
+
" if (!assets) return",
|
|
134
|
+
" const response = await assets.fetch(request)",
|
|
135
|
+
" if (response.status !== 404) return response",
|
|
136
|
+
"})",
|
|
137
|
+
""
|
|
138
|
+
].join("\n"));
|
|
139
|
+
return file;
|
|
140
|
+
}
|
|
29
141
|
function configuredScanDirs(value) {
|
|
30
142
|
return value && typeof value === "object" && "scanDirs" in value && Array.isArray(value.scanDirs) ? value.scanDirs.filter((entry) => typeof entry === "string") : void 0;
|
|
31
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* Tell `vitehub` commands where `nuxt dev` listens: `.vitehub/dev-server.json` in the root, removed when Nuxt closes.
|
|
146
|
+
* Nuxt runs Vite in middleware mode, so the Vite plugin cannot see the listener.
|
|
147
|
+
*/
|
|
148
|
+
function publishNuxtDevServer(nuxt) {
|
|
149
|
+
const root = resolve(nuxt.options.rootDir || process.cwd());
|
|
150
|
+
nuxt.hook?.("listen", (_server, listener) => {
|
|
151
|
+
try {
|
|
152
|
+
const url = new URL(listener.url);
|
|
153
|
+
url.pathname = nuxt.options.app?.baseURL || "/";
|
|
154
|
+
writeViteHubDevServerFile(root, {
|
|
155
|
+
root,
|
|
156
|
+
url: url.href
|
|
157
|
+
});
|
|
158
|
+
} catch {}
|
|
159
|
+
});
|
|
160
|
+
nuxt.hook?.("close", async () => {
|
|
161
|
+
try {
|
|
162
|
+
removeViteHubDevServerFile(root);
|
|
163
|
+
} catch {}
|
|
164
|
+
});
|
|
165
|
+
}
|
|
32
166
|
const agentVueComposables = [
|
|
33
167
|
"useAgent",
|
|
34
168
|
"useAgentInvocation",
|
|
35
169
|
"useAgentInvocations",
|
|
36
170
|
"useChat"
|
|
37
171
|
];
|
|
172
|
+
const h3RuntimeRoot = dirname(fileURLToPath(import.meta.resolve("h3/package.json")));
|
|
38
173
|
const cloudflareTypes = fileURLToPath(new URL("./cloudflare-types.d.ts", import.meta.url));
|
|
174
|
+
const cloudflareWorkersDeclaration = fileURLToPath(new URL("./cloudflare-workers.d.ts", import.meta.url));
|
|
39
175
|
function emailTemplateResolver(root) {
|
|
176
|
+
const { resolveEmailTemplateModulePath } = requireOptionalOwner(ownerModules.emailVite, "email");
|
|
40
177
|
return {
|
|
41
178
|
name: "vite-hub/nuxt-email-templates",
|
|
42
179
|
resolveId: (id) => resolveEmailTemplateModulePath(root, id)
|
|
@@ -47,40 +184,122 @@ function installEmailTemplateResolver(config, root) {
|
|
|
47
184
|
const plugins = rollupConfig.plugins ??= [];
|
|
48
185
|
if (!plugins.some((plugin) => plugin.name === "vite-hub/nuxt-email-templates")) plugins.push(emailTemplateResolver(root));
|
|
49
186
|
}
|
|
50
|
-
function
|
|
187
|
+
function isExternalId(external, id, importer, isResolved) {
|
|
188
|
+
if (typeof external === "function") return Boolean(external(id, importer, isResolved));
|
|
189
|
+
if (external === void 0) return false;
|
|
190
|
+
return [external].flat().some((entry) => typeof entry === "string" ? entry === id : entry.test(id));
|
|
191
|
+
}
|
|
192
|
+
/** Node stubs for the Cloudflare runtime modules that ViteHub's generated server code imports. */
|
|
193
|
+
const cloudflareDevShims = {
|
|
194
|
+
"cloudflare:email": {
|
|
195
|
+
file: "cloudflare-email.dev.mjs",
|
|
196
|
+
source: cloudflareEmailDevShimSource
|
|
197
|
+
},
|
|
198
|
+
"cloudflare:workers": {
|
|
199
|
+
file: "cloudflare-workers.dev.mjs",
|
|
200
|
+
source: cloudflareWorkersDevShimSource
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
function isCloudflareDevShim(id) {
|
|
204
|
+
return Object.hasOwn(cloudflareDevShims, id);
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* `nuxt dev` with the Cloudflare preset runs the server on Node, where ViteHub aliases `cloudflare:workers` and
|
|
208
|
+
* `cloudflare:email` to Node stubs. ViteHub's generated Nitro plugins list those schemes as external for the Worker
|
|
209
|
+
* build, and the bundler asks `external` before it applies aliases, so the dev bundle would keep an import that Node
|
|
210
|
+
* cannot load.
|
|
211
|
+
*/
|
|
212
|
+
const nitroCloudflareWorkersDev = {
|
|
213
|
+
name: "vite-hub/nitro-cloudflare-workers-dev",
|
|
214
|
+
options(options) {
|
|
215
|
+
const external = options.external;
|
|
216
|
+
return {
|
|
217
|
+
...options,
|
|
218
|
+
external: (id, importer, isResolved) => isCloudflareDevShim(id) ? false : isExternalId(external, id, importer, isResolved)
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Keep ViteHub's own `h3` imports on H3 2. Nuxt's Nitro v2 compatibility layer resolves `h3` to an H3 1 shim for
|
|
224
|
+
* server code that it marks as legacy.
|
|
225
|
+
*/
|
|
226
|
+
function nitroViteHubH3(generatedRoots) {
|
|
227
|
+
const roots = generatedRoots.map((root) => `${root.replaceAll("\\", "/").replace(/\/+$/, "")}/`);
|
|
228
|
+
const owners = /* @__PURE__ */ new Map();
|
|
51
229
|
return {
|
|
52
|
-
name: "vite-hub/
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
230
|
+
name: "vite-hub/nitro-h3",
|
|
231
|
+
resolveId(id, importer) {
|
|
232
|
+
if (!/^h3(?:\/|$)/.test(id) || !importer) return;
|
|
233
|
+
const path = importer.split("?", 1)[0].replaceAll("\\", "/");
|
|
234
|
+
if (!roots.some((root) => path.startsWith(root))) {
|
|
235
|
+
const directory = dirname(path);
|
|
236
|
+
let owned = owners.get(directory);
|
|
237
|
+
if (owned === void 0) {
|
|
238
|
+
try {
|
|
239
|
+
const manifest = findPackageJSON(pathToFileURL(path), import.meta.url);
|
|
240
|
+
const pkg = manifest ? JSON.parse(readFileSync(manifest, "utf8")) : void 0;
|
|
241
|
+
const hostH3 = isRecord(pkg) && isRecord(pkg.devDependencies) && "h3" in pkg.devDependencies && !(isRecord(pkg.dependencies) && "h3" in pkg.dependencies);
|
|
242
|
+
owned = isRecord(pkg) && !hostH3 && (pkg.name === "vite-hub" || typeof pkg.name === "string" && pkg.name.startsWith("@vite-hub/") || pkg.name === "nitro" && typeof pkg.version === "string" && pkg.version.startsWith("3.") || pkg.name === "h3" && typeof pkg.version === "string" && pkg.version.startsWith("2."));
|
|
243
|
+
} catch {
|
|
244
|
+
owned = false;
|
|
245
|
+
}
|
|
246
|
+
owners.set(directory, owned);
|
|
247
|
+
}
|
|
248
|
+
if (!owned) return;
|
|
249
|
+
}
|
|
250
|
+
return fileURLToPath(import.meta.resolve(id));
|
|
67
251
|
}
|
|
68
252
|
};
|
|
69
253
|
}
|
|
254
|
+
/** Node development uses request bindings without importing the production Cloudflare runtime. */
|
|
255
|
+
async function writeCloudflareDevShims(buildDir, alias) {
|
|
256
|
+
for (const [id, shim] of Object.entries(cloudflareDevShims)) {
|
|
257
|
+
if (alias[id] !== void 0) continue;
|
|
258
|
+
const file = join(buildDir, "vitehub", shim.file);
|
|
259
|
+
await writeFileIfChanged(file, shim.source);
|
|
260
|
+
alias[id] = file;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
function normalizeGeneratedNitroPlugins(config, root) {
|
|
264
|
+
if (!Array.isArray(config.plugins)) return;
|
|
265
|
+
config.plugins = config.plugins.map((plugin) => typeof plugin === "string" && /^\.vitehub[\\/]/.test(plugin) && !isAbsolute(plugin) ? resolve(root, plugin) : plugin);
|
|
266
|
+
}
|
|
267
|
+
/** Put these plugins before Nitro's own resolvers, so they see generated and cache imports first. */
|
|
268
|
+
function installNitroBuildPlugins(config, generatedRoots, dev = false, sections = []) {
|
|
269
|
+
const rollupConfig = config.rollupConfig ??= {};
|
|
270
|
+
const plugins = rollupConfig.plugins ??= [];
|
|
271
|
+
for (const plugin of [
|
|
272
|
+
nitroCacheBypass(),
|
|
273
|
+
nitroViteHubH3(generatedRoots),
|
|
274
|
+
nitroOptionalPeers(config),
|
|
275
|
+
consoleOperationFeatures(sections),
|
|
276
|
+
...dev ? [nitroCloudflareWorkersDev] : []
|
|
277
|
+
]) if (!plugins.some((candidate) => candidate.name === plugin.name)) plugins.unshift(plugin);
|
|
278
|
+
}
|
|
70
279
|
function pluginOptionHasName(option, name) {
|
|
71
280
|
if (Array.isArray(option)) return option.some((candidate) => pluginOptionHasName(candidate, name));
|
|
72
281
|
return Boolean(option && Reflect.get(Object(option), "name") === name);
|
|
73
282
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
283
|
+
const nitroRuntimeResolverNames = /* @__PURE__ */ new Set([
|
|
284
|
+
"@vite-hub/auth/vite",
|
|
285
|
+
"@vite-hub/blob/vite",
|
|
286
|
+
"@vite-hub/browser/vite",
|
|
287
|
+
"@vite-hub/email/vite",
|
|
288
|
+
"@vite-hub/kv/vite",
|
|
289
|
+
"@vite-hub/markdown-template/vite",
|
|
290
|
+
"@vite-hub/realtime/vite",
|
|
291
|
+
"vite-hub/optional-owner-imports",
|
|
292
|
+
"vite-hub/cloudflare-sh-syntax",
|
|
293
|
+
"vite-hub/durability",
|
|
294
|
+
"vite-hub/cloudflare-pkce-challenge",
|
|
295
|
+
"vite-hub/unavailable-services"
|
|
296
|
+
]);
|
|
297
|
+
const nitroConfigResolvedNames = /* @__PURE__ */ new Set([
|
|
298
|
+
...nitroRuntimeResolverNames,
|
|
299
|
+
"@vite-hub/content/vite",
|
|
300
|
+
"@vite-hub/sandbox/task/vite",
|
|
301
|
+
"@vite-hub/workflow/vite"
|
|
302
|
+
]);
|
|
84
303
|
function pluginResolveIdHandler(plugin) {
|
|
85
304
|
if (typeof plugin.resolveId === "function") return plugin.resolveId;
|
|
86
305
|
return plugin.resolveId?.handler;
|
|
@@ -94,33 +313,67 @@ function pluginConfigResolvedHandler(plugin) {
|
|
|
94
313
|
return plugin.configResolved?.handler;
|
|
95
314
|
}
|
|
96
315
|
function asReplayResolvedConfig(config) {
|
|
316
|
+
if (config.resolve?.alias && !Array.isArray(config.resolve.alias)) config.resolve.alias = Object.entries(config.resolve.alias).map(([find, replacement]) => ({
|
|
317
|
+
find,
|
|
318
|
+
replacement
|
|
319
|
+
}));
|
|
97
320
|
return config;
|
|
98
321
|
}
|
|
99
322
|
async function finalizeNitroReplayPlugins(plugins, config) {
|
|
100
|
-
|
|
101
|
-
|
|
323
|
+
const databaseOwners = plugins.filter((plugin) => plugin.name === "@vite-hub/database/vite");
|
|
324
|
+
const consumers = plugins.filter((plugin) => nitroConfigResolvedNames.has(plugin.name));
|
|
325
|
+
for (const plugin of [...databaseOwners, ...consumers]) {
|
|
102
326
|
const configResolved = pluginConfigResolvedHandler(plugin);
|
|
103
327
|
if (!configResolved) continue;
|
|
104
328
|
await configResolved.call({}, asReplayResolvedConfig(config));
|
|
105
329
|
}
|
|
106
330
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
331
|
+
/** Keep the hook's filter, so the bundler skips the replayed hook for ids that the plugin does not own. */
|
|
332
|
+
function withHookFilter(hook, handler) {
|
|
333
|
+
return isRecord(hook) && hook.filter !== void 0 ? {
|
|
334
|
+
filter: hook.filter,
|
|
335
|
+
handler
|
|
336
|
+
} : handler;
|
|
337
|
+
}
|
|
338
|
+
function nitroRuntimeResolver(plugin, config, agentOptions) {
|
|
339
|
+
const resolveId = nitroRuntimeResolverNames.has(plugin.name) ? pluginResolveIdHandler(plugin) : void 0;
|
|
340
|
+
const load = nitroRuntimeResolverNames.has(plugin.name) ? pluginLoadHandler(plugin) : void 0;
|
|
341
|
+
const transformWorkspaceAgent = plugin.vitehub?.agent?.transformWorkspaceAgent;
|
|
342
|
+
const workflowTransform = plugin.name === "@vite-hub/workflow/vite" ? typeof plugin.transform === "function" ? plugin.transform : plugin.transform?.handler : void 0;
|
|
343
|
+
if (!resolveId && !load && !transformWorkspaceAgent && !workflowTransform) return;
|
|
344
|
+
const replayResolveId = resolveId && function(id, importer, options) {
|
|
345
|
+
if (isCloudflareDevShim(id) && isRecord(config.alias) && typeof config.alias[id] === "string") return;
|
|
346
|
+
return resolveId.call(this, id, importer, {
|
|
347
|
+
...options,
|
|
348
|
+
ssr: true
|
|
349
|
+
});
|
|
350
|
+
};
|
|
351
|
+
const replayLoad = load && function(id, options) {
|
|
352
|
+
return load.call(this, id, {
|
|
353
|
+
...options,
|
|
354
|
+
ssr: true
|
|
355
|
+
});
|
|
356
|
+
};
|
|
357
|
+
const replayWorkflowTransform = workflowTransform && function(code, id, options) {
|
|
358
|
+
return workflowTransform.call(this, code, id, {
|
|
359
|
+
moduleType: "js",
|
|
360
|
+
...options,
|
|
361
|
+
ssr: true
|
|
362
|
+
});
|
|
363
|
+
};
|
|
112
364
|
return {
|
|
113
365
|
name: `vite-hub/nuxt-runtime-resolver:${plugin.name}`,
|
|
114
|
-
...
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
...
|
|
118
|
-
|
|
366
|
+
...replayResolveId ? { resolveId: withHookFilter(plugin.resolveId, replayResolveId) } : {},
|
|
367
|
+
...replayLoad ? { load: withHookFilter(plugin.load, replayLoad) } : {},
|
|
368
|
+
...replayWorkflowTransform ? { transform: withHookFilter(plugin.transform, replayWorkflowTransform) } : {},
|
|
369
|
+
...transformWorkspaceAgent ? { transform: {
|
|
370
|
+
filter: { id: /\.[cm]?[jt]s(?:[?#]|$)/i },
|
|
371
|
+
handler: (code, id) => transformWorkspaceAgent(code, id, agentOptions)
|
|
119
372
|
} } : {}
|
|
120
373
|
};
|
|
121
374
|
}
|
|
122
|
-
function installNitroRuntimeResolvers(config, plugins) {
|
|
123
|
-
const resolvers = plugins.map(nitroRuntimeResolver).filter((plugin) => Boolean(plugin));
|
|
375
|
+
function installNitroRuntimeResolvers(config, plugins, agentOptions) {
|
|
376
|
+
const resolvers = plugins.map((plugin) => nitroRuntimeResolver(plugin, config, agentOptions)).filter((plugin) => Boolean(plugin));
|
|
124
377
|
if (!resolvers.length) return;
|
|
125
378
|
const rollupConfig = config.rollupConfig ??= {};
|
|
126
379
|
const configuredPlugins = rollupConfig.plugins;
|
|
@@ -128,11 +381,11 @@ function installNitroRuntimeResolvers(config, plugins) {
|
|
|
128
381
|
rollupConfig.plugins = nitroPlugins;
|
|
129
382
|
for (const resolver of resolvers) if (!nitroPlugins.some((candidate) => pluginOptionHasName(candidate, resolver.name))) nitroPlugins.push(resolver);
|
|
130
383
|
}
|
|
131
|
-
function addTypeScriptDefaults(options, includes, excludes) {
|
|
384
|
+
function addTypeScriptDefaults(options, includes, excludes, key = "tsConfig") {
|
|
132
385
|
const typescript = options.typescript ??= {};
|
|
133
|
-
const tsConfig = typescript
|
|
134
|
-
tsConfig.include = [
|
|
135
|
-
if (excludes.length > 0) tsConfig.exclude = [
|
|
386
|
+
const tsConfig = typescript[key] ??= {};
|
|
387
|
+
tsConfig.include = [.../* @__PURE__ */ new Set([...tsConfig.include ?? [], ...includes])];
|
|
388
|
+
if (excludes.length > 0) tsConfig.exclude = [.../* @__PURE__ */ new Set([...tsConfig.exclude ?? [], ...excludes])];
|
|
136
389
|
}
|
|
137
390
|
function configuredProjectRoots(options, rootDir, viteRoot) {
|
|
138
391
|
return Object.entries(options).filter((entry) => {
|
|
@@ -140,207 +393,157 @@ function configuredProjectRoots(options, rootDir, viteRoot) {
|
|
|
140
393
|
return Boolean(value && typeof value === "object" && "projectRoot" in value && typeof value.projectRoot === "string");
|
|
141
394
|
}).map(([name, value]) => resolve(name === "database" ? rootDir : viteRoot, value.projectRoot));
|
|
142
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* Adds the client plugin that opens `@vite-hub/device`. On a page that the server rendered, it opens the device after
|
|
398
|
+
* hydration, so the first render matches the server HTML. Without server HTML, it opens the device before the app
|
|
399
|
+
* mounts, so the first render shows the stored copies. With Auth, it names the account of `useUserSession()`, and
|
|
400
|
+
* `signOut()` waits until the copies are gone. The plugin goes to `.vitehub/device/`, because Nuxt clears its build
|
|
401
|
+
* directory after modules run.
|
|
402
|
+
*/
|
|
403
|
+
async function addDevicePlugin(nuxt, projectRoot, options) {
|
|
404
|
+
const src = join(projectRoot, ".vitehub/device/nuxt-plugin.mjs");
|
|
405
|
+
const open = `openDevice(${options.version === void 0 ? "" : JSON.stringify({ version: options.version })})`;
|
|
406
|
+
await writeFileIfChanged(src, `import { defineNuxtPlugin, watch } from "#imports"
|
|
407
|
+
import { openDevice, setDeviceAccount } from "vite-hub/device"
|
|
408
|
+
${options.auth ? `import { onSignOut, useUserSession } from "vite-hub/auth/vue"\n` : ""}
|
|
409
|
+
export default defineNuxtPlugin({
|
|
410
|
+
name: "vitehub:device",${options.auth ? `\n dependsOn: ["vitehub:auth"],` : ""}
|
|
411
|
+
async setup(nuxtApp) {${options.auth ? `
|
|
412
|
+
const report = ([error]) => error && console.warn(error)
|
|
413
|
+
const session = useUserSession()
|
|
414
|
+
// A session read that failed names nobody, so an offline reload keeps the copies.
|
|
415
|
+
watch(() => session.ready.value && !session.error.value ? session.user.value?.id ?? null : undefined, (account) => {
|
|
416
|
+
if (account !== undefined) setDeviceAccount(account).then(report)
|
|
417
|
+
}, { immediate: true, flush: "sync" })
|
|
418
|
+
onSignOut(() => setDeviceAccount(null).then(report))` : ""}
|
|
419
|
+
// Hydration does not wait for IndexedDB. A read that hydrates renders what the server rendered either way.
|
|
420
|
+
if (nuxtApp.payload.serverRendered) nuxtApp.hooks.hookOnce("app:suspense:resolve", () => void ${open})
|
|
421
|
+
else await ${open}
|
|
422
|
+
},
|
|
423
|
+
})
|
|
424
|
+
`);
|
|
425
|
+
const plugins = nuxt.options.plugins ??= [];
|
|
426
|
+
if (!plugins.some((plugin) => (typeof plugin === "string" ? plugin : plugin.src) === src)) plugins.push({
|
|
427
|
+
src,
|
|
428
|
+
mode: "client"
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Adds the client plugin that forgets the synced rows after a sign-out of ViteHub Auth, so the next person on the device
|
|
433
|
+
* does not see them. The plugin goes to `.vitehub/sync/`, because Nuxt clears its build directory after modules run.
|
|
434
|
+
*/
|
|
435
|
+
async function addSyncSignOutPlugin(nuxt, projectRoot) {
|
|
436
|
+
const src = join(projectRoot, ".vitehub/sync/nuxt-sign-out.mjs");
|
|
437
|
+
await writeFileIfChanged(src, [
|
|
438
|
+
`import { defineNuxtPlugin } from "#imports"`,
|
|
439
|
+
`import { onSignOut } from "vite-hub/auth/vue"`,
|
|
440
|
+
`import { clearSync } from "vite-hub/sync/client"`,
|
|
441
|
+
``,
|
|
442
|
+
`export default defineNuxtPlugin({`,
|
|
443
|
+
` name: "vite-hub:sync-sign-out",`,
|
|
444
|
+
` setup() {`,
|
|
445
|
+
` onSignOut(() => clearSync())`,
|
|
446
|
+
` },`,
|
|
447
|
+
`})`,
|
|
448
|
+
``
|
|
449
|
+
].join("\n"));
|
|
450
|
+
const plugins = nuxt.options.plugins ??= [];
|
|
451
|
+
if (!plugins.some((plugin) => (typeof plugin === "string" ? plugin : plugin.src) === src)) plugins.push({
|
|
452
|
+
src,
|
|
453
|
+
mode: "client"
|
|
454
|
+
});
|
|
455
|
+
}
|
|
143
456
|
function addVueImports(nuxt, from, names) {
|
|
144
457
|
nuxt.options.imports ??= {};
|
|
145
458
|
const imports = nuxt.options.imports.imports ??= [];
|
|
146
459
|
for (const name of names) {
|
|
147
460
|
const existing = imports.find((entry) => (entry.as ?? entry.name) === name);
|
|
148
|
-
if (existing && existing.from !== from) throw
|
|
461
|
+
if (existing && existing.from !== from) throw viteHubErrorDiagnostics.VITE_HUB_B0008({ message: `[vitehub] Cannot auto-import ${name} from ${from} because it is already configured from ${existing.from}.` });
|
|
149
462
|
if (!existing) imports.push({
|
|
150
463
|
from,
|
|
151
464
|
name
|
|
152
465
|
});
|
|
153
466
|
}
|
|
154
467
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
...blobEnabled ? [`installConsoleBlob(${JSON.stringify(projectRoot)}, vitehubConsoleBlob, ${JSON.stringify(blobStores)})`] : [],
|
|
173
|
-
`installConsoleProjectName(${JSON.stringify(projectRoot)}, ${JSON.stringify(resolveConsoleProjectNameFromRoot(projectRoot))})`,
|
|
174
|
-
...definitionsEnabled ? [`installConsoleDefinitions(${JSON.stringify(projectRoot)}, ${JSON.stringify(catalog.definitions)})`] : [],
|
|
175
|
-
...databaseEnabled ? [`installConsoleDatabase(${JSON.stringify(projectRoot)}, vitehubConsoleDatabases, ${JSON.stringify(catalog.definitions.databases?.map((definition) => definition.name) ?? [])})`] : [],
|
|
176
|
-
...agentsEnabled ? fixture ? [`const vitehubConsoleInvocations = installConsoleFixtureInvocations(${JSON.stringify(projectRoot)}, ${JSON.stringify(fixture)}, ${fixtureSource}, ${JSON.stringify(revision)}, ${JSON.stringify(runtimeBinding)})`, `installConsoleAgentDefinitions([${agents.map((agent, index) => `{ definition: vitehubConsoleAgent${index}, fallbackName: ${JSON.stringify(agent.name)} }`).join(", ")}], { invocations: vitehubConsoleInvocations })`] : [`installConsoleAgentDefinitions([${agents.map((agent, index) => `{ definition: vitehubConsoleAgent${index}, fallbackName: ${JSON.stringify(agent.name)} }`).join(", ")}], { projectRoot: ${JSON.stringify(projectRoot)} })`] : [],
|
|
177
|
-
...kvEnabled ? [`installConsoleKV(${JSON.stringify(projectRoot)}, vitehubConsoleKV, ${JSON.stringify(kvStores)})`] : [],
|
|
178
|
-
"export default function viteHubConsolePlugin() {}",
|
|
179
|
-
""
|
|
180
|
-
].join("\n");
|
|
181
|
-
}
|
|
182
|
-
async function writeConsoleNitroPlugin(file, projectRoot, sections, agents, catalog, blobStores, kvStores, fixture, runtimeBinding, active = () => true) {
|
|
183
|
-
const snapshot = fixture ? readConsoleFixture(fixture) : void 0;
|
|
184
|
-
const identity = createConsoleInvocationsIdentity(projectRoot, fixture, snapshot ? consoleFixtureRevision(snapshot) : void 0, runtimeBinding);
|
|
185
|
-
if (!active()) return identity;
|
|
186
|
-
const contents = renderConsoleNitroPlugin(projectRoot, sections, agents, catalog, blobStores, kvStores, fixture, snapshot, runtimeBinding);
|
|
187
|
-
if (await readFile(file, "utf8").catch(() => void 0) !== contents) {
|
|
188
|
-
await mkdir(resolve(file, ".."), { recursive: true });
|
|
189
|
-
await writeFile(file, contents, "utf8");
|
|
468
|
+
/**
|
|
469
|
+
* Add ViteHub's server helpers to the auto-imports that Nuxt 5 gives to Nitro code. The app turns them off with
|
|
470
|
+
* `nitro: { imports: false }`, which makes `imports` false here, or with `imports: { autoImport: false }`, which Nuxt
|
|
471
|
+
* copies to `imports.autoImport`. A name that another source already configures keeps that source.
|
|
472
|
+
*/
|
|
473
|
+
function addNitroImports(config, entries) {
|
|
474
|
+
if (!isRecord(config.imports) || config.imports.autoImport === false) return;
|
|
475
|
+
const options = config.imports;
|
|
476
|
+
const imports = Array.isArray(options.imports) ? options.imports : options.imports = [];
|
|
477
|
+
const taken = /* @__PURE__ */ new Map();
|
|
478
|
+
for (const entry of imports) taken.set(entry.as ?? entry.name, entry.from);
|
|
479
|
+
for (const preset of Array.isArray(options.presets) ? options.presets : []) {
|
|
480
|
+
if (!isRecord(preset) || typeof preset.from !== "string" || !Array.isArray(preset.imports)) continue;
|
|
481
|
+
for (const item of preset.imports) {
|
|
482
|
+
const name = typeof item === "string" ? item : isRecord(item) ? item.as ?? item.name : void 0;
|
|
483
|
+
if (typeof name === "string") taken.set(name, preset.from);
|
|
484
|
+
}
|
|
190
485
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
const uiModule = (await import("@vite-hub/ui/nuxt")).default;
|
|
196
|
-
if (!(nuxt.options.modules ?? []).some((entry) => {
|
|
197
|
-
const module = Array.isArray(entry) ? entry[0] : entry;
|
|
198
|
-
return module === "@vite-hub/ui/nuxt" || module === "vite-hub/ui/nuxt" || module === uiModule;
|
|
199
|
-
})) await Reflect.apply(uiModule, void 0, [{}, nuxt]);
|
|
200
|
-
const plugin = resolveGeneratedConsolePlugin(projectRoot, fixture, invocationRootState);
|
|
201
|
-
installConsoleSections(projectRoot, sections);
|
|
202
|
-
installConsoleProjectName(projectRoot, resolveConsoleProjectNameFromRoot(projectRoot));
|
|
203
|
-
if (installInvocations && nuxt.options.dev && sections.includes("agents") && !fixture) installConsoleInvocations(projectRoot);
|
|
204
|
-
const routeRules = nuxt.options.routeRules ??= {};
|
|
205
|
-
for (const route of ["/_vitehub", "/_vitehub/**"]) {
|
|
206
|
-
const rule = routeRules[route] ??= {};
|
|
207
|
-
rule.headers = {
|
|
208
|
-
...rule.headers,
|
|
209
|
-
"x-robots-tag": "noindex, nofollow"
|
|
210
|
-
};
|
|
486
|
+
for (const entry of entries) {
|
|
487
|
+
if (taken.has(entry.name)) continue;
|
|
488
|
+
imports.push(entry);
|
|
489
|
+
taken.set(entry.name, entry.from);
|
|
211
490
|
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
name: "vitehub-console-blob",
|
|
245
|
-
path: "/_vitehub/blob"
|
|
246
|
-
}] : [],
|
|
247
|
-
...sections.includes("kv") ? [{
|
|
248
|
-
file: join(consoleRuntimeRoot, "pages/kv.vue"),
|
|
249
|
-
name: "vitehub-console-kv",
|
|
250
|
-
path: "/_vitehub/kv"
|
|
251
|
-
}] : [],
|
|
252
|
-
...sections.includes("databases") ? [{
|
|
253
|
-
file: join(consoleRuntimeRoot, "pages/databases.vue"),
|
|
254
|
-
name: "vitehub-console-databases-schema",
|
|
255
|
-
path: "/_vitehub/databases/:database/schema/diagram"
|
|
256
|
-
}, {
|
|
257
|
-
file: join(consoleRuntimeRoot, "pages/databases.vue"),
|
|
258
|
-
name: "vitehub-console-databases",
|
|
259
|
-
path: "/_vitehub/databases/:database?/:table?"
|
|
260
|
-
}] : [],
|
|
261
|
-
...sections.includes("workflows") ? [{
|
|
262
|
-
file: join(consoleRuntimeRoot, "pages/workflows.vue"),
|
|
263
|
-
name: "vitehub-console-workflows",
|
|
264
|
-
path: "/_vitehub/workflows"
|
|
265
|
-
}] : [],
|
|
266
|
-
...sections.includes("workspaces") ? [{
|
|
267
|
-
file: join(consoleRuntimeRoot, "pages/workspaces.vue"),
|
|
268
|
-
name: "vitehub-console-workspaces",
|
|
269
|
-
path: "/_vitehub/workspaces"
|
|
270
|
-
}] : [],
|
|
271
|
-
...sections.includes("sandboxes") ? [{
|
|
272
|
-
file: join(consoleRuntimeRoot, "pages/sandboxes.vue"),
|
|
273
|
-
name: "vitehub-console-sandboxes",
|
|
274
|
-
path: "/_vitehub/sandboxes"
|
|
275
|
-
}] : [],
|
|
276
|
-
...sections.includes("rate-limits") ? [{
|
|
277
|
-
file: join(consoleRuntimeRoot, "pages/rate-limits.vue"),
|
|
278
|
-
name: "vitehub-console-rate-limits",
|
|
279
|
-
path: "/_vitehub/rate-limits"
|
|
280
|
-
}] : [],
|
|
281
|
-
...sections.includes("queues") ? [{
|
|
282
|
-
file: join(consoleRuntimeRoot, "pages/queues.vue"),
|
|
283
|
-
name: "vitehub-console-queues",
|
|
284
|
-
path: "/_vitehub/queues"
|
|
285
|
-
}] : [],
|
|
286
|
-
...sections.includes("schedules") ? [{
|
|
287
|
-
file: join(consoleRuntimeRoot, "pages/schedules.vue"),
|
|
288
|
-
name: "vitehub-console-schedules",
|
|
289
|
-
path: "/_vitehub/schedules"
|
|
290
|
-
}] : []
|
|
291
|
-
];
|
|
292
|
-
for (const page of additions) if (!pages.some((candidate) => candidate.path === page.path)) pages.push(page);
|
|
293
|
-
});
|
|
491
|
+
}
|
|
492
|
+
async function installConsole({ nuxt, projectRoot, name, sections, discovery, writeGeneratedPlugin, canDiscoverDefinitions, access, writePlugin }) {
|
|
493
|
+
const { discoveryRoot, serverDirs } = discovery;
|
|
494
|
+
const plugin = resolveGeneratedConsolePlugin(projectRoot, nuxt.options.dev === true);
|
|
495
|
+
installConsoleProjectName(projectRoot, resolveConsoleProjectName(projectRoot, name));
|
|
496
|
+
if (nuxt.options.dev && nuxt.hook) {
|
|
497
|
+
Reflect.apply(nuxt.hook, nuxt, ["nitro:init", (nitro) => {
|
|
498
|
+
addViteHubDevPeerDevHandler(nitro.options.devHandlers);
|
|
499
|
+
}]);
|
|
500
|
+
Reflect.apply(nuxt.hook, nuxt, ["listen", (server) => {
|
|
501
|
+
addViteHubDevPeerUpgradeSigner(server);
|
|
502
|
+
const notice = consoleDevAccessNotice(access?.mode, server.address?.());
|
|
503
|
+
if (notice) console[notice.level](notice.message);
|
|
504
|
+
}]);
|
|
505
|
+
}
|
|
506
|
+
const documentEditorSections = (await Promise.all(consoleDocumentEditorSectionIds.map(async (section) => {
|
|
507
|
+
return await consoleContributedSections.get(section)?.documents?.entry({
|
|
508
|
+
discoveryRoot,
|
|
509
|
+
projectRoot,
|
|
510
|
+
serverDirs
|
|
511
|
+
}) ? [section] : [];
|
|
512
|
+
}))).flat();
|
|
513
|
+
const entrySections = (await discoverConsoleEntrySections({
|
|
514
|
+
discoveryRoot,
|
|
515
|
+
projectRoot,
|
|
516
|
+
serverDirs
|
|
517
|
+
})).filter((section) => !sections.includes(section));
|
|
518
|
+
installConsoleSections(projectRoot, [
|
|
519
|
+
...sections,
|
|
520
|
+
...entrySections,
|
|
521
|
+
...documentEditorSections
|
|
522
|
+
]);
|
|
294
523
|
const nitro = nuxt.options.nitro ??= {};
|
|
295
|
-
|
|
524
|
+
addConsoleRpcHandler(nitro, consoleRuntimeRoot);
|
|
525
|
+
addConsoleAppRoutes(nitro, consoleRuntimeRoot);
|
|
296
526
|
const plugins = (nitro.plugins ??= []).filter((candidate) => !generatedConsolePluginRegistration(candidate));
|
|
297
527
|
nitro.plugins = plugins;
|
|
298
528
|
const refreshAgentDefinitions = serializeConsoleRefresh(async () => {
|
|
299
|
-
const discoverySections = canDiscoverDefinitions() ? sections : sections.filter((section) =>
|
|
529
|
+
const discoverySections = canDiscoverDefinitions() ? sections : sections.filter((section) => section !== "databases" && !isConsoleContributedSectionId(section));
|
|
300
530
|
const catalog = await discoverConsoleBuildCatalog({
|
|
301
|
-
...
|
|
302
|
-
discoveryRoot,
|
|
531
|
+
...discovery,
|
|
303
532
|
projectRoot,
|
|
304
|
-
|
|
305
|
-
sections: discoverySections,
|
|
306
|
-
serverDirs,
|
|
307
|
-
workflowDiscoveryRoot
|
|
533
|
+
sections: discoverySections
|
|
308
534
|
});
|
|
309
|
-
|
|
310
|
-
if (invocationRootState) updateConsoleInvocationRootState(invocationRootState, projectRoot, identity);
|
|
535
|
+
await writePlugin(plugin, catalog);
|
|
311
536
|
});
|
|
312
|
-
if (fixture && invocationRootState) {
|
|
313
|
-
configureConsoleFixtureLifecycle(invocationRootState, plugin, refreshAgentDefinitions);
|
|
314
|
-
nuxt.hook?.("close", async () => closeConsoleInvocationRootState(invocationRootState));
|
|
315
|
-
}
|
|
316
537
|
if (writeGeneratedPlugin) await refreshAgentDefinitions();
|
|
317
538
|
if (nuxt.options.dev && writeGeneratedPlugin) {
|
|
318
|
-
if (fixture) nuxt.options.watch = [...new Set([...nuxt.options.watch ?? [], fixture])];
|
|
319
539
|
const hookBuilderWatch = nuxt.hook;
|
|
320
540
|
hookBuilderWatch?.("builder:watch", async (_event, _path) => {
|
|
321
|
-
if (fixture) {
|
|
322
|
-
await refreshAgentDefinitions().catch((error) => {
|
|
323
|
-
console.error(`[vitehub] Could not refresh Console development state: ${error instanceof Error ? error.message : String(error)}`);
|
|
324
|
-
});
|
|
325
|
-
return;
|
|
326
|
-
}
|
|
327
541
|
await refreshAgentDefinitions();
|
|
328
542
|
});
|
|
329
543
|
}
|
|
330
544
|
if (!plugins.includes(plugin)) plugins.push(plugin);
|
|
331
545
|
return plugin;
|
|
332
546
|
}
|
|
333
|
-
function isEnvDeclarationNamespace(value) {
|
|
334
|
-
return Boolean(value && typeof value === "object" && !Array.isArray(value) && value.kind !== "env-variable");
|
|
335
|
-
}
|
|
336
|
-
function mergeEnvDeclarationNamespaces(existing, configured) {
|
|
337
|
-
const merged = { ...existing };
|
|
338
|
-
for (const [key, value] of Object.entries(configured)) {
|
|
339
|
-
const current = merged[key];
|
|
340
|
-
merged[key] = isEnvDeclarationNamespace(current) && isEnvDeclarationNamespace(value) ? mergeEnvDeclarationNamespaces(current, value) : value;
|
|
341
|
-
}
|
|
342
|
-
return merged;
|
|
343
|
-
}
|
|
344
547
|
function agentWorkflowRegistryTransform(plugin) {
|
|
345
548
|
return plugin.vitehub?.agent?.transformWorkflowRegistry;
|
|
346
549
|
}
|
|
@@ -398,14 +601,34 @@ function withoutDeploymentOutput(options) {
|
|
|
398
601
|
return [option];
|
|
399
602
|
});
|
|
400
603
|
}
|
|
604
|
+
/** Vite config hooks can replace an explicit `noExternals` boolean with a package list. Keep the boolean. */
|
|
605
|
+
function restoreNoExternals(config, incomingNoExternals) {
|
|
606
|
+
if (incomingNoExternals !== void 0) config.noExternals = incomingNoExternals;
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* A workspace links ViteHub packages from their source folders, so their real paths do not contain `@vite-hub/`.
|
|
610
|
+
* Nitro loads such a package from Node, which cannot read the generated aliases.
|
|
611
|
+
*/
|
|
612
|
+
function linkedViteHubPackageRoots(projectRoot) {
|
|
613
|
+
const nodeModules = join(projectRoot, "node_modules");
|
|
614
|
+
const scope = join(nodeModules, "@vite-hub");
|
|
615
|
+
return [join(nodeModules, "vite-hub"), ...existsSync(scope) ? readdirSync(scope).map((name) => join(scope, name)) : []].filter(existsSync).map((link) => realpathSync(link)).filter((root) => !root.split(sep).includes("node_modules"));
|
|
616
|
+
}
|
|
617
|
+
/** Add packages that Nitro must bundle, unless Nitro already bundles every package. */
|
|
618
|
+
function addNoExternals(config, entries) {
|
|
619
|
+
if (config.noExternals === true) return;
|
|
620
|
+
const current = Array.isArray(config.noExternals) ? config.noExternals : [];
|
|
621
|
+
config.noExternals = [.../* @__PURE__ */ new Set([...current, ...entries])];
|
|
622
|
+
}
|
|
401
623
|
async function applyNitroConfig(plugins, nitroConfig, nuxt, projectRoot) {
|
|
624
|
+
const incomingNoExternals = typeof nitroConfig.noExternals === "boolean" ? nitroConfig.noExternals : void 0;
|
|
402
625
|
const environment = {
|
|
403
626
|
command: nuxt.options.dev ? "serve" : "build",
|
|
404
627
|
isPreview: false,
|
|
405
628
|
isSsrBuild: true,
|
|
406
|
-
mode: nuxt.options.dev ? "development" : "production"
|
|
629
|
+
mode: nuxt.options.vite?.mode ?? (nuxt.options.dev ? "development" : "production")
|
|
407
630
|
};
|
|
408
|
-
const serverDirs = nuxt.options
|
|
631
|
+
const serverDirs = resolveNuxtServerDirs(nuxt.options);
|
|
409
632
|
const generatedRoot = join(nuxt.options.buildDir, "vitehub");
|
|
410
633
|
let config = mergeConfig({
|
|
411
634
|
plugins,
|
|
@@ -413,11 +636,17 @@ async function applyNitroConfig(plugins, nitroConfig, nuxt, projectRoot) {
|
|
|
413
636
|
root: nuxt.options.rootDir || process.cwd()
|
|
414
637
|
}, nuxt.options.vite ?? {});
|
|
415
638
|
config.root = resolve(nuxt.options.rootDir || process.cwd(), config.root || ".");
|
|
639
|
+
const applies = (plugin) => typeof plugin.apply !== "string" || plugin.apply === environment.command;
|
|
640
|
+
plugins = plugins.filter(applies);
|
|
641
|
+
config.plugins = filterPluginOptions(config.plugins ?? [], applies);
|
|
416
642
|
const restoreReplayOwnership = () => {
|
|
417
643
|
config[VITEHUB_GENERATED_ROOT] = generatedRoot;
|
|
418
644
|
config[VITEHUB_NITRO_CONFIG_CONTEXT] = true;
|
|
419
645
|
config[VITEHUB_PROJECT_ROOT] = projectRoot;
|
|
646
|
+
config[VITEHUB_APP_BASE_URL] = nuxt.options.app?.baseURL || "/";
|
|
420
647
|
if (serverDirs) config[VITEHUB_SERVER_DIRS] = serverDirs;
|
|
648
|
+
if (nuxt.options._prepare) config[VITEHUB_PREPARE] = true;
|
|
649
|
+
if (nuxt.options.vitehubCliDiscovery) config.vitehubCliDiscovery = true;
|
|
421
650
|
};
|
|
422
651
|
restoreReplayOwnership();
|
|
423
652
|
config.build ??= {};
|
|
@@ -433,20 +662,19 @@ async function applyNitroConfig(plugins, nitroConfig, nuxt, projectRoot) {
|
|
|
433
662
|
for (const plugin of orderedPlugins) {
|
|
434
663
|
const handler = configHandler(plugin);
|
|
435
664
|
if (handler) {
|
|
436
|
-
const previousDatabaseProjectRoot = configuredProjectRootOption(config
|
|
665
|
+
const previousDatabaseProjectRoot = configuredProjectRootOption(getResolvedFeatureOptions(config, "database"));
|
|
437
666
|
const result = await handler.call({}, config, environment);
|
|
438
|
-
|
|
667
|
+
const returnedDatabase = result ? getResolvedFeatureOptions(result, "database") : void 0;
|
|
439
668
|
if (result) {
|
|
440
669
|
const { nitro, ...viteConfig } = result;
|
|
441
|
-
if (Object.hasOwn(viteConfig, "database")) returnedDatabase = viteConfig.database;
|
|
442
670
|
config = mergeConfig(config, viteConfig);
|
|
443
671
|
if (nitro) config.nitro = nitro;
|
|
444
672
|
}
|
|
445
673
|
if (plugin.name !== "@vite-hub/database/vite") {
|
|
446
|
-
const
|
|
447
|
-
if (returnedDatabase !== void 0 ||
|
|
674
|
+
const database = getResolvedFeatureOptions(config, "database");
|
|
675
|
+
if (returnedDatabase !== void 0 || configuredProjectRootOption(database) !== previousDatabaseProjectRoot) {
|
|
448
676
|
hasReplayedDatabaseDiscoveryRoot = true;
|
|
449
|
-
replayedDatabaseDiscoveryRoot =
|
|
677
|
+
replayedDatabaseDiscoveryRoot = configuredProjectRoot(config.root || projectRoot, returnedDatabase ?? database);
|
|
450
678
|
}
|
|
451
679
|
}
|
|
452
680
|
restoreReplayOwnership();
|
|
@@ -459,7 +687,8 @@ async function applyNitroConfig(plugins, nitroConfig, nuxt, projectRoot) {
|
|
|
459
687
|
nitro: config.nitro || {},
|
|
460
688
|
projectRoot,
|
|
461
689
|
root: projectRoot,
|
|
462
|
-
serverDirs: nuxt.options
|
|
690
|
+
serverDirs: resolveNuxtServerDirs(nuxt.options),
|
|
691
|
+
viteConfig: config
|
|
463
692
|
});
|
|
464
693
|
}
|
|
465
694
|
const createWorkflowNitroConfig = workflowNitroConfigHandler(plugin);
|
|
@@ -468,15 +697,18 @@ async function applyNitroConfig(plugins, nitroConfig, nuxt, projectRoot) {
|
|
|
468
697
|
config.nitro = await createWorkflowNitroConfig({
|
|
469
698
|
nitro: config.nitro || {},
|
|
470
699
|
projectRoot,
|
|
471
|
-
serverDirs: nuxt.options
|
|
700
|
+
serverDirs: resolveNuxtServerDirs(nuxt.options),
|
|
472
701
|
transformRegistry: transformWorkflowRegistry
|
|
473
702
|
});
|
|
474
703
|
}
|
|
475
704
|
}
|
|
476
705
|
await finalizeNitroReplayPlugins(plugins, config);
|
|
706
|
+
if (!nuxt.options.dev && !nuxt.options._prepare) (plugins.find((plugin) => plugin.name === "@vite-hub/rate-limit/vite")?.api)?.validateNitroBuild?.(asReplayResolvedConfig(Object.assign({}, config, { command: environment.command })));
|
|
477
707
|
if (config.nitro) {
|
|
478
708
|
installVitePluginNitroModules(config.nitro, plugins);
|
|
479
709
|
Object.assign(nitroConfig, config.nitro);
|
|
710
|
+
restoreNoExternals(nitroConfig, incomingNoExternals);
|
|
711
|
+
config.nitro = nitroConfig;
|
|
480
712
|
}
|
|
481
713
|
return {
|
|
482
714
|
config,
|
|
@@ -485,140 +717,328 @@ async function applyNitroConfig(plugins, nitroConfig, nuxt, projectRoot) {
|
|
|
485
717
|
};
|
|
486
718
|
}
|
|
487
719
|
function resolvedKVFromPlugin(plugin, configured) {
|
|
488
|
-
|
|
720
|
+
const kvPlugin = plugin;
|
|
721
|
+
if (kvPlugin?.api?.getConfig) return kvPlugin.api.getConfig().kv;
|
|
722
|
+
return configured ? requireOptionalOwner(ownerModules.kvVite, "kv").resolveKVViteConfig(configured === true ? void 0 : configured).kv : false;
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* An app that imports `vite-hub/ui` parts gets their runtime without adding `@vite-hub/ui/nuxt`: the plugin that gives
|
|
726
|
+
* them Nuxt UI's Nuxt icon, their icons in the `@nuxt/icon` client bundle, the Shiki WebAssembly alias, and component
|
|
727
|
+
* auto-imports. `@vite-hub/ui` owns all of them. Headless apps do not need the optional Nuxt UI peer or its module, so
|
|
728
|
+
* they must not receive a plugin that imports it.
|
|
729
|
+
*/
|
|
730
|
+
async function installViteHubUIRuntime(nuxt) {
|
|
731
|
+
if (!nuxt.hook || !isPackageInstalled("@nuxt/ui")) return;
|
|
732
|
+
const ui = await importOptionalOwner("@vite-hub/ui", () => import("@vite-hub/ui/nuxt"));
|
|
733
|
+
if (!ui) return;
|
|
734
|
+
const hook = nuxt.hook;
|
|
735
|
+
nuxt.hook("modules:done", () => {
|
|
736
|
+
if (!nuxt.options._installedModules?.some(({ meta }) => meta.name === "@nuxt/ui")) return;
|
|
737
|
+
ui.addViteHubUIRuntime({
|
|
738
|
+
hook: (name, callback) => Reflect.apply(hook, nuxt, [name, callback]),
|
|
739
|
+
options: {
|
|
740
|
+
plugins: nuxt.options.plugins ??= [],
|
|
741
|
+
vite: nuxt.options.vite ??= {}
|
|
742
|
+
}
|
|
743
|
+
});
|
|
744
|
+
ui.addViteHubUIComponents(nuxt);
|
|
745
|
+
});
|
|
489
746
|
}
|
|
490
|
-
|
|
491
|
-
|
|
747
|
+
/**
|
|
748
|
+
* Stop before any setup on Nuxt 4 or older. They run Nitro 2 and H3 1, which ViteHub does not support, and a build
|
|
749
|
+
* there would fail later with errors that do not name the cause.
|
|
750
|
+
*/
|
|
751
|
+
function assertSupportedNuxt(version) {
|
|
752
|
+
if (!((version === void 0 ? NaN : Number.parseInt(version, 10)) < 5)) return;
|
|
753
|
+
throw viteHubErrorDiagnostics.VITE_HUB_B0023({ message: `[vitehub] vite-hub/nuxt needs Nuxt 5, which runs Nitro 3 and H3 2. This app runs Nuxt ${version}. Until Nuxt 5 is stable, install the nightly release: pnpm add nuxt@npm:nuxt-nightly@5x` });
|
|
754
|
+
}
|
|
755
|
+
function isPlainObject(value) {
|
|
756
|
+
if (typeof value !== "object" || value === null) return false;
|
|
757
|
+
const prototype = Object.getPrototypeOf(value);
|
|
758
|
+
return prototype === Object.prototype || prototype === null;
|
|
759
|
+
}
|
|
760
|
+
/** Merges `inline` into `config` one leaf at a time. The inline value wins; arrays and other values are replaced. */
|
|
761
|
+
function mergeOptionLeaves(inline, config) {
|
|
762
|
+
const merged = { ...config };
|
|
763
|
+
for (const [key, value] of Object.entries(inline)) {
|
|
764
|
+
if (value === void 0) continue;
|
|
765
|
+
const current = merged[key];
|
|
766
|
+
merged[key] = isPlainObject(value) && isPlainObject(current) ? mergeOptionLeaves(value, current) : value;
|
|
767
|
+
}
|
|
768
|
+
return merged;
|
|
769
|
+
}
|
|
770
|
+
/**
|
|
771
|
+
* Merges the inline options of a `modules` entry into the `vitehub` key of nuxt.config.ts, one leaf at a time, as in
|
|
772
|
+
* `defineNuxtModule`. A top-level feature switch set to `true` turns the feature on with its defaults, so it keeps the
|
|
773
|
+
* options object that the other form gives. Deeper `true` values, such as Env values, replace like any other leaf.
|
|
774
|
+
*/
|
|
775
|
+
function mergeNuxtModuleOptions(inline, config) {
|
|
776
|
+
const configured = isPlainObject(config) ? config : {};
|
|
777
|
+
if (!isPlainObject(inline)) return { ...configured };
|
|
778
|
+
return mergeOptionLeaves(Object.fromEntries(Object.entries(inline).filter(([key, value]) => !(value === true && isPlainObject(configured[key])))), configured);
|
|
779
|
+
}
|
|
780
|
+
const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtInstance) {
|
|
781
|
+
if (!nuxtInstance) return;
|
|
782
|
+
const nuxt = nuxtInstance;
|
|
783
|
+
assertSupportedNuxt(nuxt._version);
|
|
784
|
+
if (nuxt.hook) Reflect.apply(nuxt.hook, nuxt, ["doctor:extendExtensions", (entries) => {
|
|
785
|
+
entries.push(doctorExtensionEntry);
|
|
786
|
+
}]);
|
|
787
|
+
await installViteHubUIRuntime(nuxt);
|
|
788
|
+
const configuredModuleOptions = mergeNuxtModuleOptions(inlineOptions, nuxt.options.vitehub);
|
|
789
|
+
assertNoRemovedViteHubOptions(configuredModuleOptions, "the `vitehub` options of nuxt.config.ts");
|
|
492
790
|
const moduleOptions = {
|
|
493
|
-
...
|
|
494
|
-
|
|
791
|
+
...configuredModuleOptions,
|
|
792
|
+
host: resolveNuxtBuildHost(configuredModuleOptions.host, nuxt.options.nitro)
|
|
495
793
|
};
|
|
496
|
-
const
|
|
497
|
-
const
|
|
498
|
-
|
|
499
|
-
public: configuredEnv.public,
|
|
500
|
-
server: configuredEnv.server
|
|
501
|
-
} : void 0;
|
|
502
|
-
const envOptions = configuredEnv && typeof configuredEnv === "object" ? Object.fromEntries(Object.entries(configuredEnv).filter(([key]) => ![
|
|
503
|
-
"define",
|
|
504
|
-
"public",
|
|
505
|
-
"server"
|
|
506
|
-
].includes(key))) : configuredEnv;
|
|
507
|
-
const options = {
|
|
794
|
+
const rootDir = nuxt.options.rootDir || process.cwd();
|
|
795
|
+
const projectRoot = resolveViteHubProjectRoot(rootDir);
|
|
796
|
+
const options = markCmsPresetFeaturesResolved(withConnectionsDatabase(withDataDir(resolveCmsPresetFeatures(withComments({
|
|
508
797
|
...moduleOptions,
|
|
509
|
-
|
|
798
|
+
console: moduleOptions.console === false ? false : resolveConsoleOptions(moduleOptions.console)
|
|
799
|
+
}), {
|
|
800
|
+
projectRoot,
|
|
801
|
+
serverDirs: resolveNuxtServerDirs(nuxt.options)
|
|
802
|
+
}))));
|
|
803
|
+
const consoleOptions = resolveConsoleOptions(options.console);
|
|
804
|
+
const plan = resolveDeploymentPlan(moduleOptions.host);
|
|
805
|
+
const journalDatabaseRoot = options.database && options.database !== true && options.database.projectRoot !== void 0 ? rootDir : projectRoot;
|
|
806
|
+
const agentJournal = options.agent && options.agent !== true ? options.agent.invocations : void 0;
|
|
807
|
+
/**
|
|
808
|
+
* In Nuxt, an explicit Database root is relative to rootDir, and replayed Vite plugins can change the Database.
|
|
809
|
+
* A production build resolves the D1 binding of the default journal here and hands it to the Agent Invocations Vite
|
|
810
|
+
* plugin, so the plugin writes the same binding when the Vite build runs its config hook again.
|
|
811
|
+
*/
|
|
812
|
+
const writeNuxtAgentJournal = async (database, databaseRoot) => {
|
|
813
|
+
if (!options.agent || nuxt.options.dev || nuxt.options.vitehubCliDiscovery || !isDefaultAgentJournal(agentJournal)) return;
|
|
814
|
+
const d1Binding = agentJournal?.databaseUrl ? void 0 : defaultDatabaseD1Binding(plan.host, database, {
|
|
815
|
+
root: databaseRoot,
|
|
816
|
+
serverDirs: resolveNuxtServerDirs(nuxt.options)
|
|
817
|
+
});
|
|
818
|
+
assertAgentInvocationsRetention(agentJournal?.retention, d1Binding !== void 0, agentJournal?.databaseUrl);
|
|
819
|
+
if (!nuxt.options._prepare) assertAgentInvocationsUrl(plan.host, agentJournal?.databaseUrl);
|
|
820
|
+
nuxt.options.vite[VITEHUB_AGENT_JOURNAL_D1] = { binding: d1Binding };
|
|
821
|
+
const libsql = defaultJournalNeedsLibsql({
|
|
822
|
+
build: true,
|
|
823
|
+
databaseUrl: agentJournal?.databaseUrl,
|
|
824
|
+
host: plan.host
|
|
825
|
+
});
|
|
826
|
+
await writeAgentInvocationsNitroPlugin({
|
|
827
|
+
database: Boolean(options.database),
|
|
828
|
+
d1Binding,
|
|
829
|
+
default: agentJournal,
|
|
830
|
+
libsql,
|
|
831
|
+
projectRoot,
|
|
832
|
+
stateUrl: agentJournalStateUrl(options)
|
|
833
|
+
});
|
|
510
834
|
};
|
|
511
|
-
|
|
835
|
+
await writeNuxtAgentJournal(options.database, journalDatabaseRoot);
|
|
512
836
|
const nitro = nuxt.options.nitro ??= {};
|
|
513
|
-
const nitroPreset = plan.
|
|
514
|
-
if (typeof nitro.preset === "string" && normalizeNitroPreset(nitro.preset) !== nitroPreset) throw
|
|
837
|
+
const nitroPreset = plan.host === "deno" ? "deno-server" : plan.nitroPreset;
|
|
838
|
+
if (typeof nitro.preset === "string" && normalizeNitroPreset(nitro.preset) !== nitroPreset) throw viteHubErrorDiagnostics.VITE_HUB_B0009({ message: "[vitehub] vitehub host " + JSON.stringify(plan.host) + " conflicts with nitro.preset " + JSON.stringify(nitro.preset) + "." });
|
|
515
839
|
nitro.preset = nitroPreset;
|
|
516
|
-
if (
|
|
840
|
+
if (options.realtime) {
|
|
841
|
+
const features = nitro.features ??= {};
|
|
842
|
+
features.websocket = true;
|
|
843
|
+
}
|
|
844
|
+
if (plan.host === "cloudflare") {
|
|
845
|
+
const cloudflare = nitro.cloudflare ??= {};
|
|
846
|
+
cloudflare.deployConfig ??= true;
|
|
517
847
|
const wasm = nitro.wasm ??= {};
|
|
518
848
|
wasm.lazy ??= true;
|
|
849
|
+
if (!nuxt.options.dev) nitro.exportConditions = cloudflareExportConditions(nitro.exportConditions);
|
|
850
|
+
if (!nuxt.options.dev) {
|
|
851
|
+
if (nuxt.hook) Reflect.apply(nuxt.hook, nuxt, ["nitro:init", (instance) => {
|
|
852
|
+
instance.hooks.hook("compiled", async () => {
|
|
853
|
+
if (instance.options.dev) return;
|
|
854
|
+
const config = await findNearestFile([
|
|
855
|
+
"wrangler.json",
|
|
856
|
+
"wrangler.jsonc",
|
|
857
|
+
"wrangler.toml"
|
|
858
|
+
], { startingFrom: rootDir }).catch(() => void 0);
|
|
859
|
+
if (!config) return;
|
|
860
|
+
const generated = join(instance.options.output.serverDir, "wrangler.json");
|
|
861
|
+
if (!existsSync(generated)) return;
|
|
862
|
+
const redirect = join(dirname(config), ".wrangler/deploy/config.json");
|
|
863
|
+
await mkdir(dirname(redirect), { recursive: true });
|
|
864
|
+
await writeFile(redirect, `${JSON.stringify({ configPath: relative(dirname(redirect), generated) })}\n`);
|
|
865
|
+
});
|
|
866
|
+
}]);
|
|
867
|
+
}
|
|
868
|
+
if (nuxt.options.dev) {
|
|
869
|
+
const devServer = nitro.devServer ??= {};
|
|
870
|
+
devServer.runner ??= process.env.NITRO_DEV_RUNNER || "node-worker";
|
|
871
|
+
}
|
|
519
872
|
}
|
|
520
|
-
const rootDir = nuxt.options.rootDir || process.cwd();
|
|
521
873
|
nuxt.options.vite ??= {};
|
|
522
874
|
nuxt.options.vite.root ??= rootDir;
|
|
523
875
|
const viteRoot = resolve(rootDir, typeof nuxt.options.vite?.root === "string" ? nuxt.options.vite.root : rootDir);
|
|
524
|
-
const
|
|
525
|
-
const
|
|
526
|
-
const
|
|
527
|
-
const effectiveBlob = options.console ? viteBlob ?? options.blob : false;
|
|
528
|
-
const explicitBlob = Boolean(effectiveBlob && effectiveBlob !== true && ("driver" in effectiveBlob || "stores" in effectiveBlob));
|
|
876
|
+
const configuredDatabaseDiscoveryRoot = configuredProjectRoot(rootDir, options.database);
|
|
877
|
+
const effectiveBlob = consoleOptions ? options.blob : false;
|
|
878
|
+
const explicitBlob = explicitBlobOption(effectiveBlob);
|
|
529
879
|
const consoleBlobEnabled = Boolean(effectiveBlob) && (plan.services.blob.supported || explicitBlob);
|
|
530
|
-
const resolvedConsoleBlob = consoleBlobEnabled ? resolveBlobViteConfig(effectiveBlob === true ? void 0 : effectiveBlob, { hosting: plan.nitroPreset }).blob : false;
|
|
880
|
+
const resolvedConsoleBlob = consoleBlobEnabled ? requireOptionalOwner(ownerModules.blobVite, "blob").resolveBlobViteConfig(effectiveBlob === true ? void 0 : effectiveBlob, { hosting: plan.nitroPreset }).blob : false;
|
|
531
881
|
const consoleBlobStores = resolvedConsoleBlob ? Object.keys(resolvedConsoleBlob.stores || { default: resolvedConsoleBlob.store }) : [];
|
|
532
|
-
const effectiveKV =
|
|
533
|
-
const effectiveQueue =
|
|
534
|
-
const effectiveWorkflow = nuxt.options.vite?.workflow ?? options.workflow;
|
|
882
|
+
const effectiveKV = options.kv;
|
|
883
|
+
const effectiveQueue = options.queue;
|
|
535
884
|
const consoleSections = resolveConsoleSectionIds({
|
|
536
885
|
...options,
|
|
886
|
+
env: options.env !== false,
|
|
537
887
|
blob: consoleBlobEnabled,
|
|
538
888
|
kv: effectiveKV,
|
|
539
|
-
|
|
889
|
+
host: plan.host,
|
|
540
890
|
queue: effectiveQueue,
|
|
541
|
-
|
|
542
|
-
workflow: effectiveWorkflow
|
|
891
|
+
sandboxTask: resolveSandboxTaskDriver(options.sandboxTask, plan) !== void 0
|
|
543
892
|
});
|
|
544
|
-
|
|
545
|
-
const
|
|
546
|
-
|
|
547
|
-
|
|
893
|
+
if (nuxt.options.dev) consoleSections.splice(0, consoleSections.length, ...insertConsoleSection(consoleSections, "setup"));
|
|
894
|
+
const runtimeCapabilityImports = {
|
|
895
|
+
blob: consoleBlobEnabled ? "vite-hub/blob" : false,
|
|
896
|
+
connections: options.connections ? generatedModules.connectionsAgent : false,
|
|
897
|
+
console: consoleOptions ? "vite-hub/console/server" : false,
|
|
898
|
+
db: options.database ? "@vite-hub/database/runtime/registry" : false,
|
|
899
|
+
i18n: options.i18n ? "vite-hub/i18n/server" : false,
|
|
900
|
+
realtime: options.realtime ? "vite-hub/realtime/agent" : false,
|
|
901
|
+
...ownerModules.emailVite ? { email: "vite-hub/email" } : {},
|
|
902
|
+
...ownerModules.kvVite ? { kv: "vite-hub/kv" } : {}
|
|
903
|
+
};
|
|
904
|
+
const consoleInvocationRootState = {};
|
|
905
|
+
const consoleInvokeEnabled = consoleOptions ? consoleOptions.invoke ?? Boolean(nuxt.options.dev) : false;
|
|
548
906
|
let generatedConsolePluginPath;
|
|
549
907
|
let consoleWorkflowConfigResolved = false;
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
const effectiveAuth = nuxt.options.vite?.auth ?? options.auth;
|
|
553
|
-
if (!nuxt.options.vitehubCliDiscovery) assertConsoleProductionAccess(configuredConsole, {
|
|
554
|
-
auth: configuredConsole !== true && configuredConsole.access === "auth" && effectiveAuth ? resolveAuthViteConfig(effectiveAuth === true ? void 0 : effectiveAuth, viteRoot, { serverDirs: nuxt.options.serverDir ? [nuxt.options.serverDir] : void 0 }) : void 0,
|
|
555
|
-
development: Boolean(nuxt.options.dev)
|
|
556
|
-
});
|
|
557
|
-
const fixture = nuxt.options.vitehubCliDiscovery ? void 0 : process.env[consoleFixtureEnvironmentVariable];
|
|
558
|
-
if (fixture && !nuxt.options.dev) throw new Error("[vitehub] Console fixture mode is development-only.");
|
|
559
|
-
resolvedConsoleFixture = fixture ? resolve(projectRoot, fixture) : void 0;
|
|
560
|
-
if (resolvedConsoleFixture) readConsoleFixture(resolvedConsoleFixture);
|
|
561
|
-
}
|
|
562
|
-
const viteConfig = nuxt.options.vite;
|
|
563
|
-
if (envConfig && Object.values(envConfig).some(Boolean)) {
|
|
564
|
-
const existingEnv = viteConfig.env ?? {};
|
|
565
|
-
viteConfig.env = {
|
|
566
|
-
...existingEnv,
|
|
567
|
-
...envConfig.define ? { define: mergeEnvDeclarationNamespaces(existingEnv.define, envConfig.define) } : {},
|
|
568
|
-
...envConfig.public ? { public: mergeEnvDeclarationNamespaces(existingEnv.public, envConfig.public) } : {},
|
|
569
|
-
...envConfig.server ? { server: mergeEnvDeclarationNamespaces(existingEnv.server, envConfig.server) } : {}
|
|
570
|
-
};
|
|
571
|
-
}
|
|
572
|
-
const secondaryProjectRoots = configuredProjectRoots(options.database && nuxt.options.database && typeof nuxt.options.database === "object" ? {
|
|
908
|
+
const effectiveAuth = options.auth;
|
|
909
|
+
const serverAutoImports = resolveViteHubServerImports({
|
|
573
910
|
...options,
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
911
|
+
auth: effectiveAuth,
|
|
912
|
+
blob: options.blob && (plan.services.blob.supported || explicitBlobOption(options.blob)),
|
|
913
|
+
env: options.env !== false,
|
|
914
|
+
kv: effectiveKV,
|
|
915
|
+
queue: effectiveQueue && plan.services.queue.supported,
|
|
916
|
+
sandboxTask: resolveSandboxTaskDriver(options.sandboxTask, plan) !== void 0,
|
|
917
|
+
seo: Boolean(options.seo?.sitemap),
|
|
918
|
+
workflow: options.workflow !== false && Boolean(options.workflow || options.agent && plan.host !== "netlify")
|
|
919
|
+
});
|
|
920
|
+
let consoleHasPrimaryAuth = false;
|
|
921
|
+
let consoleAccess;
|
|
922
|
+
if (consoleOptions) {
|
|
923
|
+
const configuredConsole = resolveConsoleOptions(consoleOptions);
|
|
924
|
+
invariant(configuredConsole, "resolveConsoleOptions() returns options for a console option that is set");
|
|
925
|
+
if (!nuxt.options.vitehubCliDiscovery) {
|
|
926
|
+
const appAuth = effectiveAuth ? requireOptionalOwner(ownerModules.authVite, "auth").resolveAuthViteConfig(effectiveAuth === true ? void 0 : effectiveAuth, viteRoot, { serverDirs: resolveNuxtServerDirs(nuxt.options) }) : void 0;
|
|
927
|
+
consoleHasPrimaryAuth = Boolean(appAuth);
|
|
928
|
+
const authIndex = consoleSections.indexOf("auth");
|
|
929
|
+
if (!appAuth && authIndex !== -1) consoleSections.splice(authIndex, 1);
|
|
930
|
+
if (appAuth && authIndex === -1) consoleSections.push("auth");
|
|
931
|
+
assertConsoleAccess(configuredConsole, { auth: appAuth });
|
|
932
|
+
consoleAccess = resolveConsoleAccessBuild(configuredConsole, { root: rootDir });
|
|
933
|
+
if (!nuxt.options.dev && !nuxt.options._prepare) assertConsoleProductionAuth(configuredConsole);
|
|
577
934
|
}
|
|
578
|
-
}
|
|
579
|
-
const
|
|
935
|
+
}
|
|
936
|
+
const writeNuxtConsolePlugin = (file, catalog) => writeConsoleNitroPlugin({
|
|
937
|
+
file,
|
|
938
|
+
projectRoot,
|
|
939
|
+
name: options.name,
|
|
940
|
+
sections: consoleSections,
|
|
941
|
+
catalog,
|
|
942
|
+
blobStores: consoleBlobStores,
|
|
943
|
+
invoke: consoleInvokeEnabled,
|
|
944
|
+
active: () => !consoleInvocationRootState.closed,
|
|
945
|
+
access: consoleAccess,
|
|
946
|
+
runtimeCapabilityImports,
|
|
947
|
+
development: nuxt.options.dev === true,
|
|
948
|
+
...consoleOptions?.pill === false ? {} : { pageTool: { base: nuxt.options.app?.baseURL || "/" } }
|
|
949
|
+
});
|
|
950
|
+
const viteConfig = nuxt.options.vite;
|
|
951
|
+
const secondaryProjectRoots = [.../* @__PURE__ */ new Set([...configuredProjectRoots(options, rootDir, viteRoot), ...options.connections ? [viteRoot] : []])].filter((root) => root !== projectRoot);
|
|
952
|
+
const generatedTypes = [
|
|
953
|
+
relative(nuxt.options.buildDir, join(projectRoot, ".vitehub/types.d.ts")),
|
|
954
|
+
...effectiveQueue ? [relative(nuxt.options.buildDir, join(projectRoot, ".vitehub/queue.d.ts"))] : [],
|
|
955
|
+
...secondaryProjectRoots.map((root) => relative(nuxt.options.buildDir, join(root, ".vitehub/**/*.d.ts")))
|
|
956
|
+
];
|
|
580
957
|
const generatedData = secondaryProjectRoots.map((root) => relative(nuxt.options.buildDir, join(root, ".vitehub/data/**/*.d.ts")));
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
958
|
+
const cloudflare = plan.host === "cloudflare";
|
|
959
|
+
const serverTypes = cloudflare ? [relative(nuxt.options.buildDir, isPackageInstalled("@cloudflare/workers-types") ? cloudflareTypes : cloudflareWorkersDeclaration)] : [];
|
|
960
|
+
const appTypes = cloudflare ? [relative(nuxt.options.buildDir, cloudflareWorkersDeclaration)] : [];
|
|
961
|
+
addTypeScriptDefaults(nuxt.options, [...generatedTypes, ...appTypes], generatedData);
|
|
962
|
+
addTypeScriptDefaults(nuxt.options, [...generatedTypes, ...appTypes], generatedData, "sharedTsConfig");
|
|
963
|
+
addTypeScriptDefaults(nuxt.options.nitro ??= {}, [...generatedTypes, ...serverTypes], generatedData);
|
|
584
964
|
if (options.database) {
|
|
585
|
-
const databaseOptions = options.database === true ? {} : options.database;
|
|
586
|
-
|
|
587
|
-
|
|
965
|
+
const databaseOptions = options.database === true ? {} : { ...options.database };
|
|
966
|
+
const defaultD1 = plan.host === "cloudflare" && !("driver" in databaseOptions) && !usesOnlyPostgresDatabases(resolveViteHubProjectRoot(rootDir, { projectRoot: databaseOptions.projectRoot }), databaseOptions.projectRoot === void 0 && nuxt.options.serverDir ? [nuxt.options.serverDir] : void 0);
|
|
967
|
+
const { hubDatabase: hubDatabaseNuxt } = requireOptionalOwner(await importOptionalOwner("@vite-hub/database", () => import("@vite-hub/database/nuxt")), options.connections ? "connections" : "database");
|
|
968
|
+
await hubDatabaseNuxt(defaultD1 ? {
|
|
969
|
+
driver: "cloudflare",
|
|
588
970
|
...databaseOptions
|
|
589
|
-
})(void 0, nuxt);
|
|
971
|
+
} : databaseOptions)(void 0, nuxt);
|
|
590
972
|
}
|
|
591
|
-
const installedPlugins = flattenPlugins(
|
|
592
|
-
|
|
973
|
+
const installedPlugins = flattenPlugins(viteHubPlugins(markCmsPresetFeaturesResolved({
|
|
974
|
+
...options,
|
|
975
|
+
...effectiveKV !== void 0 ? { kv: effectiveKV } : {}
|
|
976
|
+
}))).filter((plugin) => !isIncludedNitroPlugin(plugin)).filter((plugin) => !(options.database && plugin.name === "@vite-hub/database/vite")).filter((plugin) => !consoleOptions || !["vite-hub/console", "vite-hub/console-invocation-root"].includes(plugin.name)).filter((plugin) => plugin.name !== staleChunkReloadPluginName);
|
|
593
977
|
const plugins = [
|
|
594
978
|
...installedPlugins.filter((plugin) => plugin.name !== "vite-hub/deployment-output"),
|
|
595
|
-
...options.
|
|
596
|
-
name: "vite-hub/
|
|
597
|
-
vitehub: {
|
|
979
|
+
...nuxt.options.vitehubCliDiscovery ? [{
|
|
980
|
+
name: "vite-hub/deployment-inspect",
|
|
981
|
+
vitehub: { inspect: () => {
|
|
982
|
+
const nitro = nuxt.options.nitro;
|
|
983
|
+
return { providerOutput: describeDeploymentPlanOutput(plan, resolve(nitro?.rootDir ?? rootDir), nitro?.output?.dir) };
|
|
984
|
+
} }
|
|
985
|
+
}] : [],
|
|
986
|
+
...consoleOptions ? [{
|
|
987
|
+
name: "vite-hub/console-operations",
|
|
988
|
+
vitehub: { operations: () => consoleOperationContributions(() => consoleSections) }
|
|
598
989
|
}] : [],
|
|
599
|
-
...
|
|
990
|
+
...consoleOptions && options.agent ? [consoleInvocationRootPlugin(consoleInvocationRootState)] : []
|
|
600
991
|
];
|
|
601
992
|
const existing = withoutDeploymentOutput(Array.isArray(nuxt.options.vite?.plugins) ? nuxt.options.vite.plugins : []);
|
|
602
993
|
const existingPluginsByName = new Map(flattenPlugins(existing).filter((plugin) => plugin.name).map((plugin) => [plugin.name, plugin]));
|
|
603
994
|
const replayPlugins = [...installedPlugins.map((plugin) => existingPluginsByName.get(plugin.name) || plugin), ...flattenPlugins(existing).filter((plugin) => (plugin.name.startsWith("@vite-hub/") || plugin.name.startsWith("vite-hub/")) && !plugins.some((candidate) => candidate.name === plugin.name))];
|
|
995
|
+
const bundlePlugin = replayPlugins.find((plugin) => plugin.name === "@vite-hub/bundle/vite");
|
|
996
|
+
if (bundlePlugin && !nuxt.options.dev) {
|
|
997
|
+
nuxt.hook?.("build:before", () => {
|
|
998
|
+
bundlePlugin.api.startBuild();
|
|
999
|
+
});
|
|
1000
|
+
let routerOptions;
|
|
1001
|
+
nuxt.hook?.("pages:routerOptions", (context) => {
|
|
1002
|
+
routerOptions = context;
|
|
1003
|
+
});
|
|
1004
|
+
nuxt.hook?.("app:templatesGenerated", (app) => {
|
|
1005
|
+
const customOptions = routerOptions?.files.find((file) => !file.optional);
|
|
1006
|
+
const layoutComponent = app.components.find((component) => component.pascalName === "NuxtLayout")?.filePath;
|
|
1007
|
+
bundlePlugin.api.setRoutes(customOptions ? [] : nuxtPageRoutes(app.pages ?? [], layoutComponent ? app.layouts : {}, layoutComponent), {
|
|
1008
|
+
sensitive: nuxt.options.router?.options?.sensitive ?? true,
|
|
1009
|
+
strict: nuxt.options.router?.options?.strict ?? false,
|
|
1010
|
+
...customOptions ? { unavailable: `Custom router options (${customOptions.path}) can change routes or matching at runtime.` } : {}
|
|
1011
|
+
});
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1014
|
+
const seoPlugin = replayPlugins.find((plugin) => plugin.name === "vite-hub/seo");
|
|
1015
|
+
if (seoPlugin) nuxt.hook?.("app:templatesGenerated", (app) => seoPlugin.api.setPages(nuxtPageRoutes(app.pages ?? []).filter((route) => !route.unavailable).map((route) => route.path)));
|
|
1016
|
+
const commentsPlugin = replayPlugins.find((plugin) => plugin.name === "@vite-hub/comments/vite");
|
|
1017
|
+
if (commentsPlugin) {
|
|
1018
|
+
await commentsPlugin.api.setComponents([]);
|
|
1019
|
+
nuxt.hook?.("app:templatesGenerated", (app) => commentsPlugin.api.setComponents(app.components));
|
|
1020
|
+
}
|
|
604
1021
|
const retainedKVPlugin = replayPlugins.find((plugin) => plugin.name === "@vite-hub/kv/vite");
|
|
605
1022
|
const envPlugin = replayPlugins.find((plugin) => plugin.name === "@vite-hub/env/vite");
|
|
606
1023
|
if (envPlugin) for (const plugin of replayPlugins) deploymentOutputEnvPluginHandler(plugin)?.(envPlugin);
|
|
607
|
-
if (options.env !== false) await envPlugin?.api?.prepareTypes?.(viteConfig
|
|
1024
|
+
if (options.env !== false) await envPlugin?.api?.prepareTypes?.(envPlugin.api.resolveDeclarations?.(viteConfig), viteRoot);
|
|
608
1025
|
const emailPlugin = replayPlugins.find((plugin) => plugin.name === "@vite-hub/email/vite");
|
|
609
|
-
const markdownTemplatePlugin = installedPlugins.find((plugin) => plugin.name === "@vite-hub/markdown-template/vite");
|
|
610
1026
|
const emailTemplatePaths = await emailPlugin?.api?.prepareTypes?.({
|
|
611
1027
|
materialize: true,
|
|
612
1028
|
projectRoot,
|
|
613
|
-
serverDirs: nuxt.options
|
|
1029
|
+
serverDirs: resolveNuxtServerDirs(nuxt.options)
|
|
614
1030
|
}) ?? {};
|
|
615
1031
|
const emailCleanupPlugin = replayPlugins.find((plugin) => plugin.name === "@vite-hub/email/optional-peer-resolver");
|
|
616
1032
|
if (!emailPlugin) await emailCleanupPlugin?.api?.prepareTypes?.(projectRoot);
|
|
617
1033
|
const sourcePlugin = replayPlugins.find((plugin) => plugin.name === "@vite-hub/source/vite");
|
|
618
1034
|
let generatedSourceHandlers = await sourcePlugin?.api?.prepareSources?.({
|
|
619
1035
|
projectRoot,
|
|
620
|
-
serverDirs: nuxt.options
|
|
1036
|
+
serverDirs: resolveNuxtServerDirs(nuxt.options)
|
|
621
1037
|
}) ?? [];
|
|
1038
|
+
await replayPlugins.find((plugin) => plugin.name === "@vite-hub/connections/vite" || plugin.name === "@vite-hub/connections/types-cleanup")?.api?.prepareTypes?.({
|
|
1039
|
+
projectRoot: viteRoot,
|
|
1040
|
+
serverDirs: resolveNuxtServerDirs(nuxt.options)
|
|
1041
|
+
});
|
|
622
1042
|
const typesPlugin = replayPlugins.find((plugin) => plugin.name === "vite-hub/types");
|
|
623
1043
|
let generatedSourceRestart = Promise.resolve();
|
|
624
1044
|
let generatedSourceRestartClosed = false;
|
|
@@ -646,6 +1066,7 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxt)
|
|
|
646
1066
|
generatedSourceRestartClosed = true;
|
|
647
1067
|
removeGeneratedHandlersListener();
|
|
648
1068
|
});
|
|
1069
|
+
if (nuxt.options.dev && !nuxt.options.vitehubCliDiscovery) publishNuxtDevServer(nuxt);
|
|
649
1070
|
typesPlugin?.api?.setPrepareSources?.(sourcePlugin?.api?.prepareSources);
|
|
650
1071
|
await typesPlugin?.api?.prepareTypes?.({ projectRoot });
|
|
651
1072
|
viteConfig.define = {
|
|
@@ -655,74 +1076,193 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxt)
|
|
|
655
1076
|
viteConfig[VITEHUB_GENERATED_ROOT] = join(nuxt.options.buildDir, "vitehub");
|
|
656
1077
|
viteConfig[VITEHUB_NITRO_CONFIG_CONTEXT] = true;
|
|
657
1078
|
viteConfig[VITEHUB_PROJECT_ROOT] = projectRoot;
|
|
658
|
-
|
|
1079
|
+
viteConfig[VITEHUB_APP_BASE_URL] = nuxt.options.app?.baseURL || "/";
|
|
1080
|
+
const viteServerDirs = resolveNuxtServerDirs(nuxt.options);
|
|
1081
|
+
if (viteServerDirs) viteConfig[VITEHUB_SERVER_DIRS] = viteServerDirs;
|
|
659
1082
|
const installedVitePlugins = [...plugins.map((plugin) => existingPluginsByName.get(plugin.name) || plugin), ...filterPluginOptions(existing, (plugin) => !plugins.some((candidate) => candidate.name === plugin.name))];
|
|
660
1083
|
nuxt.options.vite.plugins = installedVitePlugins;
|
|
661
1084
|
const configuredEnvProjectRootOption = options.env && typeof options.env === "object" ? options.env.projectRoot : void 0;
|
|
662
1085
|
const configuredEnvProjectRoot = configuredEnvProjectRootOption ? resolve(viteRoot, configuredEnvProjectRootOption) : void 0;
|
|
663
1086
|
const envProjectRoot = envPlugin?.api?.resolveProjectRoot?.(viteRoot) ?? configuredEnvProjectRoot ?? projectRoot;
|
|
664
1087
|
if (envPlugin?.api?.resolveProjectRoot && configuredEnvProjectRoot) {
|
|
665
|
-
if (configuredEnvProjectRoot !== envProjectRoot) throw
|
|
1088
|
+
if (configuredEnvProjectRoot !== envProjectRoot) throw viteHubErrorDiagnostics.VITE_HUB_B0011({ message: `[vitehub] Env projectRoot ${JSON.stringify(configuredEnvProjectRootOption)} conflicts with the installed Env Vite plugin.` });
|
|
666
1089
|
}
|
|
667
1090
|
const generatedAliases = {
|
|
668
1091
|
...options.env === false ? {} : createEnvImportAliases({ projectRoot: envProjectRoot }),
|
|
669
1092
|
...!nuxt.options.dev ? Object.fromEntries(Object.entries(emailTemplatePaths).map(([name, path]) => [`#vitehub/emails/${name}`, path])) : {},
|
|
670
1093
|
...emailPlugin && !nuxt.options.dev ? { "#vitehub/emails": join(projectRoot, ".vitehub/email/templates") } : {}
|
|
671
1094
|
};
|
|
1095
|
+
nuxt.hook?.("modules:done", () => {
|
|
1096
|
+
nuxt.hook?.("nitro:config", async (config) => {
|
|
1097
|
+
const alias = isRecord(config.alias) ? config.alias : void 0;
|
|
1098
|
+
if (typeof alias?.h3 !== "string") return;
|
|
1099
|
+
const manifest = findPackageJSON(pathToFileURL(alias.h3), import.meta.url);
|
|
1100
|
+
const pkg = manifest ? JSON.parse(readFileSync(manifest, "utf8")) : void 0;
|
|
1101
|
+
if (isRecord(pkg) && pkg.name === "h3" && typeof pkg.version === "string" && pkg.version.startsWith("1.")) delete alias.h3;
|
|
1102
|
+
});
|
|
1103
|
+
});
|
|
1104
|
+
const nitro3ExternalLists = /* @__PURE__ */ new WeakMap();
|
|
672
1105
|
nuxt.hook?.("nitro:config", async (config) => {
|
|
1106
|
+
const previousExternalList = nitro3ExternalLists.get(config);
|
|
1107
|
+
if (previousExternalList && config.noExternals === previousExternalList) config.noExternals = false;
|
|
1108
|
+
const incomingNoExternals = config.noExternals;
|
|
673
1109
|
const { config: replayConfig, hasReplayedDatabaseDiscoveryRoot, replayedDatabaseDiscoveryRoot } = await applyNitroConfig(replayPlugins, config, nuxt, projectRoot);
|
|
1110
|
+
if (options.env !== false) await envPlugin?.api?.prepareTypes?.(envPlugin.api.resolveDeclarations?.(replayConfig), viteRoot);
|
|
1111
|
+
await typesPlugin?.api?.prepareTypes?.({ projectRoot });
|
|
674
1112
|
consoleWorkflowConfigResolved = true;
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
1113
|
+
const replayedDatabase = hasReplayedDatabaseDiscoveryRoot ? getResolvedFeatureOptions(replayConfig, "database") ?? options.database : options.database;
|
|
1114
|
+
await writeNuxtAgentJournal(replayedDatabase && replayedDatabase !== true && hasReplayedDatabaseDiscoveryRoot ? {
|
|
1115
|
+
...replayedDatabase,
|
|
1116
|
+
projectRoot: replayedDatabaseDiscoveryRoot
|
|
1117
|
+
} : replayedDatabase, hasReplayedDatabaseDiscoveryRoot ? projectRoot : journalDatabaseRoot);
|
|
1118
|
+
if (consoleOptions) {
|
|
1119
|
+
const resolvedKV = resolvedKVFromPlugin(retainedKVPlugin, effectiveKV);
|
|
1120
|
+
const replayedBlob = getResolvedFeatureOptions(replayConfig, "blob") ?? effectiveBlob;
|
|
678
1121
|
const replayedExplicitBlob = Boolean(replayedBlob && replayedBlob !== true && ("driver" in replayedBlob || "stores" in replayedBlob));
|
|
679
1122
|
const replayedBlobEnabled = Boolean(replayedBlob) && (plan.services.blob.supported || replayedExplicitBlob);
|
|
680
|
-
const resolvedReplayedBlob = replayedBlobEnabled ? resolveBlobViteConfig(replayedBlob === true ? void 0 : replayedBlob, { hosting: plan.nitroPreset }).blob : false;
|
|
1123
|
+
const resolvedReplayedBlob = replayedBlobEnabled ? requireOptionalOwner(ownerModules.blobVite, "blob").resolveBlobViteConfig(replayedBlob === true ? void 0 : replayedBlob, { hosting: plan.nitroPreset }).blob : false;
|
|
681
1124
|
const resolvedSections = resolveConsoleSectionIds({
|
|
682
1125
|
...options,
|
|
1126
|
+
auth: consoleHasPrimaryAuth,
|
|
1127
|
+
env: options.env !== false,
|
|
683
1128
|
blob: replayedBlobEnabled,
|
|
684
|
-
database: replayConfig
|
|
1129
|
+
database: getResolvedFeatureOptions(replayConfig, "database") ?? options.database,
|
|
1130
|
+
email: options.email,
|
|
685
1131
|
kv: resolvedKV,
|
|
686
|
-
|
|
687
|
-
queue: effectiveQueue === false ? false : effectiveQueue === void 0 ? void 0 : replayConfig
|
|
688
|
-
|
|
689
|
-
workspace:
|
|
690
|
-
workflow:
|
|
1132
|
+
host: plan.host,
|
|
1133
|
+
queue: effectiveQueue === false ? false : effectiveQueue === void 0 ? void 0 : getResolvedFeatureOptions(replayConfig, "queue") ?? effectiveQueue,
|
|
1134
|
+
sandboxTask: Boolean(getResolvedFeatureOptions(replayConfig, "sandboxTask") ?? options.sandboxTask) && resolveSandboxTaskDriver(options.sandboxTask, plan) !== void 0,
|
|
1135
|
+
workspace: options.workspace,
|
|
1136
|
+
workflow: options.workflow
|
|
691
1137
|
});
|
|
692
|
-
|
|
693
|
-
consoleBlobStores.splice(0, consoleBlobStores.length, ...resolvedReplayedBlob ? Object.keys(resolvedReplayedBlob.stores || { default: resolvedReplayedBlob.store }) : []);
|
|
694
|
-
consoleKVStores.splice(0, consoleKVStores.length, ...resolvedKV ? Object.keys(resolvedKV.stores || { default: resolvedKV.store }) : []);
|
|
695
|
-
installConsoleSections(projectRoot, consoleSections);
|
|
696
|
-
installConsoleProjectName(projectRoot, resolveConsoleProjectNameFromRoot(projectRoot));
|
|
697
|
-
addConsoleDevframeHandler(config, consoleRuntimeRoot);
|
|
698
|
-
const consoleCatalog = await discoverConsoleBuildCatalog({
|
|
699
|
-
databaseDiscoveryRoot: hasReplayedDatabaseDiscoveryRoot ? replayedDatabaseDiscoveryRoot : configuredDatabaseDiscoveryRoot,
|
|
1138
|
+
const entrySections = await discoverConsoleEntrySections({
|
|
700
1139
|
discoveryRoot: viteRoot,
|
|
701
1140
|
projectRoot,
|
|
702
|
-
|
|
703
|
-
rateLimitDiscoveryRoot: configuredProjectRoot(viteRoot, replayConfig.rateLimit ?? nuxt.options.vite?.rateLimit ?? options.rateLimit),
|
|
704
|
-
rateLimitScanDirs: configuredScanDirs(replayConfig.rateLimit ?? nuxt.options.vite?.rateLimit ?? options.rateLimit),
|
|
705
|
-
sections: consoleSections,
|
|
706
|
-
scheduleDiscoveryRoot: configuredProjectRoot(viteRoot, options.schedule),
|
|
707
|
-
serverDirs: nuxt.options.serverDir ? [nuxt.options.serverDir] : void 0,
|
|
708
|
-
workspaceDiscoveryRoot: configuredProjectRoot(viteRoot, replayConfig.workspace ?? nuxt.options.vite?.workspace ?? options.workspace),
|
|
709
|
-
workflowDiscoveryRoot: rootDir
|
|
1141
|
+
serverDirs: resolveNuxtServerDirs(nuxt.options)
|
|
710
1142
|
});
|
|
711
|
-
|
|
1143
|
+
consoleSections.splice(0, consoleSections.length, .../* @__PURE__ */ new Set([...resolvedSections, ...entrySections]));
|
|
1144
|
+
if (nuxt.options.dev) consoleSections.splice(0, consoleSections.length, ...insertConsoleSection(consoleSections, "setup"));
|
|
1145
|
+
consoleBlobStores.splice(0, consoleBlobStores.length, ...resolvedReplayedBlob ? Object.keys(resolvedReplayedBlob.stores || { default: resolvedReplayedBlob.store }) : []);
|
|
1146
|
+
installConsoleSections(projectRoot, consoleSections);
|
|
1147
|
+
installConsoleProjectName(projectRoot, resolveConsoleProjectName(projectRoot, options.name));
|
|
1148
|
+
addConsoleRpcHandler(config, consoleRuntimeRoot);
|
|
1149
|
+
addConsoleAppRoutes(config, consoleRuntimeRoot);
|
|
1150
|
+
if (!nuxt.options.vitehubCliDiscovery) {
|
|
1151
|
+
const consoleCatalog = await discoverConsoleBuildCatalog({
|
|
1152
|
+
contentImportBase: "vite-hub/content",
|
|
1153
|
+
databaseDiscoveryRoot: hasReplayedDatabaseDiscoveryRoot ? replayedDatabaseDiscoveryRoot : configuredDatabaseDiscoveryRoot,
|
|
1154
|
+
discoveryRoot: viteRoot,
|
|
1155
|
+
plugins: nuxt.options.vite?.plugins,
|
|
1156
|
+
projectRoot,
|
|
1157
|
+
queueDiscoveryRoot: rootDir,
|
|
1158
|
+
rateLimitDiscoveryRoot: configuredProjectRoot(viteRoot, getResolvedFeatureOptions(replayConfig, "rateLimit") ?? options.rateLimit),
|
|
1159
|
+
rateLimitScanDirs: configuredScanDirs(getResolvedFeatureOptions(replayConfig, "rateLimit") ?? options.rateLimit),
|
|
1160
|
+
sections: consoleSections,
|
|
1161
|
+
scheduleDiscoveryRoot: configuredProjectRoot(viteRoot, options.schedule),
|
|
1162
|
+
serverDirs: resolveNuxtServerDirs(nuxt.options),
|
|
1163
|
+
workspaceDiscoveryRoot: configuredProjectRoot(viteRoot, options.workspace),
|
|
1164
|
+
workflowDiscoveryRoot: rootDir
|
|
1165
|
+
});
|
|
1166
|
+
await writeNuxtConsolePlugin(generatedConsolePluginPath ?? resolveGeneratedConsolePlugin(projectRoot, nuxt.options.dev === true), consoleCatalog);
|
|
1167
|
+
}
|
|
712
1168
|
}
|
|
713
1169
|
Object.assign(config, mergeGeneratedSourceNitroConfig(config, generatedSourceHandlers));
|
|
714
|
-
|
|
715
|
-
|
|
1170
|
+
addNoExternals(config, [
|
|
1171
|
+
"vite-hub",
|
|
1172
|
+
"@vite-hub/",
|
|
1173
|
+
join(projectRoot, ".vitehub"),
|
|
1174
|
+
h3RuntimeRoot,
|
|
1175
|
+
...linkedViteHubPackageRoots(projectRoot)
|
|
1176
|
+
]);
|
|
1177
|
+
if (incomingNoExternals === false && Array.isArray(config.noExternals)) nitro3ExternalLists.set(config, config.noExternals);
|
|
1178
|
+
else nitro3ExternalLists.delete(config);
|
|
1179
|
+
if (!nuxt.options.experimental?.nitroViteEnvironment) installNitroRuntimeResolvers(config, replayPlugins, {
|
|
1180
|
+
root: replayConfig.root || viteRoot,
|
|
1181
|
+
serverDirs: resolveNuxtServerDirs(nuxt.options)
|
|
1182
|
+
});
|
|
1183
|
+
normalizeGeneratedNitroPlugins(config, projectRoot);
|
|
1184
|
+
installNitroBuildPlugins(config, [join(projectRoot, ".vitehub"), join(nuxt.options.buildDir, "vitehub")], nuxt.options.dev === true && plan.host === "cloudflare", consoleSections);
|
|
1185
|
+
if (nuxt.options.dev && plan.host === "cloudflare") await writeCloudflareDevShims(nuxt.options.buildDir, config.alias ??= {});
|
|
1186
|
+
if (plan.host === "cloudflare") {
|
|
1187
|
+
if (!nuxt.options.dev) {
|
|
1188
|
+
const handler = await writeCloudflareAssetsMiddleware(projectRoot);
|
|
1189
|
+
const handlers = Array.isArray(config.handlers) ? config.handlers : [];
|
|
1190
|
+
if (!handlers.some((entry) => isRecord(entry) && entry.handler === handler)) config.handlers = [...handlers, {
|
|
1191
|
+
handler,
|
|
1192
|
+
route: "/**",
|
|
1193
|
+
middleware: true
|
|
1194
|
+
}];
|
|
1195
|
+
}
|
|
1196
|
+
const cloudflare = config.cloudflare ??= {};
|
|
1197
|
+
if (cloudflare.nodeCompat === true) {
|
|
1198
|
+
const wrangler = isRecord(cloudflare.wrangler) ? cloudflare.wrangler : {};
|
|
1199
|
+
const flags = Array.isArray(wrangler.compatibility_flags) ? wrangler.compatibility_flags : [];
|
|
1200
|
+
const project = await readProjectWranglerConfig(typeof config.rootDir === "string" ? config.rootDir : rootDir);
|
|
1201
|
+
if ([...flags, ...Array.isArray(project?.compatibility_flags) ? project.compatibility_flags : []].includes("no_nodejs_compat")) cloudflare.nodeCompat = false;
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
716
1204
|
if (emailPlugin && nuxt.options.dev) installEmailTemplateResolver(config, join(projectRoot, ".vitehub/email/templates"));
|
|
717
1205
|
const alias = config.alias ??= {};
|
|
718
1206
|
for (const [name, path] of Object.entries(generatedAliases)) alias[name] ??= path;
|
|
1207
|
+
const kv = resolvedKVFromPlugin(retainedKVPlugin, effectiveKV);
|
|
1208
|
+
if (!kv) {
|
|
1209
|
+
const virtual = config.virtual ??= {};
|
|
1210
|
+
if (virtual["#vitehub/kv/config"] === void 0 || virtual["#vitehub/kv/config"] === "export const hosting = undefined\nexport const kv = false\nexport const loadDatabases = undefined\nexport default { hosting, kv }\n") {
|
|
1211
|
+
virtual["#vitehub/kv/config"] = disabledKVConfigModule;
|
|
1212
|
+
const disabledConfig = join(projectRoot, ".vitehub/nuxt/disabled-kv-config.mjs");
|
|
1213
|
+
await mkdir(dirname(disabledConfig), { recursive: true });
|
|
1214
|
+
await writeFile(disabledConfig, disabledKVConfigModule, "utf8");
|
|
1215
|
+
alias["#vitehub/kv/config"] ??= disabledConfig;
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
if (!hasUpstashStore(kv)) alias[upstashDriverSpecifier] ??= disabledUpstashDriver;
|
|
1219
|
+
if (!hasRedisStore(kv)) alias[redisDriverSpecifier] ??= disabledRedisDriver;
|
|
1220
|
+
addNitroImports(config, serverAutoImports);
|
|
719
1221
|
});
|
|
720
|
-
if (options.agent)
|
|
1222
|
+
if (options.agent) {
|
|
1223
|
+
addVueImports(nuxt, "vite-hub/agent/vue", agentVueComposables);
|
|
1224
|
+
const optimizeDeps = nuxt.options.vite.optimizeDeps ??= {};
|
|
1225
|
+
const include = optimizeDeps.include ??= [];
|
|
1226
|
+
if (!include.includes("vite-hub/agent/vue")) include.push("vite-hub/agent/vue");
|
|
1227
|
+
}
|
|
721
1228
|
addVueImports(nuxt, "vite-hub/source/client", ["useCollection"]);
|
|
722
|
-
if (options.
|
|
1229
|
+
if (options.observability && options.observability !== true && options.observability.browserErrors) await installBrowserErrorsNuxt(nuxt, projectRoot);
|
|
1230
|
+
await installStaleChunkReloadNuxt(nuxt, projectRoot);
|
|
1231
|
+
if (isPackageInstalled("@vite-hub/decisions")) addVueImports(nuxt, "vite-hub/decisions/vue", ["useChoices"]);
|
|
1232
|
+
if (isPackageInstalled("@vite-hub/forms")) {
|
|
1233
|
+
addVueImports(nuxt, "vite-hub/forms/vue", ["useFormAction"]);
|
|
1234
|
+
if (isPackageInstalled("@formisch/vue")) addVueImports(nuxt, "vite-hub/forms/formisch", ["useFormSubmit"]);
|
|
1235
|
+
}
|
|
1236
|
+
if (options.device !== false && isPackageInstalled("@vite-hub/device")) {
|
|
1237
|
+
addVueImports(nuxt, "vite-hub/device/vue", ["useStoredData", "useStoredFetch"]);
|
|
1238
|
+
addVueImports(nuxt, "vite-hub/device", [
|
|
1239
|
+
"setDeviceAccount",
|
|
1240
|
+
"clearDevice",
|
|
1241
|
+
"inspectDevice"
|
|
1242
|
+
]);
|
|
1243
|
+
await addDevicePlugin(nuxt, projectRoot, {
|
|
1244
|
+
version: options.device?.version,
|
|
1245
|
+
auth: Boolean(effectiveAuth) && options.device?.account !== false
|
|
1246
|
+
});
|
|
1247
|
+
}
|
|
1248
|
+
if (isPackageInstalled("@vite-hub/sync") && hasSyncDirectory(projectRoot, resolveNuxtServerDirs(nuxt.options))) {
|
|
1249
|
+
addVueImports(nuxt, "vite-hub/sync/vue", ["useSync"]);
|
|
1250
|
+
addVueImports(nuxt, "vite-hub/sync/client", ["clearSync"]);
|
|
1251
|
+
if (effectiveAuth) await addSyncSignOutPlugin(nuxt, projectRoot);
|
|
1252
|
+
}
|
|
1253
|
+
if (options.i18n) {
|
|
1254
|
+
await requireOptionalOwner(ownerModules.i18nNuxt, "i18n").installI18nNuxt({ options: { plugins: nuxt.options.plugins ??= [] } }, {
|
|
1255
|
+
importBase: "vite-hub/i18n",
|
|
1256
|
+
nitroMajorVersion: 3,
|
|
1257
|
+
projectRoot
|
|
1258
|
+
});
|
|
1259
|
+
addVueImports(nuxt, "vite-hub/i18n/vue", ["useLocale"]);
|
|
1260
|
+
}
|
|
1261
|
+
if (effectiveAuth) {
|
|
723
1262
|
const envOptions = options.env || {};
|
|
1263
|
+
const { default: hubAuthNuxt } = requireOptionalOwner(await importOptionalOwner("@vite-hub/auth", () => import("@vite-hub/auth/nuxt")), "auth");
|
|
724
1264
|
hubAuthNuxt({
|
|
725
|
-
auth:
|
|
1265
|
+
auth: effectiveAuth === true ? void 0 : effectiveAuth,
|
|
726
1266
|
env: options.env === false ? false : { projectRoot: envOptions.projectRoot },
|
|
727
1267
|
importsFrom: "vite-hub/auth/vue",
|
|
728
1268
|
nitro: false
|
|
@@ -735,29 +1275,81 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxt)
|
|
|
735
1275
|
nuxtAlias[name] ??= path;
|
|
736
1276
|
nitroAlias[name] ??= path;
|
|
737
1277
|
}
|
|
1278
|
+
if (options.blob) addVueImports(nuxt, "vite-hub/blob/vue", ["useMultipartUpload", "useUpload"]);
|
|
738
1279
|
if (options.realtime) {
|
|
739
1280
|
addVueImports(nuxt, "vite-hub/realtime", ["defineRealtime"]);
|
|
740
1281
|
addVueImports(nuxt, "vite-hub/realtime/vue", ["useRealtimeTiptap"]);
|
|
741
1282
|
}
|
|
742
|
-
if (
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
1283
|
+
if (consoleOptions) generatedConsolePluginPath = await installConsole({
|
|
1284
|
+
nuxt,
|
|
1285
|
+
projectRoot,
|
|
1286
|
+
name: options.name,
|
|
1287
|
+
sections: consoleSections,
|
|
1288
|
+
discovery: {
|
|
1289
|
+
contentImportBase: "vite-hub/content",
|
|
1290
|
+
databaseDiscoveryRoot: configuredDatabaseDiscoveryRoot,
|
|
1291
|
+
discoveryRoot: viteRoot,
|
|
1292
|
+
plugins: nuxt.options.vite?.plugins,
|
|
1293
|
+
queueDiscoveryRoot: rootDir,
|
|
1294
|
+
rateLimitDiscoveryRoot: configuredProjectRoot(viteRoot, options.rateLimit),
|
|
1295
|
+
rateLimitScanDirs: configuredScanDirs(options.rateLimit),
|
|
1296
|
+
scheduleDiscoveryRoot: configuredProjectRoot(viteRoot, options.schedule),
|
|
1297
|
+
serverDirs: resolveNuxtServerDirs(nuxt.options),
|
|
1298
|
+
workflowDiscoveryRoot: rootDir,
|
|
1299
|
+
workspaceDiscoveryRoot: configuredProjectRoot(viteRoot, options.workspace)
|
|
1300
|
+
},
|
|
1301
|
+
writeGeneratedPlugin: !nuxt.options.vitehubCliDiscovery,
|
|
1302
|
+
canDiscoverDefinitions: () => consoleWorkflowConfigResolved,
|
|
1303
|
+
access: consoleAccess,
|
|
1304
|
+
writePlugin: writeNuxtConsolePlugin
|
|
756
1305
|
});
|
|
757
1306
|
};
|
|
758
|
-
viteHubNuxtModule.getMeta = () => ({
|
|
1307
|
+
viteHubNuxtModule.getMeta = async () => ({
|
|
1308
|
+
compatibility: { server: "nitro3" },
|
|
759
1309
|
configKey: "vitehub",
|
|
760
1310
|
name: "vite-hub/nuxt"
|
|
761
1311
|
});
|
|
1312
|
+
viteHubNuxtModule.getModuleDependencies = async (nuxt) => {
|
|
1313
|
+
startPackageChecks();
|
|
1314
|
+
const image = nuxtImageProviderDependency(nuxt?.options ?? {});
|
|
1315
|
+
const content = await resolveNuxtContentDatabaseDependencies(nuxt);
|
|
1316
|
+
if (!isPackageInstalled("@nuxt/ui")) return {
|
|
1317
|
+
...content,
|
|
1318
|
+
...image
|
|
1319
|
+
};
|
|
1320
|
+
return {
|
|
1321
|
+
...(await importOptionalOwner("@vite-hub/ui", () => import("@vite-hub/ui/nuxt")))?.viteHubUIIconDependencies,
|
|
1322
|
+
...content,
|
|
1323
|
+
...image
|
|
1324
|
+
};
|
|
1325
|
+
};
|
|
1326
|
+
/**
|
|
1327
|
+
* The Nuxt Content `database` default that the default Database gives, such as Postgres or remote libSQL. Nuxt applies
|
|
1328
|
+
* dependency defaults before it sets up any module, so Content reads it in any module order. A Database with an explicit
|
|
1329
|
+
* `driver` keeps its own Content wiring, and Cloudflare keeps Content on D1.
|
|
1330
|
+
*/
|
|
1331
|
+
async function resolveNuxtContentDatabaseDependencies(nuxtInstance) {
|
|
1332
|
+
const nuxtOptions = nuxtInstance?.options;
|
|
1333
|
+
if (!nuxtOptions || nuxtOptions.dev) return {};
|
|
1334
|
+
const configured = { ...nuxtOptions.vitehub };
|
|
1335
|
+
if (resolveNuxtBuildHost(configured.host, nuxtOptions.nitro) === "cloudflare") return {};
|
|
1336
|
+
const project = {
|
|
1337
|
+
projectRoot: resolveViteHubProjectRoot(nuxtOptions.rootDir || process.cwd()),
|
|
1338
|
+
serverDirs: resolveNuxtServerDirs(nuxtOptions)
|
|
1339
|
+
};
|
|
1340
|
+
const { database } = withConnectionsDatabase(resolveCmsPresetFeatures(withComments(configured), project));
|
|
1341
|
+
if (!database || database !== true && database.driver !== void 0) return {};
|
|
1342
|
+
return (await importOptionalOwner("@vite-hub/database", () => import("@vite-hub/database/nuxt")))?.hubDatabase(database === true ? {} : { ...database }).getModuleDependencies(nuxtInstance) ?? {};
|
|
1343
|
+
}
|
|
1344
|
+
/** Without a `host` option, a Nuxt app that sets `nitro.preset`, such as `cloudflare-module`, builds for that host. */
|
|
1345
|
+
function resolveNuxtBuildHost(host, nitro) {
|
|
1346
|
+
const preset = nitro?.preset;
|
|
1347
|
+
return resolveBuildHost(host ?? hostFromNitroPreset(typeof preset === "string" ? preset : void 0));
|
|
1348
|
+
}
|
|
1349
|
+
function usesOnlyPostgresDatabases(rootDir, serverDirs) {
|
|
1350
|
+
const { discoverDatabaseDefinitions, readDatabaseDefinitionDialect } = requireOptionalOwner(ownerModules.databaseConfig, "database");
|
|
1351
|
+
const definitions = discoverDatabaseDefinitions(rootDir, { serverDirs });
|
|
1352
|
+
return definitions.length > 0 && definitions.every((definition) => readDatabaseDefinitionDialect(definition.handler) === "postgresql");
|
|
1353
|
+
}
|
|
762
1354
|
//#endregion
|
|
763
1355
|
export { viteHubNuxtModule as default };
|