vite-hub 0.4.1 → 0.5.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 +38 -14
- package/dist/_internal/runtime/browser-errors.d.ts +12 -4
- package/dist/_internal/runtime/browser-errors.js +69 -27
- package/dist/_internal/runtime/redirects.d.ts +1 -2
- package/dist/_internal/runtime/redirects.js +2 -3
- package/dist/_internal/runtime/request-policy.d.ts +11 -2
- package/dist/_internal/runtime/request-policy.js +25 -6
- package/dist/_internal/runtime/security.d.ts +1 -2
- package/dist/_internal/runtime/security.js +16 -3
- package/dist/{access-BDST818p.js → access-BBHk9b5P.js} +30 -20
- package/dist/{access-policy-DjBKLo3c.js → access-policy-BM48XstY.js} +5 -6
- package/dist/{access-policy-CGXhO3Ee.d.ts → access-policy-CUbJLvlR.d.ts} +4 -8
- package/dist/{account-BnOAU055.d.ts → account-CoAO1F8G.d.ts} +9 -7
- package/dist/agent/invocations/postgres.d.ts +1 -0
- package/dist/agent/invocations/postgres.js +2 -0
- package/dist/{agent-invocations.post-CcPvfA0n.js → agent-invocations.post-BAC1aHnG.js} +16 -18
- package/dist/agents-BClUWOj7.js +1 -0
- package/dist/{agents-BDeazoAW.js → agents-Cz_uhhov.js} +4 -5
- package/dist/{agents-C94A4N9u.d.ts → agents-Gyw4VKPt.d.ts} +0 -2
- package/dist/auth/server.js +1 -2
- package/dist/{auth-BZOy7obk.d.ts → auth-CeKxL2xp.d.ts} +4 -8
- package/dist/{auth-operations-GcQk0O0X.js → auth-operations-arLIY2_2.js} +1 -2
- package/dist/{auth-types-CyqhWvYF.d.ts → auth-types-B4mq4YhK.d.ts} +1 -4
- package/dist/bin.js +34 -23
- package/dist/blob/nuxt-image.js +1 -2
- package/dist/{blob-CFLwMsjH.d.ts → blob-_TtxDb-t.d.ts} +1 -3
- package/dist/{blob-CpvlM8jp.js → blob-eH6j0AQj.js} +5 -6
- package/dist/browser-error-limits-B0yS95zt.js +24 -0
- package/dist/cache/operations.d.ts +2 -4
- package/dist/cache/operations.js +3 -4
- package/dist/cache.d.ts +1 -3
- package/dist/cache.js +2 -3
- package/dist/choices/testing.d.ts +1 -0
- package/dist/choices/testing.js +2 -0
- package/dist/{cli-config-wxKjF2Y0.js → cli-config-BX8H4ZCo.js} +12 -5
- package/dist/cli-config-DgpmE_7z.js +1 -0
- package/dist/cloudflare-app-types.d.ts +18 -0
- package/dist/{cloudflare-env-lookup-DKXdr4P_.js → cloudflare-env-lookup-DcN7pGlv.js} +1 -2
- package/dist/cms.js +1 -2
- package/dist/console/auth-types.d.ts +1 -1
- package/dist/console/auth.d.ts +1 -3
- package/dist/console/auth.js +2 -3
- package/dist/console/runtime/auth-operations.d.ts +1 -3
- package/dist/console/runtime/auth-operations.js +1 -2
- package/dist/console/runtime/client/account-views.d.ts +1 -3
- package/dist/console/runtime/client/account-views.js +1 -2
- package/dist/console/runtime/client/account.d.ts +1 -1
- package/dist/console/runtime/client/account.js +36 -48
- package/dist/console/runtime/client/add-primitive.ts +2 -2
- package/dist/console/runtime/client/appearance.d.ts +1 -2
- package/dist/console/runtime/client/appearance.js +1 -2
- package/dist/console/runtime/client/blob-media.d.ts +2 -4
- package/dist/console/runtime/client/blob-media.js +5 -6
- package/dist/console/runtime/client/comment-thread.d.ts +1 -3
- package/dist/console/runtime/client/comment-thread.js +11 -5
- package/dist/console/runtime/client/content-heads.d.ts +1 -2
- package/dist/console/runtime/client/content-heads.js +2 -3
- package/dist/console/runtime/client/documents.d.ts +2 -2
- package/dist/console/runtime/client/documents.js +1 -2
- package/dist/console/runtime/client/editor.d.ts +3 -5
- package/dist/console/runtime/client/editor.js +1 -2
- package/dist/console/runtime/client/env-groups.d.ts +1 -3
- package/dist/console/runtime/client/env-groups.js +1 -2
- package/dist/console/runtime/client/env-status.d.ts +1 -3
- package/dist/console/runtime/client/env-status.js +1 -2
- package/dist/console/runtime/client/format.d.ts +1 -3
- package/dist/console/runtime/client/format.js +1 -2
- package/dist/console/runtime/client/invocation-deletion.d.ts +1 -2
- package/dist/console/runtime/client/invocation-deletion.js +1 -2
- package/dist/console/runtime/client/invocation.d.ts +1 -2
- package/dist/console/runtime/client/invocation.js +4 -5
- package/dist/console/runtime/client/live.d.ts +2 -4
- package/dist/console/runtime/client/live.js +1 -2
- package/dist/console/runtime/client/mcp-client.d.ts +6 -4
- package/dist/console/runtime/client/mcp-client.js +12 -5
- package/dist/console/runtime/client/media-library.d.ts +1 -1
- package/dist/console/runtime/client/media-library.js +1 -2
- package/dist/console/runtime/client/media-uploads.d.ts +2 -4
- package/dist/console/runtime/client/media-uploads.js +2 -3
- package/dist/console/runtime/client/media.d.ts +1 -1
- package/dist/console/runtime/client/media.js +1 -2
- package/dist/console/runtime/client/operation-view.d.ts +2 -4
- package/dist/console/runtime/client/operation-view.js +4 -5
- package/dist/console/runtime/client/presence.d.ts +2 -4
- package/dist/console/runtime/client/presence.js +1 -2
- package/dist/console/runtime/client/preview.d.ts +1 -3
- package/dist/console/runtime/client/preview.js +1 -2
- package/dist/console/runtime/client/problem.d.ts +2 -4
- package/dist/console/runtime/client/problem.js +3 -4
- package/dist/console/runtime/client/project-link.d.ts +2 -2
- package/dist/console/runtime/client/project-link.js +1 -2
- package/dist/console/runtime/client/project-session.d.ts +19 -10
- package/dist/console/runtime/client/project-session.js +1 -723
- package/dist/console/runtime/client/project.d.ts +1 -3
- package/dist/console/runtime/client/project.js +1 -2
- package/dist/console/runtime/client/projects.d.ts +1 -1
- package/dist/console/runtime/client/projects.js +1 -2
- package/dist/console/runtime/client/publish.d.ts +2 -4
- package/dist/console/runtime/client/publish.js +1 -2
- package/dist/console/runtime/client/rate-limit.d.ts +1 -3
- package/dist/console/runtime/client/rate-limit.js +3 -4
- package/dist/console/runtime/client/read-only.d.ts +2 -4
- package/dist/console/runtime/client/read-only.js +2 -3
- package/dist/console/runtime/client/request.d.ts +2 -70
- package/dist/console/runtime/client/request.js +1 -2
- package/dist/console/runtime/client/route-query.d.ts +4 -5
- package/dist/console/runtime/client/route-query.js +1 -2
- package/dist/console/runtime/client/schedule-run.d.ts +1 -3
- package/dist/console/runtime/client/schedule-run.js +3 -4
- package/dist/console/runtime/client/schema-form.d.ts +1 -1
- package/dist/console/runtime/client/schema-form.js +1 -2
- package/dist/console/runtime/client/sections.d.ts +1 -1
- package/dist/console/runtime/client/sections.js +1 -2
- package/dist/console/runtime/client/site-access.d.ts +41 -10
- package/dist/console/runtime/client/site-access.js +157 -28
- package/dist/console/runtime/client/stored.d.ts +1 -3
- package/dist/console/runtime/client/stored.js +1 -2
- package/dist/console/runtime/client/ticket.d.ts +1 -1
- package/dist/console/runtime/client/ticket.js +1 -2
- package/dist/console/runtime/client/toast.d.ts +1 -3
- package/dist/console/runtime/client/toast.js +1 -2
- package/dist/console/runtime/client/workflow.d.ts +1 -3
- package/dist/console/runtime/client/workflow.js +3 -4
- package/dist/console/runtime/components/console-account-api-keys.vue +4 -4
- package/dist/console/runtime/components/console-account-home.vue +230 -51
- package/dist/console/runtime/components/console-account-link.vue +8 -5
- package/dist/console/runtime/components/console-account-setup.vue +10 -7
- package/dist/console/runtime/components/console-account-shell.vue +13 -19
- package/dist/console/runtime/components/console-account-unlink.vue +2 -3
- package/dist/console/runtime/components/console-app-settings.vue +8 -2
- package/dist/console/runtime/components/console-app.vue +1 -10
- package/dist/console/runtime/components/console-auth-activity.vue +2 -2
- package/dist/console/runtime/components/console-auth-chart.vue +1 -1
- package/dist/console/runtime/components/console-auth-overview.vue +1 -1
- package/dist/console/runtime/components/console-auth.vue +4 -4
- package/dist/console/runtime/components/console-comment-thread.vue +1 -1
- package/dist/console/runtime/components/console-definitions.vue +4 -4
- package/dist/console/runtime/components/console-document-dashboard.vue +2 -2
- package/dist/console/runtime/components/console-document-list.vue +2 -2
- package/dist/console/runtime/components/console-document-settings.vue +1 -1
- package/dist/console/runtime/components/console-env.vue +3 -3
- package/dist/console/runtime/components/console-home.vue +220 -311
- package/dist/console/runtime/components/console-hosted-comments-embed.vue +106 -0
- package/dist/console/runtime/components/console-loading.vue +1 -1
- package/dist/console/runtime/components/console-mcp-callback.vue +6 -1
- package/dist/console/runtime/components/console-mcp-connection.vue +3 -3
- package/dist/console/runtime/components/console-mcp-items.vue +4 -17
- package/dist/console/runtime/components/console-media-browser.vue +20 -30
- package/dist/console/runtime/components/console-media-crops.vue +3 -2
- package/dist/console/runtime/components/console-media-uploads.vue +11 -7
- package/dist/console/runtime/components/console-page-toolbar.vue +5 -10
- package/dist/console/runtime/components/console-schema-list.vue +85 -31
- package/dist/console/runtime/components/console-search-palette.vue +14 -5
- package/dist/console/runtime/components/console-section.vue +2 -1
- package/dist/console/runtime/components/console-session-inspector.vue +5 -0
- package/dist/console/runtime/components/console-session.css +8 -2
- package/dist/console/runtime/components/console-settings-value.vue +4 -5
- package/dist/console/runtime/components/console-sidebar.vue +9 -8
- package/dist/console/runtime/components/console-site.vue +36 -15
- package/dist/console/runtime/components/console-stat-grid.vue +3 -2
- package/dist/console/runtime/components/console-toaster.vue +3 -2
- package/dist/console/runtime/components/console-usage-chart.vue +1 -1
- package/dist/console/runtime/components/console-usage.vue +36 -18
- package/dist/console/runtime/components/invocation/internal/brand-icons.ts +10 -0
- package/dist/console/runtime/components/invocation/internal/invocation-brand.ts +6 -2
- package/dist/console/runtime/components/invocation/invocation.css +4 -27
- package/dist/console/runtime/console-route.d.ts +1 -3
- package/dist/console/runtime/console-route.js +1 -2
- package/dist/console/runtime/definitions.d.ts +1 -1
- package/dist/console/runtime/definitions.js +1 -2
- package/dist/console/runtime/diagnostics.ts +8 -1
- package/dist/console/runtime/mcp-client.d.ts +1 -1
- package/dist/console/runtime/mcp-client.js +1 -2
- package/dist/console/runtime/page/loader.js +45 -52
- package/dist/console/runtime/page-tool/account.js +26 -0
- package/dist/console/runtime/page-tool/page-tool.js +2 -3
- package/dist/console/runtime/public/skills/index.json +1 -1
- package/dist/console/runtime/public/skills/vitehub/SKILL.md +50 -7
- package/dist/console/runtime/public/skills/vitehub/agents/openai.yaml +1 -1
- package/dist/console/runtime/public/skills/vitehub/references/primitives/channels.md +1 -1
- package/dist/console/runtime/public/skills/vitehub/references/primitives/email.md +1 -1
- package/dist/console/runtime/public/skills/vitehub/references/project-shapes.md +1 -1
- package/dist/console/runtime/rpc.d.ts +1 -1
- package/dist/console/runtime/rpc.js +1 -2
- package/dist/console/runtime/sections.d.ts +1 -1
- package/dist/console/runtime/sections.js +1 -2
- package/dist/console/runtime/server/access-policy.d.ts +1 -1
- package/dist/console/runtime/server/access-policy.js +1 -2
- package/dist/console/runtime/server/agents.get.d.ts +2 -3
- package/dist/console/runtime/server/agents.get.js +3 -4
- package/dist/console/runtime/server/auth.d.ts +1 -1
- package/dist/console/runtime/server/auth.js +4 -5
- package/dist/console/runtime/server/blob.d.ts +1 -1
- package/dist/console/runtime/server/blob.js +1 -2
- package/dist/console/runtime/server/channel-replay.d.ts +3 -5
- package/dist/console/runtime/server/channel-replay.js +7 -7
- package/dist/console/runtime/server/database.d.ts +1 -1
- package/dist/console/runtime/server/database.get.d.ts +2 -3
- package/dist/console/runtime/server/database.get.js +4 -5
- package/dist/console/runtime/server/database.js +1 -2
- package/dist/console/runtime/server/definitions.d.ts +1 -1
- package/dist/console/runtime/server/definitions.get.d.ts +4 -6
- package/dist/console/runtime/server/definitions.get.js +5 -6
- package/dist/console/runtime/server/definitions.js +1 -2
- package/dist/console/runtime/server/development.d.ts +1 -1
- package/dist/console/runtime/server/development.js +1 -2
- package/dist/console/runtime/server/documents.d.ts +1 -1
- package/dist/console/runtime/server/documents.js +2 -2
- package/dist/console/runtime/server/env.d.ts +1 -3
- package/dist/console/runtime/server/env.get.d.ts +2 -4
- package/dist/console/runtime/server/env.get.js +7 -8
- package/dist/console/runtime/server/env.js +1 -2
- package/dist/console/runtime/server/invocation-capabilities.get.d.ts +1 -3
- package/dist/console/runtime/server/invocation-capabilities.get.js +4 -5
- package/dist/console/runtime/server/invocation-workspace.get.d.ts +3 -5
- package/dist/console/runtime/server/invocation-workspace.get.js +6 -7
- package/dist/console/runtime/server/invocation.get.d.ts +3 -5
- package/dist/console/runtime/server/invocation.get.js +8 -9
- package/dist/console/runtime/server/invocations.get.d.ts +1 -2
- package/dist/console/runtime/server/invocations.get.js +5 -6
- package/dist/console/runtime/server/logs.get.d.ts +3 -5
- package/dist/console/runtime/server/logs.get.js +7 -8
- package/dist/console/runtime/server/mcp-client-operations.d.ts +2 -4
- package/dist/console/runtime/server/mcp-client-operations.js +5 -7
- package/dist/console/runtime/server/operation-contributions.d.ts +1 -1
- package/dist/console/runtime/server/operation-contributions.js +1 -2
- package/dist/console/runtime/server/page-auth.d.ts +2 -4
- package/dist/console/runtime/server/page-auth.js +1 -2
- package/dist/console/runtime/server/page-tool.d.ts +1 -1
- package/dist/console/runtime/server/page-tool.js +12 -7
- package/dist/console/runtime/server/page-tools-route.d.ts +2 -0
- package/dist/console/runtime/server/page-tools-route.js +4 -0
- package/dist/console/runtime/server/rpc.d.ts +3 -5
- package/dist/console/runtime/server/rpc.js +12 -13
- package/dist/console/runtime/server/runtime.d.ts +1 -1
- package/dist/console/runtime/server/runtime.js +1 -2
- package/dist/console/runtime/server/search.get.d.ts +1 -3
- package/dist/console/runtime/server/search.get.js +3 -5
- package/dist/console/runtime/server/sections.d.ts +5 -5
- package/dist/console/runtime/server/sections.get.d.ts +1 -1
- package/dist/console/runtime/server/sections.get.js +8 -9
- package/dist/console/runtime/server/sections.js +6 -6
- package/dist/console/runtime/server/setup.d.ts +5 -5
- package/dist/console/runtime/server/setup.js +5 -5
- package/dist/console/runtime/server/site-entry.d.ts +1 -3
- package/dist/console/runtime/server/site-entry.js +15 -10
- package/dist/console/runtime/server/site-session.d.ts +12 -22
- package/dist/console/runtime/server/site-session.js +1 -2
- package/dist/console/runtime/server/status.get.d.ts +2 -4
- package/dist/console/runtime/server/status.get.js +6 -7
- package/dist/console/runtime/server/tickets.d.ts +1 -1
- package/dist/console/runtime/server/tickets.js +1 -2
- package/dist/console/runtime/server/usage.get.d.ts +2 -4
- package/dist/console/runtime/server/usage.get.js +8 -9
- package/dist/console/runtime/server/workspace-files.get.d.ts +3 -5
- package/dist/console/runtime/server/workspace-files.get.js +4 -5
- package/dist/console/runtime/site-access.d.ts +1 -1
- package/dist/console/runtime/site-access.js +1 -2
- package/dist/console/runtime/skills.d.ts +1 -3
- package/dist/console/runtime/skills.js +1 -2
- package/dist/console/server.d.ts +7 -11
- package/dist/console/server.js +8 -8
- package/dist/console/ui.d.ts +0 -10
- package/dist/console/ui.js +32 -28
- package/dist/console-lazy-views-VEjcbL4Q.js +1 -0
- package/dist/{console-route-CBuqZ4wO.js → console-route-DbdnLkkF.js} +3 -4
- package/dist/console.d.ts +1 -3
- package/dist/console.js +1 -2
- package/dist/{database-DyPVMjp_.d.ts → database-CPjZ3L0g.d.ts} +1 -3
- package/dist/{database-BdOBjPkS.js → database-CrgBUdIx.js} +3 -4
- package/dist/definition-catalog-1xPPtzOx.js +137 -0
- package/dist/definition-catalog-M5ua7JRS.js +1 -0
- package/dist/{definitions-BW6SvmMM.js → definitions-BFYqXchw.js} +1 -2
- package/dist/{definitions-DB4LbZ7T.d.ts → definitions-ChvMnA1L.d.ts} +0 -2
- package/dist/{definitions-Dbgxfz3I.d.ts → definitions-DRkgHKmk.d.ts} +1 -3
- package/dist/{definitions-CNq_Shkh.js → definitions-M7i2p8SR.js} +5 -6
- package/dist/deployment-CURATxjG.js +229 -0
- package/dist/deployment-l7RuKdEp.js +1 -0
- package/dist/{dev-peer-am78OsHH.js → dev-peer-DBq-isgi.js} +7 -6
- package/dist/{development-zLxOp-AO.js → development-DD567hhJ.js} +2 -3
- package/dist/{development-W5EwONyL.d.ts → development-I40mfD7B.d.ts} +1 -3
- package/dist/{diagnostics-9U_fYxMy.js → diagnostics-B2cqlCSz.js} +3 -3
- package/dist/{diagnostics-CjGiniKb.d.ts → diagnostics-BXxPggRw.d.ts} +1 -3
- package/dist/docs/nuxt.js +1 -2
- package/dist/doctor.d.ts +0 -6
- package/dist/doctor.js +15078 -2377
- package/dist/{documents-CjJTCrY8.js → documents-BOYwZ5g4.js} +7 -8
- package/dist/{documents-qrHHqlNU.js → documents-Ck_iub9w.js} +4 -5
- package/dist/{documents-BASIRZ91.d.ts → documents-DxK0tdjA.d.ts} +3 -5
- package/dist/{documents-CboVhYFz.d.ts → documents-LtkKCxtu.d.ts} +4 -8
- package/dist/durability/operations.d.ts +2 -4
- package/dist/durability/operations.js +3 -4
- package/dist/email/vue.d.ts +1 -0
- package/dist/email/vue.js +2 -0
- package/dist/{entries-Bj-jPs_J.js → entries-UFs9n1MB.js} +2 -3
- package/dist/{env-Dg1I_DWr.js → env-D-wtSupz.js} +2 -3
- package/dist/{error-diagnostics-Bm3JKYjz.js → error-diagnostics-CBtvqI30.js} +33 -22
- package/dist/{operation-definition-a5keEpCd.js → error-diagnostics-kKXseq8d.js} +11 -169
- package/dist/error-diagnostics.ts +33 -23
- package/dist/{optional-owners-BNA2OX6z.js → features-BXRKlmtN.js} +57 -345
- package/dist/features-CD5i5I8V.js +1 -0
- package/dist/{format-BOYlanIZ.js → format-Df-bS4Ly.js} +1 -2
- package/dist/gateways/testing.d.ts +1 -0
- package/dist/gateways/testing.js +2 -0
- package/dist/github-login-W-vaahWP.js +6 -0
- package/dist/{host-CkL0jjBq.js → host-DeNPYIeV.js} +1 -2
- package/dist/{http-error-Bs6e8_-8.js → http-error-BorAxJYM.js} +1 -2
- package/dist/index.d.ts +2 -8
- package/dist/index.js +5 -6
- package/dist/inspect-CWwAuL-B.js +47 -0
- package/dist/internal/agent-invocations-libsql.js +1 -2
- package/dist/internal/disabled-redis-driver.d.ts +1 -3
- package/dist/internal/disabled-redis-driver.js +2 -3
- package/dist/internal/disabled-upstash-driver.d.ts +1 -3
- package/dist/internal/disabled-upstash-driver.js +2 -3
- package/dist/internal/test-loader.d.ts +1 -3
- package/dist/internal/test-loader.js +2 -3
- package/dist/internal/test-server.js +2 -3
- package/dist/{internal-BreyUsQ6.js → internal-0C_CC601.js} +1 -2
- package/dist/{internal-CO4OqqaS.d.ts → internal-CKocv79I.d.ts} +3 -7
- package/dist/{invariant-DolT9EEx.js → invariant-Dj2R1eMr.js} +1 -2
- package/dist/{invocation-page-undo-DIZ-s3xT.js → invocation-page-undo-BEi-rO0Q.js} +5 -6
- package/dist/{invocations-CK_-G540.js → invocations-8NThe8Bx.js} +5 -6
- package/dist/{limits-BUlwWYQE.js → limits-BLo31qDR.js} +1 -2
- package/dist/logs/client.d.ts +19 -0
- package/dist/logs/client.js +11 -0
- package/dist/logs/host.d.ts +2 -4
- package/dist/logs/host.js +1 -2
- package/dist/logs/memory.d.ts +1 -1
- package/dist/logs/memory.js +1 -2
- package/dist/logs/source.d.ts +1 -1
- package/dist/logs/source.js +1 -2
- package/dist/logs.d.ts +2 -2
- package/dist/logs.js +2 -2
- package/dist/{mcp-client-CTbTbn7d.js → mcp-client-Bkh-khvr.js} +1 -2
- package/dist/{mcp-client-By4zk0vU.js → mcp-client-DiObFpDS.js} +35 -22
- package/dist/{mcp-client-C_sEmyQw.d.ts → mcp-client-Q2XbUXuP.d.ts} +1 -4
- package/dist/{media-uKX4Wy-c.d.ts → media-C79RB1oH.d.ts} +0 -2
- package/dist/{media-BHpQ-4jw.js → media-CAKz9yrp.js} +8 -9
- package/dist/{media-library-NaOMBKWS.js → media-library-BDX89xXA.js} +5 -6
- package/dist/{media-library-D9ThbXqs.d.ts → media-library-DxGu6w9z.d.ts} +0 -2
- package/dist/{memory-DTmq-Z6x.js → memory-D3EJS_Bp.js} +21 -10
- package/dist/{memory-2bbl4hcV.d.ts → memory-GK5ZGWrp.d.ts} +1 -3
- package/dist/nuxt-server-auto-imports-4aT5BD4u.js +74 -0
- package/dist/{nuxt-server-imports-DH60Z7LA.js → nuxt-server-imports-BdJqiVhT.js} +10 -18
- package/dist/nuxt.d.ts +1 -3
- package/dist/nuxt.js +339 -189
- package/dist/{object-D8pRdprI.js → object-DRSmpe04.js} +1 -2
- package/dist/{operation-contributions-DpkO_iSU.d.ts → operation-contributions-BCcQVlGb.d.ts} +1 -3
- package/dist/{operation-contributions-BdS0z3tx.js → operation-contributions-D10pjkJF.js} +4 -5
- package/dist/operation-definition-DTpNvLd8.js +164 -0
- package/dist/{operation-registry-BogGwk_I.js → operation-registry-DfQbL7vE.js} +1 -2
- package/dist/{operation-rpc-DI9txNxK.js → operation-rpc-BMdfapja.js} +3 -4
- package/dist/{operations-EOdyctDc.js → operations-CD_mu_Ww.js} +86 -9
- package/dist/operations-D7ENc68Y.js +1 -0
- package/dist/{operations-B0689BG1.d.ts → operations-DgFhA1WE.d.ts} +8 -6
- package/dist/{operations-CWP9dF3i.js → operations-vRLiH7dh.js} +35 -46
- package/dist/optional-owners-DAfShdgV.js +353 -0
- package/dist/out-Cw5Tvr92.js +20989 -0
- package/dist/{owned-paths-BnjT0FhU.js → owned-paths-MjjDftBn.js} +1 -2
- package/dist/page/pill.iife.js +25 -27
- package/dist/{page-tool-CRCK1RHV.d.ts → page-tool-BUnUbuSy.d.ts} +6 -7
- package/dist/{page-tools-BkSSBFoi.js → page-tools-BQzwuAHD.js} +28 -12
- package/dist/{page-tools-sw4I-Nqx.d.ts → page-tools-UwsfvH-B.d.ts} +2 -4
- package/dist/{page-tools-shared-D3fFoEV2.js → page-tools-shared-hJcG_xk8.js} +8 -5
- package/dist/{inspect-CDw7e0vK.js → pathe.M-eThtNZ-D4EC7Wue.js} +2 -31
- package/dist/{plugins-BqAtIEX2.d.ts → plugins-BpiTVULl.d.ts} +252 -262
- package/dist/{plugins-B-DpgDPB.js → plugins-H6-MQrsn.js} +3483 -797
- package/dist/presets/workspace.js +1 -2
- package/dist/project-BxyyclTE.js +58 -0
- package/dist/{project-CufkVP1u.d.ts → project-DKBIHOf4.d.ts} +16 -4
- package/dist/{project-DlWTGB7h.js → project-DRC67Uiu.js} +1 -2
- package/dist/{project-link-D-6UefhA.js → project-link-CeS0T8Pr.js} +57 -9
- package/dist/{project-link-BuOzBH9f.d.ts → project-link-isfdRO3Q.d.ts} +42 -6
- package/dist/{project-root-v6ba4tn7.js → project-root-mAVQGZTX.js} +1 -2
- package/dist/project-session--GN7MduT.js +764 -0
- package/dist/{projects-CAcXztf4.js → projects-BRp0iseV.js} +1 -2
- package/dist/{projects-Ddvl9EJp.d.ts → projects-mgPxrKZr.d.ts} +0 -2
- package/dist/{registry-zw6aE2N9.js → registry-B8JE5NY-.js} +1 -2
- package/dist/{registry-CDKLACCZ.js → registry-CnPC-gNu.js} +1 -2
- package/dist/{request-D7h3SQ92.d.ts → request-BC_krbEr.d.ts} +2 -4
- package/dist/request-CJCPyu2B.d.ts +70 -0
- package/dist/{request-DbFfYmCu.js → request-CQ8TkHLh.js} +4 -5
- package/dist/{request-DE8w_cSM.js → request-Cl68STwT.js} +7 -8
- package/dist/request-origin-pzWr9UUu.js +37 -0
- package/dist/rolldown-runtime-DegdyBIC.js +25 -0
- package/dist/{route-query-CRVWXIrc.js → route-query-BWVl6ZO6.js} +4 -5
- package/dist/{rpc-DIUA61pv.js → rpc-D3tsx5lZ.js} +1 -2
- package/dist/{rpc-7nlHSv3y.d.ts → rpc-oijgKQtD.d.ts} +0 -2
- package/dist/{runtime-YLWfdrtO.js → runtime-CAbuQGMP.js} +3 -4
- package/dist/{runtime-DQuHg7OO.js → runtime-CRJsqVTa.js} +2 -3
- package/dist/{runtime-B_btezs1.d.ts → runtime-Cf8R1Ztr.d.ts} +0 -2
- package/dist/{runtime-DxfJOfCd.js → runtime-CyPZMiyK.js} +2 -3
- package/dist/{runtime-OsEDfbM9.js → runtime-F0CTqBFx.js} +5 -6
- package/dist/{runtime-feature-guard-B64MMW9I.js → runtime-feature-guard-DpUn4Oxc.js} +91 -10
- package/dist/scan-module-B1A24jqP.js +1 -0
- package/dist/{scan-module-Df58L_6T.js → scan-module-BfZvDBxb.js} +2 -4
- package/dist/{schema-form-C-fy3xaU.d.ts → schema-form-Bl79Bdm-.d.ts} +0 -2
- package/dist/{secret-Dy5uqvq9.js → secret-D2KL_o2h.js} +2 -3
- package/dist/{sections-Do7X4Nwt.d.ts → sections-0qrBvGbf.d.ts} +0 -4
- package/dist/{sections-C83x0slv.js → sections-BNTdIEJw.js} +2 -3
- package/dist/{sections-BogiCmtz.d.ts → sections-BTfWK14a.d.ts} +4 -6
- package/dist/{sections-DumoLKQN.js → sections-BiCOk9qP.js} +1 -2
- package/dist/sections-DAtgYMVz.d.ts +8 -0
- package/dist/{sections-et20h8w3.js → sections-HLxb9MrG.js} +14 -7
- package/dist/{sections.get-COiLcQ0P.d.ts → sections.get-CGmtYmfu.d.ts} +2 -4
- package/dist/seo/runtime.d.ts +2 -5
- package/dist/seo/runtime.js +3 -5
- package/dist/{seo-CtLywyRx.d.ts → seo-CgW5uI9L.d.ts} +0 -2
- package/dist/seo.d.ts +1 -1
- package/dist/seo.js +1 -2
- package/dist/{server-BRJE4t-W.js → server-DsOEa4_A.js} +5 -5
- package/dist/{setup-ZbA1by7W.d.ts → setup-Ca7jtBLS.d.ts} +8 -7
- package/dist/{setup-C-5nB7aY.js → setup-DQz_i-ee.js} +16 -5
- package/dist/{site-access-BmE8HGxs.js → site-access-1JIQjY11.js} +16 -16
- package/dist/{site-access-DxfdOel1.d.ts → site-access-CUXIbbbR.d.ts} +0 -2
- package/dist/{site-access-BycrwM2v.js → site-access-CmaZ-oaL.js} +1 -2
- package/dist/site-access-Cvmjb6aw.js +1 -0
- package/dist/{site-session-odJq1dYa.js → site-session-D36fr7Wf.js} +65 -40
- package/dist/skills/operations.d.ts +1 -5
- package/dist/skills/operations.js +4 -5
- package/dist/skills/vitehub/SKILL.md +142 -0
- package/dist/skills/vitehub/agents/openai.yaml +4 -0
- package/dist/skills/vitehub/references/agent-definitions.md +36 -0
- package/dist/skills/vitehub/references/bundle.md +57 -0
- package/dist/skills/vitehub/references/capabilities-authority.md +30 -0
- package/dist/skills/vitehub/references/channels-triggers.md +27 -0
- package/dist/skills/vitehub/references/framework-composition.md +29 -0
- package/dist/skills/vitehub/references/preview-contract.md +44 -0
- package/dist/skills/vitehub/references/primitives/auth.md +14 -0
- package/dist/skills/vitehub/references/primitives/blob.md +13 -0
- package/dist/skills/vitehub/references/primitives/browser.md +17 -0
- package/dist/skills/vitehub/references/primitives/cache.md +13 -0
- package/dist/skills/vitehub/references/primitives/channels.md +11 -0
- package/dist/skills/vitehub/references/primitives/connections.md +14 -0
- package/dist/skills/vitehub/references/primitives/content.md +13 -0
- package/dist/skills/vitehub/references/primitives/database.md +15 -0
- package/dist/skills/vitehub/references/primitives/email.md +11 -0
- package/dist/skills/vitehub/references/primitives/env.md +13 -0
- package/dist/skills/vitehub/references/primitives/kv.md +13 -0
- package/dist/skills/vitehub/references/primitives/markdown-template.md +13 -0
- package/dist/skills/vitehub/references/primitives/queue.md +14 -0
- package/dist/skills/vitehub/references/primitives/rate-limit.md +11 -0
- package/dist/skills/vitehub/references/primitives/realtime.md +19 -0
- package/dist/skills/vitehub/references/primitives/sandbox-task.md +11 -0
- package/dist/skills/vitehub/references/primitives/sandbox.md +13 -0
- package/dist/skills/vitehub/references/primitives/schedule.md +11 -0
- package/dist/skills/vitehub/references/primitives/shell.md +11 -0
- package/dist/skills/vitehub/references/primitives/source.md +11 -0
- package/dist/skills/vitehub/references/primitives/workflow.md +11 -0
- package/dist/skills/vitehub/references/primitives/workspace.md +11 -0
- package/dist/skills/vitehub/references/project-patterns.md +19 -0
- package/dist/skills/vitehub/references/project-shapes.md +81 -0
- package/dist/skills/vitehub/references/proof-recovery.md +31 -0
- package/dist/skills/vitehub/references/sandboxes-hosts.md +26 -0
- package/dist/skills/vitehub/references/schedules-workflows-invocations.md +28 -0
- package/dist/skills/vitehub/references/server-primitives.md +39 -0
- package/dist/skills/vitehub/references/workspaces-sources-access.md +26 -0
- package/dist/{skills-DdpSMiCI.js → skills-C1MaGEbO.js} +1 -2
- package/dist/skills.d.ts +1 -2
- package/dist/{skills.get-Bl8cBe8u.js → skills.get-DAooGWy5.js} +3 -4
- package/dist/skills.js +1 -2
- package/dist/{source-D4wWtoHh.js → source-DYFndd0W.js} +2 -3
- package/dist/{source-S-LChQvw.d.ts → source-DemBtwla.d.ts} +0 -2
- package/dist/{stored-Dhv2qsQv.js → stored-J3TetMKf.js} +1 -2
- package/dist/task/operations.d.ts +1 -5
- package/dist/task/operations.js +3 -4
- package/dist/test/register.js +2 -3
- package/dist/test.d.ts +0 -4
- package/dist/test.js +1 -2
- package/dist/{ticket-Pr_8ZtXW.d.ts → ticket-BFWwevWN.d.ts} +0 -2
- package/dist/{ticket-Cudn1dq3.js → ticket-BwsnryuU.js} +2 -3
- package/dist/{tickets-C_0Fhc00.js → tickets-Cj9_y3gw.js} +14 -16
- package/dist/ui/motion/core.d.ts +1 -0
- package/dist/ui/motion/core.js +2 -0
- package/dist/ui/motion.d.ts +1 -0
- package/dist/ui/motion.js +2 -0
- package/dist/ui/vite.js +1 -2
- package/dist/{usage-CoQXs5nW.d.ts → usage-BduF04ks.d.ts} +0 -2
- package/dist/{usage-B4taNt4a.js → usage-ZV3TBMzE.js} +6 -5
- package/dist/{usage-index-BsGAFzyq.js → usage-index-CR_xTrXO.js} +3 -4
- package/dist/{version-DNmSsk5r.js → version-CAhBr673.js} +59 -21
- package/dist/{vite-stage-mmtwQIMA.js → vite-stage-Dmo4RgnK.js} +32 -8
- package/dist/{vue-router-C68IU1jM.d.ts → vue-router-plZJLlpm.d.ts} +120 -182
- package/dist/workspace/blob-database/postgres.d.ts +1 -0
- package/dist/workspace/blob-database/postgres.js +2 -0
- package/dist/{workspace-history-CraoERnc.js → workspace-history-B52xib2J.js} +3 -4
- package/dist/{workspace-history-CeVwBB6Q.d.ts → workspace-history-WuxgLsi4.d.ts} +0 -2
- package/package.json +190 -149
- package/dist/agents-BoWau_ei.js +0 -2
- package/dist/cli-config-UAGTmuFa.js +0 -2
- package/dist/console/runtime/server/page-session.d.ts +0 -2
- package/dist/console/runtime/server/page-session.js +0 -5
- package/dist/console-lazy-views-DXnIkdyd.js +0 -2
- package/dist/operations-CAQmIxGK.js +0 -2
- package/dist/project-C4N_Zcjl.js +0 -30
- package/dist/request-origin-Bq7mDQG9.js +0 -23
- package/dist/scan-module-D_3X08mj.js +0 -2
- package/dist/sections-CyrXbbkG.d.ts +0 -10
- package/dist/site-access-BbJUe5QI.js +0 -2
- /package/dist/{agent/channels.d.ts → channels/adapters.d.ts} +0 -0
- /package/dist/{agent/channels.js → channels/adapters.js} +0 -0
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import { t as invariant } from "./invariant-
|
|
2
|
-
|
|
3
|
-
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-Bm3JKYjz.js";
|
|
4
|
-
import { createRequire } from "node:module";
|
|
5
|
-
import { dirname, join, resolve } from "node:path";
|
|
6
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
7
|
-
import { fileURLToPath } from "node:url";
|
|
8
|
-
import { formatDiagnostic } from "nostics";
|
|
9
|
-
//#region ../internal/src/features.ts
|
|
1
|
+
import { t as invariant } from "./invariant-Dj2R1eMr.js";
|
|
2
|
+
// ../internal/src/features.ts
|
|
10
3
|
/**
|
|
11
4
|
* The feature keys of `vitehub({...})`. `vitehub add <feature>` and `vitehub status` read this list before the owner
|
|
12
5
|
* package of a feature is installed, so the catalog is plain data with no owner imports.
|
|
@@ -124,7 +117,7 @@ export default defineAgent({
|
|
|
124
117
|
hosts: {
|
|
125
118
|
...everywhere("nitro", "Nitro"),
|
|
126
119
|
deno: native("nitro", "Nitro", "Agent routes run in the Nitro output. The Agent Deno runtime is not supported on this host."),
|
|
127
|
-
netlify: native("nitro", "Nitro", "Agent HTTP routes run in generated functions. `agent.invocations` is not supported.")
|
|
120
|
+
netlify: native("nitro", "Nitro", "Agent HTTP routes run in generated functions. `agent.invocations` is not supported, so `agent: true` fails the build. Set `agent: { invocations: false }` and configure invocations on each Agent Definition.")
|
|
128
121
|
},
|
|
129
122
|
id: "agent",
|
|
130
123
|
packages: ["@vite-hub/agent"],
|
|
@@ -136,7 +129,11 @@ export default defineAgent({
|
|
|
136
129
|
enabledByDiscovery: sourceFiles("auth"),
|
|
137
130
|
hosts: everywhere("better-auth", "Better Auth"),
|
|
138
131
|
id: "auth",
|
|
139
|
-
packages: [
|
|
132
|
+
packages: [
|
|
133
|
+
"@vite-hub/auth",
|
|
134
|
+
"better-auth",
|
|
135
|
+
"drizzle-orm"
|
|
136
|
+
],
|
|
140
137
|
summary: "Better Auth sign-in, sessions, and organizations, with tables that ViteHub owns.",
|
|
141
138
|
title: "Auth"
|
|
142
139
|
}),
|
|
@@ -278,7 +275,7 @@ ${name === "default" ? "" : ` name: ${JSON.stringify(name)},\n`} schema: {
|
|
|
278
275
|
deno: explicit("database.connection", "libSQL / D1 / Postgres", "Configure hosted libSQL, D1 over authenticated HTTP, or a PostgreSQL Database Definition. No Deno-native database driver is provided."),
|
|
279
276
|
dev: native("sqlite", "SQLite", "Local SQLite through libSQL and Drizzle.", "single-host"),
|
|
280
277
|
netlify: explicit("database.connection", "libSQL / D1 / Postgres", "Configure hosted libSQL, D1 over authenticated HTTP, or a PostgreSQL Database Definition. No Netlify-native database driver is provided."),
|
|
281
|
-
node: native("sqlite", "SQLite / libSQL / Postgres", "SQLite or hosted libSQL through the selected Database connection, or a PostgreSQL Database Definition.", "single-host"),
|
|
278
|
+
node: native("sqlite", "SQLite / libSQL / Postgres", "SQLite or hosted libSQL through the selected Database connection, or a PostgreSQL Database Definition. Several servers can share Postgres and migrate on start under one advisory lock.", "single-host"),
|
|
282
279
|
vercel: explicit("database.connection", "libSQL / D1 / Postgres", "Configure hosted libSQL, D1 over authenticated HTTP, or a PostgreSQL Database Definition. The default local SQLite file is not supported in Vercel functions.")
|
|
283
280
|
},
|
|
284
281
|
id: "database",
|
|
@@ -293,7 +290,7 @@ ${name === "default" ? "" : ` name: ${JSON.stringify(name)},\n`} schema: {
|
|
|
293
290
|
deno: explicit("email.driver", "Resend", "Configure the built-in fetch-based Resend driver."),
|
|
294
291
|
dev: native("log", "Log", "`email: true` keeps each message in the development outbox and sends nothing. Set `email.driver` for a production build.", "process-local"),
|
|
295
292
|
netlify: explicit("email.driver", "Resend", "Configure the built-in Resend driver."),
|
|
296
|
-
node: explicit("email.driver", "Resend / custom", "Configure Resend or
|
|
293
|
+
node: explicit("email.driver", "Resend / SMTP / custom", "Configure Resend, `smtp` with the `nodemailer` package, or a driver module for another provider."),
|
|
297
294
|
vercel: explicit("email.driver", "Resend", "Configure the built-in Resend driver.")
|
|
298
295
|
},
|
|
299
296
|
developmentOverrides: [
|
|
@@ -316,9 +313,13 @@ ${name === "default" ? "" : ` name: ${JSON.stringify(name)},\n`} schema: {
|
|
|
316
313
|
}),
|
|
317
314
|
i18n: feature({
|
|
318
315
|
docs: "/docs/i18n",
|
|
319
|
-
hosts: everywhere("nitro", "Nitro 3", "Requires Nitro 3 with request async context
|
|
316
|
+
hosts: everywhere("nitro", "Nitro 3", "Requires Nitro 3 with request async context: Nuxt 4.7 or newer with the nitro package, Nuxt 5, or Vite with Nitro 3. On Nuxt 4, use i18n without i18n.workspace. Nitro 2 and Nuxt before 4.7 are unsupported."),
|
|
320
317
|
id: "i18n",
|
|
321
318
|
packages: ["@vite-hub/i18n"],
|
|
319
|
+
requiredOptions: [{
|
|
320
|
+
option: "i18n.locales",
|
|
321
|
+
detail: "Pass a nonempty JSON array of locale names or set locales in your I18n config."
|
|
322
|
+
}],
|
|
322
323
|
summary: "Messages with translation records for each locale and a locale for each request.",
|
|
323
324
|
title: "I18n"
|
|
324
325
|
}),
|
|
@@ -329,12 +330,13 @@ ${name === "default" ? "" : ` name: ${JSON.stringify(name)},\n`} schema: {
|
|
|
329
330
|
cloudflare: native("cloudflare", "Workers KV", "Cloudflare Workers KV binding."),
|
|
330
331
|
deno: native("deno-kv", "Deno KV", "Native Deno KV through Deno.openKv()."),
|
|
331
332
|
dev: native("fs-lite", "fs-lite", "Local filesystem-backed KV for development.", "single-host"),
|
|
332
|
-
netlify: explicit("kv.driver", "Upstash / Redis", "Set `kv.driver` to `upstash`, `redis`, or `database`, or set Upstash REST credentials at build time. No Netlify-native KV output is provided. Without them, KV uses a Postgres Default Database, else `fs-lite` files that other function instances cannot read."),
|
|
333
|
+
netlify: explicit("kv.driver", "Upstash / Redis", "Set `kv.driver` (or `kv.stores.default.driver` when using multiple stores) to `upstash`, `redis`, or `database`, or set Upstash REST credentials at build time. No Netlify-native KV output is provided. Without them, KV uses a Postgres Default Database, else `fs-lite` files that other function instances cannot read."),
|
|
333
334
|
node: native("fs-lite", "Redis / Postgres / fs-lite", "A table in a Postgres Default Database, else local files. Redis requires kv: { driver: 'redis' }; REDIS_URL supplies its URL on every server. Upstash with REST credentials at build time.", "single-host"),
|
|
334
335
|
vercel: native("upstash", "Upstash", "Upstash Redis with KV REST credentials.")
|
|
335
336
|
},
|
|
336
337
|
id: "kv",
|
|
337
338
|
packages: ["@vite-hub/kv"],
|
|
339
|
+
providerPackages: { driver: { upstash: ["@upstash/redis"] } },
|
|
338
340
|
summary: "Key-value storage with one API on every host.",
|
|
339
341
|
title: "KV"
|
|
340
342
|
}),
|
|
@@ -343,6 +345,10 @@ ${name === "default" ? "" : ` name: ${JSON.stringify(name)},\n`} schema: {
|
|
|
343
345
|
hosts: everywhere("nitro", "Nitro"),
|
|
344
346
|
id: "mcp",
|
|
345
347
|
packages: ["@vite-hub/mcp"],
|
|
348
|
+
requiredOptions: [{
|
|
349
|
+
option: "mcp.auth",
|
|
350
|
+
detail: "Choose an access mode when Auth is disabled. With Auth enabled, MCP requires sign-in by default. The optional mode requires Auth and lets anyone call public tools. Set false only when anyone may call every tool."
|
|
351
|
+
}],
|
|
346
352
|
summary: "The app's own MCP server, with one tool per file in `server/mcp/tools/`.",
|
|
347
353
|
title: "MCP server"
|
|
348
354
|
}),
|
|
@@ -465,7 +471,7 @@ export default defineSchedule({
|
|
|
465
471
|
deno: native("deno", "Deno.cron", "`Deno.cron` output that the generated `.output/main.ts` loads before the Nitro server."),
|
|
466
472
|
dev: native("local", "Local / process", "Local development runner and the explicit process runtime.", "single-host"),
|
|
467
473
|
netlify: native("netlify", "Scheduled fn", "One generated Netlify scheduled function per static Schedule."),
|
|
468
|
-
node: native("process", "process", "Process runtime
|
|
474
|
+
node: native("process", "process", "Process runtime in the server process. `schedule: true` uses it. Set `providerOutput: false` to wake Schedules yourself. With a Postgres or remote libSQL Default Database, servers claim occurrences in `vitehub_leases`. A run can repeat if its lease expires. Without a shared lease store, run one server.", "single-host"),
|
|
469
475
|
vercel: native("vercel", "Vercel Cron", "Vercel Cron Jobs provider output.")
|
|
470
476
|
},
|
|
471
477
|
id: "schedule",
|
|
@@ -540,7 +546,7 @@ function featurePackages(id, value, host, enabled = []) {
|
|
|
540
546
|
const definition = features[id];
|
|
541
547
|
const options = value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
542
548
|
const stores = options?.stores;
|
|
543
|
-
const selected = (id === "blob" && stores && typeof stores === "object" && !Array.isArray(stores) ? [value, ...Object.values(stores)] : [value]).flatMap((value) => Object.entries(definition.providerPackages ?? {}).flatMap(([key, choices]) => {
|
|
549
|
+
const selected = ((id === "blob" || id === "kv") && stores && typeof stores === "object" && !Array.isArray(stores) ? [value, ...Object.values(stores)] : [value]).flatMap((value) => Object.entries(definition.providerPackages ?? {}).flatMap(([key, choices]) => {
|
|
544
550
|
const choice = value && typeof value === "object" && !Array.isArray(value) ? Reflect.get(value, key) : void 0;
|
|
545
551
|
return typeof choice === "string" ? choices[choice] ?? [] : [];
|
|
546
552
|
}));
|
|
@@ -549,9 +555,18 @@ function featurePackages(id, value, host, enabled = []) {
|
|
|
549
555
|
const sandboxDriver = typeof options?.driver === "string" ? options.driver : host;
|
|
550
556
|
if (id === "sandboxTask" && (sandboxDriver === "vercel" || sandboxDriver === "cloudflare")) selected.push(sandboxDriverPackages[sandboxDriver]);
|
|
551
557
|
if ((id === "queue" || id === "workflow") && host === "vercel" && (options?.driver ?? "vercel") === "vercel") selected.push(...vercelProviderPackages[id]);
|
|
558
|
+
if (id === "email" && options?.driver === "smtp" && host !== "cloudflare") selected.push(...ownerCheckedPackages.email ?? []);
|
|
552
559
|
if (id === "console" && enabled.includes("agent")) selected.push(...consoleFeaturePackages.agents);
|
|
553
560
|
return [.../* @__PURE__ */ new Set([...definition.packages, ...selected])];
|
|
554
561
|
}
|
|
562
|
+
const ownerCheckedPackages = { email: ["nodemailer"] };
|
|
563
|
+
/**
|
|
564
|
+
* Whether `vitehub add` installs `name` for feature `id`, but the feature's owner package checks it itself, because only
|
|
565
|
+
* the owner knows when the app loads it. `vite-hub` does not require such a package before the owner runs.
|
|
566
|
+
*/
|
|
567
|
+
function isOwnerCheckedPackage(id, name) {
|
|
568
|
+
return ownerCheckedPackages[id]?.includes(name) ?? false;
|
|
569
|
+
}
|
|
555
570
|
const sandboxDriverPackages = {
|
|
556
571
|
cloudflare: "@cloudflare/sandbox",
|
|
557
572
|
vercel: "@vercel/sandbox"
|
|
@@ -564,6 +579,30 @@ const vercelProviderPackages = {
|
|
|
564
579
|
queue: ["@vercel/queue", "@vercel/functions"],
|
|
565
580
|
workflow: ["@vercel/functions"]
|
|
566
581
|
};
|
|
582
|
+
const drizzleRange = "1.0.0-rc.5 || 1.0.0-rc.6 || ^1.0.0";
|
|
583
|
+
const installRanges = {
|
|
584
|
+
"drizzle-kit": drizzleRange,
|
|
585
|
+
"drizzle-orm": drizzleRange
|
|
586
|
+
};
|
|
587
|
+
/**
|
|
588
|
+
* The package manager argument that installs `name`, such as `drizzle-orm@1.0.0-rc.5 || 1.0.0-rc.6 || ^1.0.0`. Drizzle tags 0.x as
|
|
589
|
+
* `latest` and the next 1.0 candidate as `rc`, so a plain name installs a version that ViteHub cannot import. npm saves
|
|
590
|
+
* the range as written, and an exact version would be saved as `^1.0.0-rc.5`, which also matches later candidates.
|
|
591
|
+
* Other packages keep their name. Feature catalogs, status, and removal use the plain name.
|
|
592
|
+
*/
|
|
593
|
+
function installSpecifier(name) {
|
|
594
|
+
const range = installRanges[name];
|
|
595
|
+
return range ? `${name}@${range}` : name;
|
|
596
|
+
}
|
|
597
|
+
function quoteSupportedInstallSpecifier(value) {
|
|
598
|
+
const separator = value.indexOf("@", 1);
|
|
599
|
+
if (separator < 0) return void 0;
|
|
600
|
+
const name = value.slice(0, separator);
|
|
601
|
+
return Object.hasOwn(installRanges, name) && value === installSpecifier(name) ? `"${value}"` : void 0;
|
|
602
|
+
}
|
|
603
|
+
function formatInstallArgument(value) {
|
|
604
|
+
return quoteSupportedInstallSpecifier(value) ?? (/^[\w@%+=:,./-]+$/u.test(value) ? value : `'${value.replaceAll("'", `'\\''`)}'`);
|
|
605
|
+
}
|
|
567
606
|
/** Additional Console owners selected by its enabled Agent integration. */
|
|
568
607
|
const consoleFeaturePackages = { agents: ["@libsql/client", "drizzle-orm"] };
|
|
569
608
|
function featureSupport(id, host, appHost) {
|
|
@@ -573,331 +612,4 @@ function featureSupport(id, host, appHost) {
|
|
|
573
612
|
if (id === "workflow" && appHost === "deno") return native("vercel", "Inline", "Development runs each Workflow inline unless OpenWorkflow storage or a provider is configured.", "process-local");
|
|
574
613
|
return definition.hosts[appHost === "node" || definition.developmentOverrides?.includes(appHost) ? "dev" : appHost];
|
|
575
614
|
}
|
|
576
|
-
|
|
577
|
-
//#region src/internal/optional-owners.ts
|
|
578
|
-
/**
|
|
579
|
-
* The packages that the app installs for each feature, in `pnpm add` order. `vite-hub` declares each one as an optional
|
|
580
|
-
* peer, so it resolves them from the app. Features in the catalog of `@vite-hub/internal/features` read their packages
|
|
581
|
-
* from it.
|
|
582
|
-
*/
|
|
583
|
-
const optionalFeaturePackages = {
|
|
584
|
-
"agent": features.agent.packages,
|
|
585
|
-
"auth": features.auth.packages,
|
|
586
|
-
"blob": features.blob.packages,
|
|
587
|
-
"browser": features.browser.packages,
|
|
588
|
-
"channels": features.channels.packages,
|
|
589
|
-
"cms": ["@vite-hub/cms"],
|
|
590
|
-
"comments": features.comments.packages,
|
|
591
|
-
"connections": features.connections.packages,
|
|
592
|
-
"console agents": consoleFeaturePackages.agents,
|
|
593
|
-
"console mcp-client": ["@modelcontextprotocol/sdk"],
|
|
594
|
-
"console ui": [
|
|
595
|
-
"@vite-hub/ui",
|
|
596
|
-
"@json-render/core",
|
|
597
|
-
"@json-render/vue",
|
|
598
|
-
"@vueuse/core"
|
|
599
|
-
],
|
|
600
|
-
"content": ["@vite-hub/content"],
|
|
601
|
-
"database": features.database.packages,
|
|
602
|
-
"choices": ["@vite-hub/choices"],
|
|
603
|
-
"device": ["@vite-hub/device"],
|
|
604
|
-
"email": features.email.packages,
|
|
605
|
-
"forge": ["@vite-hub/forge"],
|
|
606
|
-
"forms": ["@vite-hub/forms"],
|
|
607
|
-
"gateways": ["@vite-hub/gateways"],
|
|
608
|
-
"i18n": features.i18n.packages,
|
|
609
|
-
"kv": features.kv.packages,
|
|
610
|
-
"markdown-template": ["@vite-hub/markdown-template"],
|
|
611
|
-
"mcp": features.mcp.packages,
|
|
612
|
-
"migrate": ["@vite-hub/codemods"],
|
|
613
|
-
"presets": ["@vite-hub/presets", "@vite-hub/agent"],
|
|
614
|
-
"queue": features.queue.packages,
|
|
615
|
-
"rateLimit": features.rateLimit.packages,
|
|
616
|
-
"realtime": features.realtime.packages,
|
|
617
|
-
"sandboxTask": features.sandboxTask.packages,
|
|
618
|
-
"schedule": features.schedule.packages,
|
|
619
|
-
"shell": ["@vite-hub/shell"],
|
|
620
|
-
"sync": ["@vite-hub/sync"],
|
|
621
|
-
"ui": ["@vite-hub/ui"],
|
|
622
|
-
"webhooks": ["@vite-hub/webhooks"],
|
|
623
|
-
"workflow": features.workflow.packages,
|
|
624
|
-
"workspace": features.workspace.packages
|
|
625
|
-
};
|
|
626
|
-
/**
|
|
627
|
-
* The results of `isPackageInstalled` in this process. Each lookup resolves from `vite-hub` itself, so the package name
|
|
628
|
-
* is the key. A dev start asks for the same packages two or three times, and most of them are missing.
|
|
629
|
-
*/
|
|
630
|
-
const packageChecks = /* @__PURE__ */ new Map();
|
|
631
|
-
/** Whether the app installed `packageName`, as `vite-hub` resolves it. The result stays until `forgetPackageChecks`. */
|
|
632
|
-
function isPackageInstalled(packageName) {
|
|
633
|
-
let installed = packageChecks.get(packageName);
|
|
634
|
-
if (installed === void 0) {
|
|
635
|
-
installed = resolvesPackage(packageName);
|
|
636
|
-
packageChecks.set(packageName, installed);
|
|
637
|
-
}
|
|
638
|
-
return installed;
|
|
639
|
-
}
|
|
640
|
-
/**
|
|
641
|
-
* Forgets the results of `isPackageInstalled`, so that the next check sees the packages that the app installed or
|
|
642
|
-
* removed since then. The `vite-hub/dependencies` plugin calls it when the dev server or the build closes.
|
|
643
|
-
*/
|
|
644
|
-
function forgetPackageChecks() {
|
|
645
|
-
packageChecks.clear();
|
|
646
|
-
}
|
|
647
|
-
let startedPackageChecks = false;
|
|
648
|
-
/**
|
|
649
|
-
* Forgets the results of an earlier start. `vitehub()` calls it each time Vite loads the app config, and the Nuxt module
|
|
650
|
-
* calls it when Nuxt asks for its dependencies, first on each start. A Vite restart creates the new server before it
|
|
651
|
-
* closes the old one, so `closeBundle` comes after the config hooks of the new server. A Nuxt start that fails before
|
|
652
|
-
* Vite starts closes no plugin. The first start keeps the results of the checks that the import of `vite-hub` made.
|
|
653
|
-
*/
|
|
654
|
-
function startPackageChecks() {
|
|
655
|
-
if (startedPackageChecks) forgetPackageChecks();
|
|
656
|
-
startedPackageChecks = true;
|
|
657
|
-
}
|
|
658
|
-
function resolvesPackage(packageName) {
|
|
659
|
-
try {
|
|
660
|
-
import.meta.resolve(`${packageName}/package.json`);
|
|
661
|
-
return true;
|
|
662
|
-
} catch (error) {
|
|
663
|
-
if (error instanceof Error && "code" in error && error.code === "ERR_MODULE_NOT_FOUND") return false;
|
|
664
|
-
}
|
|
665
|
-
try {
|
|
666
|
-
import.meta.resolve(packageName);
|
|
667
|
-
return true;
|
|
668
|
-
} catch {
|
|
669
|
-
return false;
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
/**
|
|
673
|
-
* Whether the app at `root` installed `packageName` in its own `node_modules` or one of its parents. `isPackageInstalled`
|
|
674
|
-
* resolves from `vite-hub`, which also sees the development dependencies of a source checkout. `require.resolve` also
|
|
675
|
-
* reads `NODE_PATH`, which pnpm bin scripts point at every hoisted package.
|
|
676
|
-
*/
|
|
677
|
-
function isPackageInstalledInApp(root, packageName) {
|
|
678
|
-
for (let directory = resolve(root);; directory = dirname(directory)) {
|
|
679
|
-
if (existsSync(join(directory, "node_modules", packageName, "package.json"))) return true;
|
|
680
|
-
if (dirname(directory) === directory) return false;
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
/** Loads a module of an optional owner package, or returns `undefined` when the app did not install the package. */
|
|
684
|
-
async function importOptionalOwner(packageName, load) {
|
|
685
|
-
return isPackageInstalled(packageName) ? await load() : void 0;
|
|
686
|
-
}
|
|
687
|
-
/**
|
|
688
|
-
* The `pnpm add` arguments for `packages`. A pkg.pr.new preview of `vite-hub` keeps the npm version in its optional
|
|
689
|
-
* peers, so a plain name installs the npm release. The preview's own `@vite-hub/*` dependencies point at pkg.pr.new, so
|
|
690
|
-
* the other ViteHub packages get the URL of the same preview.
|
|
691
|
-
*/
|
|
692
|
-
function installArguments(packages, manifest = readViteHubManifest()) {
|
|
693
|
-
const dependencies = isRecord(manifest) && isRecord(manifest.dependencies) ? manifest.dependencies : {};
|
|
694
|
-
const preview = Object.entries(dependencies).flatMap(([name, specifier]) => {
|
|
695
|
-
if (!name.startsWith("@vite-hub/") || typeof specifier !== "string" || !specifier.startsWith("https://pkg.pr.new/")) return [];
|
|
696
|
-
const [base, ref] = specifier.split(`/${name}@`);
|
|
697
|
-
return base && ref ? [{
|
|
698
|
-
base,
|
|
699
|
-
ref
|
|
700
|
-
}] : [];
|
|
701
|
-
})[0];
|
|
702
|
-
return packages.map((name) => preview && name.startsWith("@vite-hub/") ? `${preview.base}/${name}@${preview.ref}` : name);
|
|
703
|
-
}
|
|
704
|
-
function readViteHubManifest() {
|
|
705
|
-
return JSON.parse(readFileSync(fileURLToPath(import.meta.resolve("vite-hub/package.json")), "utf8"));
|
|
706
|
-
}
|
|
707
|
-
/**
|
|
708
|
-
* The packages that each feature in `enabled` adds on `host` with its option value in `options`. `vitehub add` and
|
|
709
|
-
* `vitehub status` read the same catalog, so the build asks for the packages that the CLI installs.
|
|
710
|
-
*/
|
|
711
|
-
function hostFeaturePackages(enabled, host, options) {
|
|
712
|
-
return Object.fromEntries(enabled.flatMap((feature) => {
|
|
713
|
-
if (!isFeatureId(feature)) return [];
|
|
714
|
-
const added = featurePackages(feature, Reflect.get(options, feature), host).filter((name) => !optionalFeaturePackages[feature].includes(name));
|
|
715
|
-
return added.length ? [[feature, added]] : [];
|
|
716
|
-
}));
|
|
717
|
-
}
|
|
718
|
-
function isFeatureId(feature) {
|
|
719
|
-
return featureIds.some((id) => id === feature);
|
|
720
|
-
}
|
|
721
|
-
function packagesOf(feature, hostPackages) {
|
|
722
|
-
return [.../* @__PURE__ */ new Set([...optionalFeaturePackages[feature], ...hostPackages[feature] ?? []])];
|
|
723
|
-
}
|
|
724
|
-
/** Whether `packageName` is installed where the feature loads it: from `vite-hub` for its own peers, else from the owner. */
|
|
725
|
-
function isFeaturePackageInstalled(feature, packageName) {
|
|
726
|
-
const own = optionalFeaturePackages[feature];
|
|
727
|
-
if (own.includes(packageName)) return isPackageInstalled(packageName);
|
|
728
|
-
return isPackageInstalled(packageName) || isPackageInstalledFrom(own[0], packageName);
|
|
729
|
-
}
|
|
730
|
-
/** Whether `owner` resolves `packageName`. pnpm links an optional peer only into the packages that declare it. */
|
|
731
|
-
function isPackageInstalledFrom(owner, packageName) {
|
|
732
|
-
const key = `${owner}>${packageName}`;
|
|
733
|
-
let installed = packageChecks.get(key);
|
|
734
|
-
if (installed === void 0) {
|
|
735
|
-
installed = resolvesPackageFrom(owner, packageName);
|
|
736
|
-
packageChecks.set(key, installed);
|
|
737
|
-
}
|
|
738
|
-
return installed;
|
|
739
|
-
}
|
|
740
|
-
function isModuleNotFound(error) {
|
|
741
|
-
return error instanceof Error && "code" in error && (error.code === "MODULE_NOT_FOUND" || error.code === "ERR_MODULE_NOT_FOUND");
|
|
742
|
-
}
|
|
743
|
-
function resolvesPackageFrom(owner, packageName) {
|
|
744
|
-
let ownerFile;
|
|
745
|
-
try {
|
|
746
|
-
ownerFile = fileURLToPath(import.meta.resolve(`${owner}/package.json`));
|
|
747
|
-
} catch {
|
|
748
|
-
return false;
|
|
749
|
-
}
|
|
750
|
-
try {
|
|
751
|
-
createRequire(ownerFile).resolve(`${packageName}/package.json`);
|
|
752
|
-
return true;
|
|
753
|
-
} catch (error) {
|
|
754
|
-
return !isModuleNotFound(error);
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
/**
|
|
758
|
-
* The error for enabled features whose packages the app did not install. It lists one install command for every package
|
|
759
|
-
* that it names. A package that another dependency happens to provide is still an optional peer of `vite-hub`, so the
|
|
760
|
-
* app installs it too.
|
|
761
|
-
*/
|
|
762
|
-
function missingFeaturePackagesError(features, hostPackages = {}) {
|
|
763
|
-
const lines = features.map((feature) => `The ${feature} feature needs ${packagesOf(feature, hostPackages).join(", ")}.`);
|
|
764
|
-
const packages = [...new Set(features.flatMap((feature) => packagesOf(feature, hostPackages)))];
|
|
765
|
-
return viteHubErrorDiagnostics.VITE_HUB_R0136({ message: `[vitehub] ${lines.join(" ")} Install them in your app with: pnpm add ${installArguments(packages).join(" ")}` });
|
|
766
|
-
}
|
|
767
|
-
/**
|
|
768
|
-
* Throws when an enabled feature misses one of its packages or has a ViteHub package outside the range of `vite-hub`,
|
|
769
|
-
* and warns when another installed package is outside its range. `hostPackages` adds the packages that the host or a
|
|
770
|
-
* provider needs, from `hostFeaturePackages`.
|
|
771
|
-
*/
|
|
772
|
-
function assertFeaturePackages(features, hostPackages = {}, reportVersionError = true) {
|
|
773
|
-
const isMissing = (feature) => !packagesOf(feature, hostPackages).every((name) => isFeaturePackageInstalled(feature, name));
|
|
774
|
-
if (features.some(isMissing)) {
|
|
775
|
-
forgetPackageChecks();
|
|
776
|
-
const missing = features.filter(isMissing);
|
|
777
|
-
if (missing.length) throw missingFeaturePackagesError(missing, hostPackages);
|
|
778
|
-
}
|
|
779
|
-
checkPackageVersions(features.flatMap((feature) => packagesOf(feature, hostPackages)), reportVersionError);
|
|
780
|
-
}
|
|
781
|
-
/**
|
|
782
|
-
* The `version` of the installed `packageName`, as `vite-hub` resolves it, from the manifest that names the package. It
|
|
783
|
-
* is `undefined` when the package is missing or its manifest has no version.
|
|
784
|
-
*/
|
|
785
|
-
function installedPackageVersion(packageName) {
|
|
786
|
-
let manifest;
|
|
787
|
-
try {
|
|
788
|
-
manifest = readInstalledManifest(packageName);
|
|
789
|
-
} catch {
|
|
790
|
-
return;
|
|
791
|
-
}
|
|
792
|
-
return isRecord(manifest) && typeof manifest.version === "string" ? manifest.version : void 0;
|
|
793
|
-
}
|
|
794
|
-
function readInstalledManifest(packageName) {
|
|
795
|
-
let file;
|
|
796
|
-
for (const specifier of [`${packageName}/package.json`, packageName]) try {
|
|
797
|
-
file = fileURLToPath(import.meta.resolve(specifier));
|
|
798
|
-
break;
|
|
799
|
-
} catch (error) {
|
|
800
|
-
if (error instanceof Error && "code" in error && error.code === "ERR_MODULE_NOT_FOUND") return void 0;
|
|
801
|
-
}
|
|
802
|
-
if (file === void 0) return void 0;
|
|
803
|
-
for (let directory = dirname(file); dirname(directory) !== directory; directory = dirname(directory)) {
|
|
804
|
-
const manifestFile = join(directory, "package.json");
|
|
805
|
-
if (!existsSync(manifestFile)) continue;
|
|
806
|
-
const manifest = JSON.parse(readFileSync(manifestFile, "utf8"));
|
|
807
|
-
if (isRecord(manifest) && manifest.name === packageName) return manifest;
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
/** Quotes `value` for a POSIX shell when it needs quotes, such as a range with `^`, `<`, or a space. */
|
|
811
|
-
function shellArgument(value) {
|
|
812
|
-
return /^[\w@%+=:,./-]+$/u.test(value) ? value : `'${value.replaceAll("'", `'\\''`)}'`;
|
|
813
|
-
}
|
|
814
|
-
/**
|
|
815
|
-
* Installed packages whose version is outside the range in the `peerDependencies` of `vite-hub`, with the sentences
|
|
816
|
-
* that name them and the `pnpm add` arguments that install supported versions. A package without a version, or with a
|
|
817
|
-
* range that is not semver, such as `workspace:*` in a source checkout, is not checked. A prerelease of a supported
|
|
818
|
-
* release line is in range.
|
|
819
|
-
*/
|
|
820
|
-
function unsupportedPackageVersions(packages, versionOf, manifest) {
|
|
821
|
-
const peers = isRecord(manifest) && isRecord(manifest.peerDependencies) ? manifest.peerDependencies : {};
|
|
822
|
-
const { satisfies, validRange, validVersion } = semverFunctions();
|
|
823
|
-
const unsupported = [...new Set(packages)].flatMap((name) => {
|
|
824
|
-
const range = peers[name];
|
|
825
|
-
if (typeof range !== "string" || validRange(range) === null) return [];
|
|
826
|
-
const version = versionOf(name);
|
|
827
|
-
if (version === void 0 || validVersion(version) === null || satisfies(version, range, { includePrerelease: true })) return [];
|
|
828
|
-
return [{
|
|
829
|
-
name,
|
|
830
|
-
range,
|
|
831
|
-
version
|
|
832
|
-
}];
|
|
833
|
-
});
|
|
834
|
-
if (!unsupported.length) return void 0;
|
|
835
|
-
const viteHub = isRecord(manifest) && typeof manifest.version === "string" ? `vite-hub ${manifest.version}` : "vite-hub";
|
|
836
|
-
const installed = unsupported.map(({ name, range, version }) => `${name} ${version} is installed, but ${viteHub} supports ${name}@${range}.`).join(" ");
|
|
837
|
-
const previews = installArguments(unsupported.map(({ name }) => name), manifest);
|
|
838
|
-
return {
|
|
839
|
-
install: unsupported.map(({ name, range }, index) => shellArgument(previews[index] === name ? `${name}@${range}` : previews[index])).join(" "),
|
|
840
|
-
installed
|
|
841
|
-
};
|
|
842
|
-
}
|
|
843
|
-
const isViteHubPackage = (name) => name.startsWith("@vite-hub/");
|
|
844
|
-
/**
|
|
845
|
-
* The error for installed ViteHub packages outside the range of `vite-hub`, or `undefined` when all are in range.
|
|
846
|
-
* ViteHub packages of another release share internal contracts with `vite-hub` that can change in any commit.
|
|
847
|
-
*/
|
|
848
|
-
function unsupportedViteHubPackagesError(packages, versionOf = installedPackageVersion, manifest = readViteHubManifest()) {
|
|
849
|
-
const unsupported = unsupportedPackageVersions(packages.filter(isViteHubPackage), versionOf, manifest);
|
|
850
|
-
return unsupported && viteHubErrorDiagnostics.VITE_HUB_PACKAGE_VERSION_UNSUPPORTED(unsupported);
|
|
851
|
-
}
|
|
852
|
-
/** The warning for other installed packages outside the range of `vite-hub`, or `undefined` when all are in range. */
|
|
853
|
-
function unsupportedPackageVersionsWarning(packages, versionOf = installedPackageVersion, manifest = readViteHubManifest()) {
|
|
854
|
-
const unsupported = unsupportedPackageVersions(packages.filter((name) => !isViteHubPackage(name)), versionOf, manifest);
|
|
855
|
-
return unsupported && `[vitehub] ${unsupported.installed} Other versions can fail at runtime with errors that do not name the version. Update vite-hub to a release that supports these versions, or install supported versions in your app with: pnpm add ${unsupported.install}`;
|
|
856
|
-
}
|
|
857
|
-
let semver;
|
|
858
|
-
/**
|
|
859
|
-
* Loads semver when a version check runs, so `vite-hub/nuxt` starts without it. The `semver` entry loads every one of
|
|
860
|
-
* its 47 modules. These three load a handful.
|
|
861
|
-
*/
|
|
862
|
-
function semverFunctions() {
|
|
863
|
-
if (semver) return semver;
|
|
864
|
-
const require = createRequire(import.meta.url);
|
|
865
|
-
semver = {
|
|
866
|
-
satisfies: require("semver/functions/satisfies.js"),
|
|
867
|
-
validRange: require("semver/ranges/valid.js"),
|
|
868
|
-
validVersion: require("semver/functions/valid.js")
|
|
869
|
-
};
|
|
870
|
-
return semver;
|
|
871
|
-
}
|
|
872
|
-
const checkedPackageVersions = /* @__PURE__ */ new Set();
|
|
873
|
-
let viteHubManifest;
|
|
874
|
-
/**
|
|
875
|
-
* Throws the error of `unsupportedViteHubPackagesError`, and prints the warning of `unsupportedPackageVersionsWarning`
|
|
876
|
-
* one time for each package in this process. The import facades call `assertFeaturePackages` for each import, so a
|
|
877
|
-
* package in range is checked only the first time. A package out of range stays unchecked, so the next check throws
|
|
878
|
-
* again until the app installs a supported version. A `vite-hub` manifest that the check cannot read turns it off.
|
|
879
|
-
*/
|
|
880
|
-
function checkPackageVersions(packages, reportVersionError) {
|
|
881
|
-
const unchecked = [...new Set(packages)].filter((name) => !checkedPackageVersions.has(name));
|
|
882
|
-
if (!unchecked.length) return;
|
|
883
|
-
if (viteHubManifest === void 0) try {
|
|
884
|
-
viteHubManifest = readViteHubManifest();
|
|
885
|
-
} catch {
|
|
886
|
-
viteHubManifest = null;
|
|
887
|
-
}
|
|
888
|
-
const error = unsupportedViteHubPackagesError(unchecked, installedPackageVersion, viteHubManifest);
|
|
889
|
-
if (error) {
|
|
890
|
-
if (reportVersionError) console.error(formatDiagnostic(error));
|
|
891
|
-
throw error;
|
|
892
|
-
}
|
|
893
|
-
for (const name of unchecked) checkedPackageVersions.add(name);
|
|
894
|
-
const warning = unsupportedPackageVersionsWarning(unchecked, installedPackageVersion, viteHubManifest);
|
|
895
|
-
if (warning) console.warn(warning);
|
|
896
|
-
}
|
|
897
|
-
/** Returns the loaded owner module, or throws the install error of `feature`. */
|
|
898
|
-
function requireOptionalOwner(module, feature) {
|
|
899
|
-
if (module === void 0) throw missingFeaturePackagesError([feature]);
|
|
900
|
-
return module;
|
|
901
|
-
}
|
|
902
|
-
//#endregion
|
|
903
|
-
export { installArguments as a, optionalFeaturePackages as c, featureSupport as d, features as f, importOptionalOwner as i, requireOptionalOwner as l, forgetPackageChecks as n, isPackageInstalled as o, hostFeaturePackages as r, isPackageInstalledInApp as s, assertFeaturePackages as t, startPackageChecks as u };
|
|
615
|
+
export { features as a, isOwnerCheckedPackage as c, featureSupport as i, quoteSupportedInstallSpecifier as l, featureIds as n, formatInstallArgument as o, featurePackages as r, installSpecifier as s, consoleFeaturePackages as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { a as features } from "./features-BXRKlmtN.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/console/runtime/client/format.ts
|
|
2
2
|
/**
|
|
3
3
|
* A size such as `512 B`, `11.5 KB`, or `64 MB`. Units are powers of 1024, as in Blob `maxSize` options. Values under
|
|
4
4
|
* 10 keep one decimal.
|
|
@@ -300,5 +300,4 @@ function consoleDayTime(value) {
|
|
|
300
300
|
month: "short"
|
|
301
301
|
}).format(time) : value;
|
|
302
302
|
}
|
|
303
|
-
//#endregion
|
|
304
303
|
export { consoleDuration as a, consoleNumber as c, consoleTimeOfDay as d, consoleValueParts as f, recentTimestamp as h, consoleDayTime as i, consoleRelativeTime as l, exactTimestamps as m, consoleClockTime as n, consoleDurationWords as o, dayLabel as p, consoleDateTime as r, consoleInitials as s, consoleBytes as t, consoleStatusValue as u };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@vite-hub/gateways/testing";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// src/console/runtime/github-login.ts
|
|
2
|
+
function githubAuthorLogin(value) {
|
|
3
|
+
const login = value?.trim();
|
|
4
|
+
return login && login.length <= 39 && /^[a-z\d](?:[a-z\d]|-(?=[a-z\d]))*(?:_[a-z\d]{3,8})?$/i.test(login) ? login : void 0;
|
|
5
|
+
}
|
|
6
|
+
export { githubAuthorLogin as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/logs/host.ts
|
|
2
2
|
const sourceKey = Symbol.for("vitehub.logs.source");
|
|
3
3
|
/** The host connects a source. It remains the owner of capture and provider setup. */
|
|
4
4
|
function installLogSource(projectRoot, source) {
|
|
@@ -7,5 +7,4 @@ function installLogSource(projectRoot, source) {
|
|
|
7
7
|
function getLogSource() {
|
|
8
8
|
return globalThis[sourceKey];
|
|
9
9
|
}
|
|
10
|
-
//#endregion
|
|
11
10
|
export { installLogSource as n, getLogSource as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createError } from "nitro/h3";
|
|
2
|
-
|
|
2
|
+
// src/console/runtime/server/http-error.ts
|
|
3
3
|
const reasonPhrase = /^[\t\x20-\x7E]{1,512}$/;
|
|
4
4
|
/**
|
|
5
5
|
* Turns an error into the HTTP error of a Console route. H3 marks a thrown error that is not its `HTTPError` as
|
|
@@ -26,5 +26,4 @@ function consoleHttpError(status, cause) {
|
|
|
26
26
|
why
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
-
//#endregion
|
|
30
29
|
export { consoleHttpError as t };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import "@vite-hub/env/vite";
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as RedirectsOptions, B as ViteHubHost, C as ObservabilityEvlogOptions, D as AgentInvocationsDefault, E as ConsoleOptions, F as DeployOptions, I as HealthOptions, M as SecurityHeaders, N as SecurityOptions, O as AgentInvocationsDefaultJournal, P as SeoOptions, R as DatabaseOptions, S as LogsOptions, T as SystemdOptions, V as detectHost, _ as KVOptions, a as ViteHubDeviceOptions, b as BrowserOptions, c as ViteHubQueueOptions, d as WorkflowOptions, f as WebContainerOptions, g as RateLimitOptions, h as RealtimeOptions, i as EnvOptions, j as SameOriginWritesOptions, k as WorkspaceOptions, l as QueueOptions, m as SandboxTaskOptions, n as CloudflareOptions, o as ViteHubNodeOptions, p as ScheduleOptions, r as ConnectionsOptions, s as ViteHubOptions, t as AgentOptions, u as I18nOptions, v as EmailOptions, w as ObservabilityOptions, x as BlobOptions, y as ChannelsOptions, z as CacheOptions } from "./plugins-BpiTVULl.js";
|
|
3
3
|
import { PluginOption } from "vite";
|
|
4
|
-
//#region ../auth/dist/types-CruflEFI.d.ts
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/types.d.ts
|
|
7
4
|
declare global {
|
|
8
5
|
namespace ViteHub {
|
|
9
6
|
interface AuthRuntimeEnv extends Record<string, unknown> {}
|
|
@@ -13,9 +10,6 @@ declare global {
|
|
|
13
10
|
}
|
|
14
11
|
/** `false` turns Auth off. `server/auth.ts` turns it on, and `defineAuth()` holds every Auth option. */
|
|
15
12
|
type AuthOptions = false;
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region src/index.d.ts
|
|
18
13
|
/** The ViteHub Vite plugins and Nitro, the server of the app. Nitro steps aside when the app adds `nitro()` itself. */
|
|
19
14
|
export declare function vitehub(options?: ViteHubOptions): PluginOption[];
|
|
20
|
-
|
|
21
|
-
export { type AgentInvocationsDefault, type AgentInvocationsDefaultJournal, type AgentOptions, type AuthOptions, type BlobOptions, type BrowserOptions, type CacheOptions, type ChannelsOptions, type CloudflareOptions, type ConnectionsOptions, type ConsoleOptions, type DatabaseOptions, type DeployOptions, type EmailOptions, type EnvOptions, type HealthOptions, type I18nOptions, type KVOptions, type LogsOptions, type ObservabilityEvlogOptions, type ObservabilityOptions, type QueueOptions, type RateLimitOptions, type RealtimeOptions, type RedirectsOptions, type SameOriginWritesOptions, type SandboxTaskOptions, type ScheduleOptions, type SecurityHeaders, type SecurityOptions, type SeoOptions, type SystemdOptions, type ViteHubDeviceOptions, type ViteHubHost, type ViteHubNodeOptions, type ViteHubOptions, type ViteHubQueueOptions, type WorkflowOptions, type WorkspaceOptions, detectHost };
|
|
15
|
+
export { type AgentInvocationsDefault, type AgentInvocationsDefaultJournal, type AgentOptions, type AuthOptions, type BlobOptions, type BrowserOptions, type CacheOptions, type ChannelsOptions, type CloudflareOptions, type ConnectionsOptions, type ConsoleOptions, type DatabaseOptions, type DeployOptions, type EmailOptions, type EnvOptions, type HealthOptions, type I18nOptions, type KVOptions, type LogsOptions, type ObservabilityEvlogOptions, type ObservabilityOptions, type QueueOptions, type RateLimitOptions, type RealtimeOptions, type RedirectsOptions, type SameOriginWritesOptions, type SandboxTaskOptions, type ScheduleOptions, type SecurityHeaders, type SecurityOptions, type SeoOptions, type SystemdOptions, type ViteHubDeviceOptions, type ViteHubHost, type ViteHubNodeOptions, type ViteHubOptions, type ViteHubQueueOptions, type WebContainerOptions, type WorkflowOptions, type WorkspaceOptions, detectHost };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ct as isIncludedNitroPlugin, dt as withShortInspect, lt as markIncludedNitroPlugin, r as viteHubPlugins } from "./plugins-H6-MQrsn.js";
|
|
2
|
+
import { u as startPackageChecks } from "./optional-owners-DAfShdgV.js";
|
|
3
|
+
import { n as detectHost } from "./deployment-CURATxjG.js";
|
|
3
4
|
import { nitro } from "nitro/vite";
|
|
4
|
-
|
|
5
|
+
// ../internal/src/build/included-nitro.ts
|
|
5
6
|
function flattenPlugins(option) {
|
|
6
7
|
if (Array.isArray(option)) return option.flatMap(flattenPlugins);
|
|
7
8
|
return option && typeof option === "object" && "name" in option ? [option] : [];
|
|
@@ -28,8 +29,7 @@ function includedNitro(options = {}) {
|
|
|
28
29
|
}
|
|
29
30
|
return plugins;
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
-
//#region src/index.ts
|
|
32
|
+
// src/index.ts
|
|
33
33
|
/** The ViteHub Vite plugins and Nitro, the server of the app. Nitro steps aside when the app adds `nitro()` itself. */
|
|
34
34
|
function vitehub(options = {}) {
|
|
35
35
|
try {
|
|
@@ -39,5 +39,4 @@ function vitehub(options = {}) {
|
|
|
39
39
|
throw withShortInspect(error);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
//#endregion
|
|
43
42
|
export { detectHost, vitehub };
|