vite-hub 0.5.0 → 0.6.0
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 +9 -8
- package/dist/_internal/runtime/browser-errors.d.ts +0 -2
- package/dist/_internal/runtime/browser-errors.js +3 -4
- 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 +1 -2
- package/dist/_internal/runtime/request-policy.js +2 -3
- package/dist/_internal/runtime/security.d.ts +1 -2
- package/dist/_internal/runtime/security.js +1 -2
- package/dist/{access-BC9HtX_M.js → access-CUFHPi8T.js} +13 -140
- package/dist/{access-policy-DhsEACna.d.ts → access-DkBck8Vu.d.ts} +17 -21
- package/dist/{access-policy-CVZg9LPR.js → access-policy-BM48XstY.js} +5 -6
- package/dist/{account-Cjj-tYzo.d.ts → account-DNr8fHcQ.d.ts} +5 -7
- package/dist/{console/runtime/server → agent/console}/agents.get.d.ts +2 -3
- package/dist/{console/runtime/server → agent/console}/agents.get.js +3 -4
- package/dist/{console/runtime/server → agent/console}/channel-replay.d.ts +3 -5
- package/dist/{console/runtime/server → agent/console}/channel-replay.js +6 -7
- package/dist/{console/runtime/server → agent/console}/invocation-capabilities.get.d.ts +1 -3
- package/dist/{console/runtime/server → agent/console}/invocation-capabilities.get.js +4 -5
- package/dist/agent/console/invocation-workspace.get.d.ts +6 -0
- package/dist/{console/runtime/server → agent/console}/invocation-workspace.get.js +6 -7
- package/dist/{console/runtime/server → agent/console}/invocation.get.d.ts +4 -6
- package/dist/{console/runtime/server → agent/console}/invocation.get.js +8 -9
- package/dist/{console/runtime/server → agent/console}/invocations.get.d.ts +1 -2
- package/dist/{console/runtime/server → agent/console}/invocations.get.js +5 -6
- package/dist/agent/console/invocations.usage.d.ts +6 -0
- package/dist/agent/console/invocations.usage.js +51 -0
- package/dist/agent/console/operations.d.ts +6 -0
- package/dist/agent/console/operations.js +247 -0
- package/dist/{console/runtime/server → agent/console}/status.get.d.ts +2 -4
- package/dist/{console/runtime/server → agent/console}/status.get.js +6 -7
- package/dist/{server-W0c79AYZ.js → agent-console-CHsLxKk_.js} +4 -4
- package/dist/agent-console-FmaYpVv-.d.ts +14 -0
- package/dist/{agent-invocations.post-C3Onl2yH.js → agent-invocations.post-CF5anHY6.js} +14 -17
- package/dist/agents-DBm_PJie.js +1 -0
- package/dist/{agents-B76RICcy.js → agents-DXLHsE7x.js} +5 -6
- package/dist/{agents-C94A4N9u.d.ts → agents-Gyw4VKPt.d.ts} +0 -2
- package/dist/auth/console/auth.d.ts +25 -0
- package/dist/{console/runtime/server → auth/console}/auth.js +11 -13
- package/dist/auth/console/operations.d.ts +3 -0
- package/dist/auth/console/operations.js +135 -0
- package/dist/auth/server.js +1 -2
- package/dist/{auth-operations-GcQk0O0X.js → auth-operations-BKqoX8Ua.js} +4 -5
- package/dist/{auth-types-D3ugQ8xM.d.ts → auth-types-Cotn7406.d.ts} +4 -21
- package/dist/bin.js +8 -11
- package/dist/blob/console/operations.d.ts +3 -0
- package/dist/blob/console/operations.js +44 -0
- package/dist/blob/nuxt-image.js +1 -2
- package/dist/{blob-BcgsZtqM.js → blob-iw8pWQ6o.js} +5 -6
- package/dist/{blob-iVewd7KQ.d.ts → blob-uNin0_TV.d.ts} +1 -3
- package/dist/{browser-error-limits-CToqAD-O.js → browser-error-limits-B0yS95zt.js} +2 -4
- 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/{cli-config-FPHk1nbC.js → cli-config-BX8H4ZCo.js} +2 -3
- package/dist/cli-config-DgpmE_7z.js +1 -0
- package/dist/cms.js +1 -2
- package/dist/console/auth-types.d.ts +2 -2
- package/dist/console/auth.d.ts +2 -4
- package/dist/console/auth.js +2 -3
- package/dist/console/runtime/auth-operations.d.ts +4 -6
- 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 +29 -45
- package/dist/console/runtime/client/appearance.d.ts +1 -2
- package/dist/console/runtime/client/appearance.js +1 -2
- package/dist/console/runtime/client/auth-management.ts +6 -6
- 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 +3 -4
- 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 +7 -5
- package/dist/console/runtime/client/mcp-client.js +10 -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 +1 -1
- 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 -2
- 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 +83 -16
- package/dist/console/runtime/client/site-access.js +159 -32
- package/dist/console/runtime/client/site-link.d.ts +2 -0
- package/dist/console/runtime/client/site-link.js +1 -0
- package/dist/console/runtime/client/stored.d.ts +1 -3
- package/dist/console/runtime/client/stored.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-home.vue +9 -7
- 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 +7 -2
- 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-auth-detail.vue +1 -1
- package/dist/console/runtime/components/console-auth-event-list.vue +1 -0
- package/dist/console/runtime/components/console-document-editor.vue +3 -4
- package/dist/console/runtime/components/console-hosted-comments-embed.vue +106 -0
- package/dist/console/runtime/components/console-mcp-callback.vue +6 -1
- package/dist/console/runtime/components/console-mcp-items.vue +3 -16
- package/dist/console/runtime/components/console-site.vue +10 -8
- package/dist/console/runtime/components/console-usage.vue +2 -2
- 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 +14 -49
- package/dist/console/runtime/mcp-client.d.ts +2 -2
- package/dist/console/runtime/mcp-client.js +1 -2
- package/dist/console/runtime/operation-loader.d.ts +1 -0
- package/dist/console/runtime/operation-loader.js +10 -0
- package/dist/console/runtime/page-tool/account.js +26 -0
- package/dist/console/runtime/page-tool/page-tool.js +2 -2
- package/dist/console/runtime/rpc.d.ts +1 -1
- package/dist/console/runtime/rpc.js +1 -2
- package/dist/console/runtime/sections.d.ts +2 -2
- 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/agent-console.d.ts +2 -0
- package/dist/console/runtime/server/agent-console.js +1 -0
- package/dist/console/runtime/server/blob.d.ts +1 -1
- package/dist/console/runtime/server/blob.js +1 -2
- package/dist/console/runtime/server/database.d.ts +1 -1
- 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 +2 -2
- package/dist/console/runtime/server/documents.js +3 -3
- package/dist/console/runtime/server/entry-site-access.d.ts +3 -0
- package/dist/console/runtime/server/entry-site-access.js +4 -0
- package/dist/console/runtime/server/entry.d.ts +3 -0
- package/dist/console/runtime/server/entry.js +4 -0
- package/dist/console/runtime/server/env.d.ts +1 -3
- package/dist/console/runtime/server/env.js +1 -2
- 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/pill.d.ts +45 -0
- package/dist/console/runtime/server/pill.js +62 -0
- package/dist/console/runtime/server/rpc.d.ts +5 -10
- package/dist/console/runtime/server/rpc.js +19 -27
- package/dist/console/runtime/server/runtime.d.ts +1 -1
- package/dist/console/runtime/server/runtime.js +1 -2
- 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-access-operation.d.ts +7 -0
- package/dist/console/runtime/server/site-access-operation.js +36 -0
- package/dist/console/runtime/server/site-actions.d.ts +73 -0
- package/dist/console/runtime/server/site-actions.js +105 -0
- package/dist/console/runtime/server/site-entry.d.ts +16 -9
- package/dist/console/runtime/server/site-entry.js +62 -46
- package/dist/console/runtime/server/site-visitor.d.ts +17 -0
- package/dist/console/runtime/server/site-visitor.js +1 -0
- package/dist/console/runtime/server/site.d.ts +27 -0
- package/dist/console/runtime/server/site.js +1 -0
- package/dist/console/runtime/skills.d.ts +1 -3
- package/dist/console/runtime/skills.js +1 -2
- package/dist/console/server.d.ts +9 -25
- package/dist/console/server.js +8 -8
- package/dist/console/ui.d.ts +0 -10
- package/dist/console/ui.js +14 -27
- package/dist/console-lazy-views-VEjcbL4Q.js +1 -0
- package/dist/{console-route-CM2G5hiC.js → console-route-DbdnLkkF.js} +2 -3
- package/dist/console-signature--55DIKf2.js +237 -0
- package/dist/console.d.ts +1 -3
- package/dist/console.js +1 -2
- package/dist/content/console/operations.d.ts +3 -0
- package/dist/content/console/operations.js +62 -0
- package/dist/{console/runtime/server → database/console}/database.get.d.ts +2 -3
- package/dist/{console/runtime/server → database/console}/database.get.js +4 -5
- package/dist/database/console/operations.d.ts +3 -0
- package/dist/database/console/operations.js +49 -0
- package/dist/{database-UMJgnU2z.js → database-CrgBUdIx.js} +3 -4
- package/dist/{database-DC67Ipm-.d.ts → database-yFezh5U1.d.ts} +1 -3
- package/dist/{definition-catalog-BUcclwSH.js → definition-catalog-1xPPtzOx.js} +3 -4
- 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-DTytrw42.js → definitions-DGo2rNQ9.js} +5 -6
- package/dist/{definitions-Dbgxfz3I.d.ts → definitions-DRkgHKmk.d.ts} +1 -3
- package/dist/{deployment-BUshgN5Q.js → deployment-CURATxjG.js} +2 -3
- package/dist/deployment-l7RuKdEp.js +1 -0
- package/dist/{dev-peer-CHjyHYG6.js → dev-peer-CRYp01PE.js} +2 -222
- package/dist/dev-peer-CX5C9243.js +1 -0
- package/dist/{development-zLxOp-AO.js → development-DD567hhJ.js} +2 -3
- package/dist/{development-RnopiRwK.d.ts → development-I40mfD7B.d.ts} +1 -3
- package/dist/{diagnostics-DtR0TAmq.js → diagnostics-DLHqjKGe.js} +3 -9
- package/dist/diagnostics-DgGKvWzF.d.ts +7 -0
- package/dist/docs/nuxt.js +1 -2
- package/dist/doctor.d.ts +0 -6
- package/dist/doctor.js +11492 -12152
- package/dist/{documents-BDR0AkYR.d.ts → documents-A-7Ho0g0.d.ts} +12 -16
- package/dist/{documents-B4R4JSfH.js → documents-BduuZjm3.js} +6 -6
- package/dist/{documents-BASIRZ91.d.ts → documents-CApMRd4o.d.ts} +4 -7
- package/dist/{documents-BewAPY61.js → documents-D6ueeoUR.js} +17 -21
- package/dist/durability/operations.d.ts +2 -4
- package/dist/durability/operations.js +3 -4
- package/dist/{entries-DbyNPLC9.js → entries-UFs9n1MB.js} +2 -3
- package/dist/{console/runtime/server → env/console}/env.get.d.ts +2 -4
- package/dist/env/console/env.get.js +15 -0
- package/dist/env/console/operations.d.ts +3 -0
- package/dist/env/console/operations.js +12 -0
- package/dist/env/vite.d.ts +1 -0
- package/dist/env/vite.js +2 -0
- package/dist/{env-Dg1I_DWr.js → env-D-wtSupz.js} +2 -3
- package/dist/{error-diagnostics-B1yAIaSn.js → error-diagnostics-CBtvqI30.js} +2 -7
- package/dist/{error-diagnostics-C0KyI408.js → error-diagnostics-kKXseq8d.js} +5 -2
- package/dist/error-diagnostics.ts +1 -7
- package/dist/{features-CC5OcZqJ.js → features-BXRKlmtN.js} +5 -6
- package/dist/features-CD5i5I8V.js +1 -0
- package/dist/{format-BOYlanIZ.js → format-Df-bS4Ly.js} +1 -2
- package/dist/{github-login-Bi3bfjRX.js → github-login-W-vaahWP.js} +1 -2
- 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 +1 -7
- package/dist/index.js +5 -7
- package/dist/{inspect-DbZuP_7b.js → inspect-CWwAuL-B.js} +2 -3
- 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-Cc9N0shU.d.ts → internal-BRNf11h3.d.ts} +14 -8
- package/dist/{invariant-DolT9EEx.js → invariant-Dj2R1eMr.js} +1 -2
- package/dist/{invocation-page-undo-DqYcPlkQ.js → invocation-page-undo-DHbXczWY.js} +8 -7
- package/dist/invocations-B60XWNES.js +45 -0
- package/dist/{limits-BUlwWYQE.js → limits-BLo31qDR.js} +1 -2
- package/dist/logs/client.d.ts +1 -3
- package/dist/logs/client.js +1 -2
- package/dist/{console/runtime/server → logs/console}/logs.get.d.ts +3 -5
- package/dist/{console/runtime/server → logs/console}/logs.get.js +7 -8
- package/dist/logs/console/operations.d.ts +3 -0
- package/dist/logs/console/operations.js +23 -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/loopback-Bl9Cvj1k.js +139 -0
- package/dist/mcp/eval.d.ts +1 -0
- package/dist/mcp/eval.js +2 -0
- package/dist/{mcp-client-C_sEmyQw.d.ts → mcp-client-uXVvS7RL.d.ts} +5 -10
- package/dist/{media-uKX4Wy-c.d.ts → media-C79RB1oH.d.ts} +0 -2
- package/dist/{media-D3OfyKni.js → media-CNwnh6CG.js} +8 -9
- package/dist/{media-library-o8RRsnn_.js → media-library-DTC8TLsZ.js} +5 -6
- package/dist/{media-library-D9ThbXqs.d.ts → media-library-DxGu6w9z.d.ts} +0 -2
- package/dist/{memory-C54SDH_l.js → memory-D3EJS_Bp.js} +3 -4
- package/dist/{memory-2bbl4hcV.d.ts → memory-GK5ZGWrp.d.ts} +1 -3
- package/dist/{nuxt-server-auto-imports-cfTZYvgy.js → nuxt-server-auto-imports-4aT5BD4u.js} +1 -2
- package/dist/{nuxt-server-imports-75bWMeXc.js → nuxt-server-imports-BdJqiVhT.js} +1 -2
- package/dist/nuxt.d.ts +1 -3
- package/dist/nuxt.js +276 -182
- package/dist/{object-D8pRdprI.js → object-DRSmpe04.js} +1 -2
- package/dist/{operation-contributions-C3lwePQu.js → operation-contributions-BU10k2QS.js} +9 -9
- package/dist/{operation-contributions-CrdmqtJW.d.ts → operation-contributions-xwjDzj28.d.ts} +6 -7
- package/dist/{operation-definition-DxjKcCGm.js → operation-definition-D04Rdjbe.js} +7 -9
- package/dist/operation-modules-BUXlwjvd.js +1 -0
- package/dist/operation-modules-DHWkPcfS.js +139 -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-D-7ljPqw.js +1 -0
- package/dist/{operations-TTjL_7Zc.d.ts → operations-DgFhA1WE.d.ts} +0 -4
- package/dist/{operations-CFYGXqLm.js → operations-DksTrRMb.js} +4 -5
- package/dist/operations-byxiZ2R2.js +113 -0
- package/dist/{optional-owners-O6sj4uoj.js → optional-owners-Cypch7V3.js} +4 -6
- package/dist/{out-fRNaVslw.js → out-Cw5Tvr92.js} +2933 -2301
- package/dist/{owned-paths-BnjT0FhU.js → owned-paths-MjjDftBn.js} +1 -2
- package/dist/page/pill.iife.js +2 -2
- package/dist/page-tools-BeZrtn4S.js +46 -0
- package/dist/page-tools-Chk8Gm9x.d.ts +23 -0
- package/dist/page-tools-shared-BLPidmCi.js +39 -0
- package/dist/{pathe.M-eThtNZ-J4gfe1m9.js → pathe.M-eThtNZ-D4EC7Wue.js} +1 -2
- package/dist/{plugins-DoXnU6-s.d.ts → plugins-BmkOoyIh.d.ts} +25 -110
- package/dist/{plugins-BTZQaFtZ.js → plugins-DfXcUnzN.js} +1779 -1384
- package/dist/presets/workspace.js +1 -2
- package/dist/{project-Dgyq1F1V.d.ts → project-B2qWt8on.d.ts} +3 -12
- package/dist/{project-DlWTGB7h.js → project-DRC67Uiu.js} +1 -2
- package/dist/{project-DXZRZEPX.js → project-_juMSuAS.js} +8 -11
- package/dist/{project-link-DT99MoyU.js → project-link-CJbCkOlC.js} +7 -8
- package/dist/{project-link-bNS-KROO.d.ts → project-link-Ck3vuq9w.d.ts} +2 -4
- package/dist/{project-root-v6ba4tn7.js → project-root-mAVQGZTX.js} +1 -2
- package/dist/project-session-8pN7pRo8.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-CMA2UKKq.js → request-D769eiBL.js} +5 -6
- package/dist/{request-D7h3SQ92.d.ts → request-DYmjLTqP.d.ts} +2 -4
- package/dist/{request-SBLxvpyr.d.ts → request-DkoE0b2h.d.ts} +11 -4
- package/dist/{request-Cs0FqxEL.js → request-XFVx7CGC.js} +30 -9
- package/dist/{request-origin-COUkgHd6.js → request-origin-pzWr9UUu.js} +1 -2
- package/dist/{rolldown-runtime-CMFfr-1z.js → rolldown-runtime-DegdyBIC.js} +2 -3
- package/dist/{route-query-CRVWXIrc.js → route-query-BWVl6ZO6.js} +4 -5
- package/dist/routes-D02vxUSg.js +26 -0
- 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-B-46Bawt.js → runtime-CRJsqVTa.js} +2 -3
- package/dist/{runtime-DxfJOfCd.js → runtime-DA7HJe10.js} +3 -4
- package/dist/runtime-DGvimtvc.d.ts +5 -0
- package/dist/{runtime-CX_l_78I.js → runtime-F0CTqBFx.js} +5 -6
- package/dist/{runtime-feature-guard-CuyPVGj9.js → runtime-feature-guard-BKAMRZzM.js} +6 -7
- 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/search-jgMrZJXR.js +84 -0
- package/dist/{sections-DumoLKQN.js → sections-AUGy9EkY.js} +2 -8
- package/dist/{sections-BogiCmtz.d.ts → sections-BMkFB3S-.d.ts} +4 -6
- package/dist/{sections-C83x0slv.js → sections-BNTdIEJw.js} +2 -3
- package/dist/{sections-Do7X4Nwt.d.ts → sections-DCoCa4nF.d.ts} +1 -8
- package/dist/sections-DjeAUX7o.d.ts +8 -0
- package/dist/{sections-BKUReack.js → sections-ZFAlI4JW.js} +14 -7
- package/dist/{sections.get-H46e2urg.d.ts → sections.get-BY5dClJY.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/{setup-BC0P3eZy.d.ts → setup-BBnZPziq.d.ts} +5 -10
- package/dist/{setup-DNGzawFn.js → setup-yc3_WKNG.js} +4 -17
- package/dist/site-CZCIWsUQ.js +169 -0
- package/dist/site-link-Bvo2SxPo.js +58 -0
- package/dist/site-link-Dtw8MNVB.d.ts +18 -0
- package/dist/site-pages-B6J8U2Nq.js +66 -0
- package/dist/site-token-Wa7fhjwg.js +215 -0
- package/dist/site-visitor-BkhE2TA0.js +89 -0
- package/dist/skills/operations.d.ts +1 -5
- package/dist/skills/operations.js +4 -5
- package/dist/{skills-DdpSMiCI.js → skills-C1MaGEbO.js} +1 -2
- package/dist/skills.d.ts +1 -2
- package/dist/{skills.get-CRd06TTb.js → skills.get-CW8vc_Hf.js} +3 -4
- package/dist/skills.js +1 -2
- package/dist/{source-Cw3iYvJF.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/ui/vite.js +1 -2
- package/dist/usage-DBi7aOhx.js +33 -0
- package/dist/{version-dkga9imp.js → version-DUCd7Orc.js} +24 -21
- package/dist/{vite-stage-D7fe614I.js → vite-stage-Dmo4RgnK.js} +3 -5
- package/dist/{vue-router-C68IU1jM.d.ts → vue-router-plZJLlpm.d.ts} +120 -182
- package/dist/workspace/console/operations.d.ts +3 -0
- package/dist/workspace/console/operations.js +22 -0
- package/dist/{console/runtime/server → workspace/console}/workspace-files.get.d.ts +3 -5
- package/dist/{console/runtime/server → workspace/console}/workspace-files.get.js +4 -5
- package/dist/{workspace-history-B95Q-kGI.js → workspace-history-B52xib2J.js} +3 -4
- package/dist/{workspace-history-CeVwBB6Q.d.ts → workspace-history-WuxgLsi4.d.ts} +0 -2
- package/package.json +158 -149
- package/dist/agents-BhFggA26.js +0 -2
- package/dist/auth-GFIN6xSJ.d.ts +0 -120
- package/dist/cli-config-g_mbWdjT.js +0 -2
- package/dist/cloudflare-env-lookup-DKXdr4P_.js +0 -16
- package/dist/console/runtime/client/ticket.d.ts +0 -2
- package/dist/console/runtime/client/ticket.js +0 -2
- package/dist/console/runtime/page/loader.js +0 -134
- package/dist/console/runtime/server/auth.d.ts +0 -2
- package/dist/console/runtime/server/env.get.js +0 -16
- package/dist/console/runtime/server/invocation-workspace.get.d.ts +0 -8
- package/dist/console/runtime/server/mcp-client-operations.d.ts +0 -5
- package/dist/console/runtime/server/mcp-client-operations.js +0 -139
- package/dist/console/runtime/server/page-auth.d.ts +0 -18
- package/dist/console/runtime/server/page-auth.js +0 -44
- package/dist/console/runtime/server/page-tool.d.ts +0 -2
- package/dist/console/runtime/server/page-tool.js +0 -110
- package/dist/console/runtime/server/page-tools-route.d.ts +0 -2
- package/dist/console/runtime/server/page-tools-route.js +0 -5
- package/dist/console/runtime/server/search.get.d.ts +0 -4
- package/dist/console/runtime/server/search.get.js +0 -97
- package/dist/console/runtime/server/site-session.d.ts +0 -80
- package/dist/console/runtime/server/site-session.js +0 -2
- package/dist/console/runtime/server/tickets.d.ts +0 -2
- package/dist/console/runtime/server/tickets.js +0 -2
- package/dist/console/runtime/server/usage.get.d.ts +0 -10
- package/dist/console/runtime/server/usage.get.js +0 -92
- package/dist/console/runtime/site-access.d.ts +0 -2
- package/dist/console/runtime/site-access.js +0 -2
- package/dist/console-lazy-views-DXnIkdyd.js +0 -2
- package/dist/definition-catalog-og_1razf.js +0 -2
- package/dist/deployment-C2B0hBBj.js +0 -2
- package/dist/diagnostics-CjGiniKb.d.ts +0 -11
- package/dist/features-ujWsvlEH.js +0 -2
- package/dist/invocations-6jxqLkGY.js +0 -86
- package/dist/mcp-client-C91h8Taa.js +0 -1024
- package/dist/mcp-client-CTbTbn7d.js +0 -10
- package/dist/operations-5Lwd1xEI.js +0 -2
- package/dist/operations-ChEXk2ij.js +0 -853
- package/dist/page-tool-PmxH65gt.d.ts +0 -69
- package/dist/page-tools-ClgqElu-.js +0 -462
- package/dist/page-tools-DcCCtDKi.d.ts +0 -23
- package/dist/page-tools-shared-aNC9YtoI.js +0 -125
- package/dist/runtime-B_btezs1.d.ts +0 -7
- package/dist/scan-module-D_3X08mj.js +0 -2
- package/dist/secret-DELGKpCJ.js +0 -44
- package/dist/sections-CFiMNsqu.d.ts +0 -10
- package/dist/site-access-BycrwM2v.js +0 -18
- package/dist/site-access-CAiWyKOD.js +0 -2
- package/dist/site-access-DxfdOel1.d.ts +0 -55
- package/dist/site-access-L1qbvKt6.js +0 -293
- package/dist/site-session-CRwgKtTF.js +0 -300
- package/dist/skills/vitehub/SKILL.md +0 -142
- package/dist/skills/vitehub/agents/openai.yaml +0 -4
- package/dist/skills/vitehub/references/agent-definitions.md +0 -36
- package/dist/skills/vitehub/references/bundle.md +0 -57
- package/dist/skills/vitehub/references/capabilities-authority.md +0 -30
- package/dist/skills/vitehub/references/channels-triggers.md +0 -27
- package/dist/skills/vitehub/references/framework-composition.md +0 -29
- package/dist/skills/vitehub/references/preview-contract.md +0 -44
- package/dist/skills/vitehub/references/primitives/auth.md +0 -14
- package/dist/skills/vitehub/references/primitives/blob.md +0 -13
- package/dist/skills/vitehub/references/primitives/browser.md +0 -17
- package/dist/skills/vitehub/references/primitives/cache.md +0 -13
- package/dist/skills/vitehub/references/primitives/channels.md +0 -11
- package/dist/skills/vitehub/references/primitives/connections.md +0 -14
- package/dist/skills/vitehub/references/primitives/content.md +0 -13
- package/dist/skills/vitehub/references/primitives/database.md +0 -15
- package/dist/skills/vitehub/references/primitives/email.md +0 -11
- package/dist/skills/vitehub/references/primitives/env.md +0 -13
- package/dist/skills/vitehub/references/primitives/kv.md +0 -13
- package/dist/skills/vitehub/references/primitives/markdown-template.md +0 -13
- package/dist/skills/vitehub/references/primitives/queue.md +0 -14
- package/dist/skills/vitehub/references/primitives/rate-limit.md +0 -11
- package/dist/skills/vitehub/references/primitives/realtime.md +0 -19
- package/dist/skills/vitehub/references/primitives/sandbox-task.md +0 -11
- package/dist/skills/vitehub/references/primitives/sandbox.md +0 -13
- package/dist/skills/vitehub/references/primitives/schedule.md +0 -11
- package/dist/skills/vitehub/references/primitives/shell.md +0 -11
- package/dist/skills/vitehub/references/primitives/source.md +0 -11
- package/dist/skills/vitehub/references/primitives/workflow.md +0 -11
- package/dist/skills/vitehub/references/primitives/workspace.md +0 -11
- package/dist/skills/vitehub/references/project-patterns.md +0 -19
- package/dist/skills/vitehub/references/project-shapes.md +0 -81
- package/dist/skills/vitehub/references/proof-recovery.md +0 -31
- package/dist/skills/vitehub/references/sandboxes-hosts.md +0 -26
- package/dist/skills/vitehub/references/schedules-workflows-invocations.md +0 -28
- package/dist/skills/vitehub/references/server-primitives.md +0 -39
- package/dist/skills/vitehub/references/workspaces-sources-access.md +0 -26
- package/dist/ticket-DtBAstEU.js +0 -31
- package/dist/ticket-Pr_8ZtXW.d.ts +0 -14
- package/dist/tickets-DahBmKDT.js +0 -357
- package/dist/usage-CoQXs5nW.d.ts +0 -22
- package/dist/usage-index-VJAZ7a0p.js +0 -335
- package/dist/usage-jKtAgJZ0.js +0 -571
- /package/dist/{console/runtime/public/skills → console-skills}/index.json +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/SKILL.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/agents/openai.yaml +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/agent-definitions.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/bundle.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/capabilities-authority.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/channels-triggers.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/framework-composition.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/preview-contract.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/auth.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/blob.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/browser.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/cache.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/channels.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/connections.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/content.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/database.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/email.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/env.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/kv.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/markdown-template.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/queue.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/rate-limit.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/realtime.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/sandbox-task.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/sandbox.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/schedule.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/shell.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/source.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/workflow.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/workspace.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/project-patterns.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/project-shapes.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/proof-recovery.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/sandboxes-hosts.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/schedules-workflows-invocations.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/server-primitives.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/workspaces-sources-access.md +0 -0
package/dist/nuxt.js
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { i as removeViteHubDevServerFile, o as writeViteHubDevServerFile } from "./vite-stage-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { n as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
1
|
+
import { $ as VITEHUB_NUXT_HINTS, A as staleChunkReloadPluginName, B as disabledKVConfigModule, C as resolveConsoleProjectName, D as discoverConsoleEntrySections, E as consoleDocumentEditorSectionIds, F as VITEHUB_AGENT_JOURNAL_STORE, G as redisDriverSpecifier, H as disabledUpstashDriver, I as assertAgentInvocationsRetention, J as markCmsPresetFeaturesResolved, K as upstashDriverSpecifier, L as assertAgentInvocationsUrl, M as forgeBuildCheckPlugin, N as cloudflareEmailDevShimSource, O as isConsoleContributedSectionId, P as cloudflareWorkersDevShimSource, Q as importRolldownExperimental, R as defaultJournalNeedsLibsql, S as writeConsoleAppModule, St as resolveViteHubProjectRoot, T as consoleContributedSections, U as hasRedisStore, V as disabledRedisDriver, W as hasUpstashStore, X as nitroCacheBypass, Y as resolveCmsPresetFeatures, Z as describeDeploymentPlanOutput, _ as resolveConsoleSiteAccess, _t as VITEHUB_PREPARE, a as cloudflareExportConditions, at as withConnectionsDatabase, b as consoleAppModuleHasDocumentEditors, bt as getResolvedFeatureOptions, c as consoleAppModuleId, ct as hasSyncDirectory, d as resolveConsoleAccessBuild, et as reportViteHubHint, f as resolveConsoleOptions, ft as withPrintedDiagnostics, g as consoleOperationFeatures, gt as VITEHUB_NITRO_CONFIG_CONTEXT, h as consoleDevAccessNotice, ht as VITEHUB_GENERATED_ROOT, i as installBrowserErrorsNuxt, it as withComments, j as drizzleBuildCheckPlugin, k as installStaleChunkReloadNuxt, l as consoleInvocationRootPlugin, lt as ownerModules, m as resolveGeneratedConsoleApp, mt as VITEHUB_APP_BASE_URL, n as resolveSandboxTaskDriver, nt as agentJournalStateUrl, o as assertConsoleAccess, ot as withDataDir, p as resolveConsoleUrl, q as resolveDefinitionFeatures, r as viteHubPlugins, rt as defaultDatabaseD1Binding, s as assertConsoleProductionAuth, st as isDefaultAgentJournal, t as applyCloudflareNodeCompatOptOut, tt as startViteHubHints, u as consoleOperationContributions, ut as isIncludedNitroPlugin, v as addConsoleRpcHandler, vt as VITEHUB_PROJECT_ROOT, w as discoverConsoleBuildCatalog, x as resolveConsoleRuntimeCapabilityImports, xt as resolveNuxtServerDirs, y as serializeConsoleRefresh, yt as VITEHUB_SERVER_DIRS, z as writeAgentInvocationsNitroPlugin } from "./plugins-DfXcUnzN.js";
|
|
2
|
+
import { t as invariant } from "./invariant-Dj2R1eMr.js";
|
|
3
|
+
import { f as writeFileIfChanged } from "./definition-catalog-1xPPtzOx.js";
|
|
4
|
+
import { n as addViteHubDevPeerUpgradeSigner, t as addViteHubDevPeerDevHandler } from "./dev-peer-CRYp01PE.js";
|
|
5
|
+
import { i as removeViteHubDevServerFile, o as writeViteHubDevServerFile } from "./vite-stage-Dmo4RgnK.js";
|
|
6
|
+
import { r as generatedModules } from "./operation-modules-DHWkPcfS.js";
|
|
7
|
+
import { n as isRecord } from "./object-DRSmpe04.js";
|
|
8
|
+
import { a as normalizeNitroPreset, c as resolveDeploymentPlan, i as hostFromNitroPreset, s as resolveBuildHost } from "./deployment-CURATxjG.js";
|
|
9
|
+
import { i as importOptionalOwner, l as requireOptionalOwner, o as isPackageInstalled, u as startPackageChecks } from "./optional-owners-Cypch7V3.js";
|
|
10
|
+
import { n as installConsoleProjectName, r as installConsoleSections } from "./setup-yc3_WKNG.js";
|
|
11
|
+
import { E as resolveConsoleSectionIds, v as insertConsoleSection } from "./sections-AUGy9EkY.js";
|
|
12
|
+
import { t as viteHubErrorDiagnostics } from "./error-diagnostics-CBtvqI30.js";
|
|
13
|
+
import { n as assertNoRemovedViteHubOptions } from "./version-DUCd7Orc.js";
|
|
14
|
+
import { n as viteHubServerImports$1 } from "./nuxt-server-imports-BdJqiVhT.js";
|
|
14
15
|
import { findPackageJSON } from "node:module";
|
|
15
16
|
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
16
17
|
import { existsSync, readFileSync, readdirSync, realpathSync } from "node:fs";
|
|
17
18
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
18
|
-
import { mkdir, writeFile } from "node:fs/promises";
|
|
19
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
19
20
|
import * as v from "valibot";
|
|
20
|
-
import { mergeGeneratedSourceNitroConfig } from "@vite-hub/source/vite";
|
|
21
|
-
import { mergeConfig } from "vite";
|
|
22
21
|
import { createEnvImportAliases } from "@vite-hub/env/vite";
|
|
22
|
+
import { mergeGeneratedSourceNitroConfig } from "@vite-hub/source/vite";
|
|
23
|
+
import { createLogger, mergeConfig } from "vite";
|
|
23
24
|
import { nuxtPageRoutes } from "@vite-hub/bundle/vite";
|
|
24
25
|
import { findNearestFile } from "pkg-types";
|
|
25
|
-
|
|
26
|
+
// ../internal/src/build/nuxt-vue-imports.ts
|
|
26
27
|
const fallbacksByApp = /* @__PURE__ */ new WeakMap();
|
|
27
28
|
function addNuxtVueImports(nuxt, from, names) {
|
|
28
29
|
let fallbacks = fallbacksByApp.get(nuxt);
|
|
@@ -56,8 +57,7 @@ function addNuxtVueImports(nuxt, from, names) {
|
|
|
56
57
|
}
|
|
57
58
|
for (const name of names) if (!fallbacks.has(name)) fallbacks.set(name, from);
|
|
58
59
|
}
|
|
59
|
-
|
|
60
|
-
//#region src/internal/nitro-optional-peers.ts
|
|
60
|
+
// src/internal/nitro-optional-peers.ts
|
|
61
61
|
const manifestSchema = v.object({
|
|
62
62
|
optionalDependencies: v.optional(v.record(v.string(), v.string())),
|
|
63
63
|
peerDependenciesMeta: v.optional(v.record(v.string(), v.object({ optional: v.optional(v.boolean()) })))
|
|
@@ -102,8 +102,152 @@ function nitroOptionalPeers(config = {}) {
|
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
// src/internal/nitro-replay.ts
|
|
106
|
+
/** Node stubs for the Cloudflare runtime modules that ViteHub's generated server code imports. */
|
|
107
|
+
const cloudflareDevShims = {
|
|
108
|
+
"cloudflare:email": {
|
|
109
|
+
file: "cloudflare-email.dev.mjs",
|
|
110
|
+
source: cloudflareEmailDevShimSource
|
|
111
|
+
},
|
|
112
|
+
"cloudflare:workers": {
|
|
113
|
+
file: "cloudflare-workers.dev.mjs",
|
|
114
|
+
source: cloudflareWorkersDevShimSource
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
function isCloudflareDevShim(id) {
|
|
118
|
+
return Object.hasOwn(cloudflareDevShims, id);
|
|
119
|
+
}
|
|
120
|
+
const nitroRuntimeResolverNames = /* @__PURE__ */ new Set([
|
|
121
|
+
"@vite-hub/auth/vite",
|
|
122
|
+
"@vite-hub/blob/vite",
|
|
123
|
+
"@vite-hub/browser/vite",
|
|
124
|
+
"@vite-hub/email/vite",
|
|
125
|
+
"@vite-hub/i18n/vite",
|
|
126
|
+
"@vite-hub/kv/vite",
|
|
127
|
+
"@vite-hub/markdown-template/vite",
|
|
128
|
+
"@vite-hub/realtime/vite",
|
|
129
|
+
"@vite-hub/schedule/vite",
|
|
130
|
+
"@vite-hub/source/vite",
|
|
131
|
+
"vite-hub/optional-owner-imports",
|
|
132
|
+
"vite-hub/cloudflare-sh-syntax",
|
|
133
|
+
"vite-hub/durability",
|
|
134
|
+
"vite-hub/cloudflare-pkce-challenge",
|
|
135
|
+
"vite-hub/unavailable-services"
|
|
136
|
+
]);
|
|
137
|
+
const nitroServerTransformNames = /* @__PURE__ */ new Set([
|
|
138
|
+
"@vite-hub/env/vite",
|
|
139
|
+
"@vite-hub/i18n/vite",
|
|
140
|
+
"@vite-hub/schedule/vite",
|
|
141
|
+
"@vite-hub/source/vite",
|
|
142
|
+
"@vite-hub/workflow/vite"
|
|
143
|
+
]);
|
|
144
|
+
const nitroConfigResolvedNames = /* @__PURE__ */ new Set([
|
|
145
|
+
...nitroRuntimeResolverNames,
|
|
146
|
+
"@vite-hub/content/vite",
|
|
147
|
+
"@vite-hub/sandbox/task/vite",
|
|
148
|
+
"@vite-hub/workflow/vite",
|
|
149
|
+
"vite-hub/agent-invocations"
|
|
150
|
+
]);
|
|
151
|
+
/**
|
|
152
|
+
* Whether the Nitro replay runs the plugin's `configResolved` hook. The Database owner runs first, so consumers can read
|
|
153
|
+
* its Definitions. Env runs only when Nuxt builds Nitro without a Vite environment (`nitroOnly`).
|
|
154
|
+
*/
|
|
155
|
+
function replaysNitroConfigResolved(name, nitroOnly) {
|
|
156
|
+
return name === "@vite-hub/database/vite" || nitroConfigResolvedNames.has(name) || nitroOnly && name === "@vite-hub/env/vite";
|
|
157
|
+
}
|
|
158
|
+
function pluginResolveIdHandler(plugin) {
|
|
159
|
+
if (typeof plugin.resolveId === "function") return plugin.resolveId;
|
|
160
|
+
return plugin.resolveId?.handler;
|
|
161
|
+
}
|
|
162
|
+
function pluginLoadHandler(plugin) {
|
|
163
|
+
if (typeof plugin.load === "function") return plugin.load;
|
|
164
|
+
return plugin.load?.handler;
|
|
165
|
+
}
|
|
166
|
+
function withHookFilter(hook, handler) {
|
|
167
|
+
return isRecord(hook) && hook.filter !== void 0 ? {
|
|
168
|
+
filter: hook.filter,
|
|
169
|
+
handler
|
|
170
|
+
} : handler;
|
|
171
|
+
}
|
|
172
|
+
function nitroRuntimeResolver(plugin, config, agentOptions) {
|
|
173
|
+
const resolveId = nitroRuntimeResolverNames.has(plugin.name) ? pluginResolveIdHandler(plugin) : void 0;
|
|
174
|
+
const load = nitroRuntimeResolverNames.has(plugin.name) ? pluginLoadHandler(plugin) : void 0;
|
|
175
|
+
const transformAgentDefinition = plugin.vitehub?.agent?.transformAgentDefinition;
|
|
176
|
+
const serverTransform = !transformAgentDefinition && nitroServerTransformNames.has(plugin.name) ? typeof plugin.transform === "function" ? plugin.transform : plugin.transform?.handler : void 0;
|
|
177
|
+
if (!resolveId && !load && !transformAgentDefinition && !serverTransform) return;
|
|
178
|
+
const replayResolveId = resolveId && function(id, importer, options) {
|
|
179
|
+
if (isCloudflareDevShim(id) && isRecord(config.alias) && typeof config.alias[id] === "string") return;
|
|
180
|
+
return resolveId.call(this, id, importer, {
|
|
181
|
+
...options,
|
|
182
|
+
ssr: true
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
const replayLoad = load && function(id, options) {
|
|
186
|
+
return load.call(this, id, {
|
|
187
|
+
...options,
|
|
188
|
+
ssr: true
|
|
189
|
+
});
|
|
190
|
+
};
|
|
191
|
+
const replayServerTransform = serverTransform && function(code, id, options) {
|
|
192
|
+
return serverTransform.call(this, code, id, {
|
|
193
|
+
moduleType: "js",
|
|
194
|
+
...options,
|
|
195
|
+
ssr: true
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
const replayAgentTransform = transformAgentDefinition && {
|
|
199
|
+
filter: { id: /\.[cm]?[jt]s(?:[?#]|$)/i },
|
|
200
|
+
handler(code, id) {
|
|
201
|
+
const resolver = typeof this?.resolve === "function" ? this : void 0;
|
|
202
|
+
return transformAgentDefinition(code, id, {
|
|
203
|
+
...agentOptions,
|
|
204
|
+
...resolver ? { resolve: async (specifier, importer) => (await resolver.resolve(specifier, importer, { skipSelf: true }))?.id } : {}
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
const originalHooks = {
|
|
209
|
+
...replayResolveId ? { resolveId: withHookFilter(plugin.resolveId, replayResolveId) } : {},
|
|
210
|
+
...replayLoad ? { load: withHookFilter(plugin.load, replayLoad) } : {},
|
|
211
|
+
...replayServerTransform ? { transform: withHookFilter(plugin.transform, replayServerTransform) } : {},
|
|
212
|
+
...replayAgentTransform ? { transform: replayAgentTransform } : {}
|
|
213
|
+
};
|
|
214
|
+
return {
|
|
215
|
+
originalHooks,
|
|
216
|
+
plugin: {
|
|
217
|
+
name: `vite-hub/nuxt-runtime-resolver:${plugin.name}`,
|
|
218
|
+
...originalHooks,
|
|
219
|
+
...plugin.name === "@vite-hub/i18n/vite" && plugin.renderChunk ? { renderChunk: plugin.renderChunk } : {}
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
// src/internal/nitro-vite-imports.ts
|
|
224
|
+
const rawImport = /[?&]raw(?:[&#]|$)/;
|
|
225
|
+
/** Loads `?raw` imports as a string default export, as Vite does. */
|
|
226
|
+
function nitroRawImports() {
|
|
227
|
+
return {
|
|
228
|
+
name: "vite-hub/nitro-raw-imports",
|
|
229
|
+
load: {
|
|
230
|
+
filter: { id: rawImport },
|
|
231
|
+
async handler(id) {
|
|
232
|
+
const file = id.replace(/[?#].*$/s, "");
|
|
233
|
+
this.addWatchFile(file);
|
|
234
|
+
return {
|
|
235
|
+
code: `export default ${JSON.stringify(await readFile(file, "utf8"))}`,
|
|
236
|
+
moduleType: "js"
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* The Vite syntax that server code can use in Nuxt 5, for Nuxt 4.7's separate Rolldown build of Nitro: `import.meta.glob()`
|
|
244
|
+
* and `?raw` imports.
|
|
245
|
+
*/
|
|
246
|
+
async function nitroViteImports(root, rolldownPath) {
|
|
247
|
+
const { viteImportGlobPlugin } = await importRolldownExperimental(root, rolldownPath);
|
|
248
|
+
return [viteImportGlobPlugin({ root }), nitroRawImports()];
|
|
249
|
+
}
|
|
250
|
+
// src/internal/nuxt-image.ts
|
|
107
251
|
function usesNuxtImage(modules) {
|
|
108
252
|
return (modules ?? []).some((entry) => (Array.isArray(entry) ? entry[0] : entry) === "@nuxt/image");
|
|
109
253
|
}
|
|
@@ -130,8 +274,7 @@ function nuxtImageProviderDependency(options) {
|
|
|
130
274
|
optional: true
|
|
131
275
|
} };
|
|
132
276
|
}
|
|
133
|
-
|
|
134
|
-
//#region src/nuxt-server-imports.ts
|
|
277
|
+
// src/nuxt-server-imports.ts
|
|
135
278
|
/**
|
|
136
279
|
* The server helpers that `vite-hub/nuxt` auto-imports in Nitro code, per ViteHub feature, when the app turns on
|
|
137
280
|
* Nuxt's server auto-imports (see {@link nuxtServerAutoImportsEnabled}). The table lives in
|
|
@@ -164,8 +307,7 @@ function resolveViteHubServerImports(enabled) {
|
|
|
164
307
|
}
|
|
165
308
|
return imports;
|
|
166
309
|
}
|
|
167
|
-
|
|
168
|
-
//#region src/nuxt.ts
|
|
310
|
+
// src/nuxt.ts
|
|
169
311
|
const doctorExtensionEntry = fileURLToPath(new URL("./doctor", import.meta.url));
|
|
170
312
|
const consoleRuntimeRoot = fileURLToPath(new URL("./console/runtime", import.meta.url));
|
|
171
313
|
/** True when the app names a Blob driver or stores, which works on hosts without a default Blob store. */
|
|
@@ -246,20 +388,6 @@ function isExternalId(external, id, importer, isResolved) {
|
|
|
246
388
|
if (external === void 0) return false;
|
|
247
389
|
return [external].flat().some((entry) => typeof entry === "string" ? entry === id : entry.test(id));
|
|
248
390
|
}
|
|
249
|
-
/** Node stubs for the Cloudflare runtime modules that ViteHub's generated server code imports. */
|
|
250
|
-
const cloudflareDevShims = {
|
|
251
|
-
"cloudflare:email": {
|
|
252
|
-
file: "cloudflare-email.dev.mjs",
|
|
253
|
-
source: cloudflareEmailDevShimSource
|
|
254
|
-
},
|
|
255
|
-
"cloudflare:workers": {
|
|
256
|
-
file: "cloudflare-workers.dev.mjs",
|
|
257
|
-
source: cloudflareWorkersDevShimSource
|
|
258
|
-
}
|
|
259
|
-
};
|
|
260
|
-
function isCloudflareDevShim(id) {
|
|
261
|
-
return Object.hasOwn(cloudflareDevShims, id);
|
|
262
|
-
}
|
|
263
391
|
/**
|
|
264
392
|
* `nuxt dev` with the Cloudflare preset runs the server on Node, where ViteHub aliases `cloudflare:workers` and
|
|
265
393
|
* `cloudflare:email` to Node stubs. ViteHub's generated Nitro plugins list those schemes as external for the Worker
|
|
@@ -325,14 +453,14 @@ function normalizeGeneratedNitroPlugins(config, root) {
|
|
|
325
453
|
* Put these plugins before Nitro's own resolvers, so they see generated and cache imports first. Each one goes first, so
|
|
326
454
|
* in a build the Forge and Drizzle checks can see imports before Nitro resolves them.
|
|
327
455
|
*/
|
|
328
|
-
function installNitroBuildPlugins(config, generatedRoots, dev = false, sections = [], build = false) {
|
|
456
|
+
function installNitroBuildPlugins(config, generatedRoots, dev = false, sections = [], build = false, documents, development) {
|
|
329
457
|
const rollupConfig = config.rollupConfig ??= {};
|
|
330
458
|
const plugins = rollupConfig.plugins ??= [];
|
|
331
459
|
for (const plugin of [
|
|
332
460
|
nitroCacheBypass(),
|
|
333
461
|
nitroViteHubH3(generatedRoots),
|
|
334
462
|
nitroOptionalPeers(config),
|
|
335
|
-
consoleOperationFeatures(sections),
|
|
463
|
+
consoleOperationFeatures(sections, documents, development),
|
|
336
464
|
...dev ? [nitroCloudflareWorkersDev] : [],
|
|
337
465
|
...build ? [forgeBuildCheckPlugin(), withPrintedDiagnostics(drizzleBuildCheckPlugin())] : []
|
|
338
466
|
]) if (!plugins.some((candidate) => candidate.name === plugin.name)) plugins.unshift(plugin);
|
|
@@ -341,36 +469,6 @@ function pluginOptionHasName(option, name) {
|
|
|
341
469
|
if (Array.isArray(option)) return option.some((candidate) => pluginOptionHasName(candidate, name));
|
|
342
470
|
return Boolean(option && Reflect.get(Object(option), "name") === name);
|
|
343
471
|
}
|
|
344
|
-
const nitroRuntimeResolverNames = /* @__PURE__ */ new Set([
|
|
345
|
-
"@vite-hub/auth/vite",
|
|
346
|
-
"@vite-hub/blob/vite",
|
|
347
|
-
"@vite-hub/browser/vite",
|
|
348
|
-
"@vite-hub/email/vite",
|
|
349
|
-
"@vite-hub/kv/vite",
|
|
350
|
-
"@vite-hub/markdown-template/vite",
|
|
351
|
-
"@vite-hub/realtime/vite",
|
|
352
|
-
"vite-hub/optional-owner-imports",
|
|
353
|
-
"vite-hub/cloudflare-sh-syntax",
|
|
354
|
-
"vite-hub/durability",
|
|
355
|
-
"vite-hub/cloudflare-pkce-challenge",
|
|
356
|
-
"vite-hub/unavailable-services"
|
|
357
|
-
]);
|
|
358
|
-
const nitroConfigResolvedNames = /* @__PURE__ */ new Set([
|
|
359
|
-
...nitroRuntimeResolverNames,
|
|
360
|
-
"@vite-hub/content/vite",
|
|
361
|
-
"@vite-hub/sandbox/task/vite",
|
|
362
|
-
"@vite-hub/schedule/vite",
|
|
363
|
-
"@vite-hub/workflow/vite",
|
|
364
|
-
"vite-hub/agent-invocations"
|
|
365
|
-
]);
|
|
366
|
-
function pluginResolveIdHandler(plugin) {
|
|
367
|
-
if (typeof plugin.resolveId === "function") return plugin.resolveId;
|
|
368
|
-
return plugin.resolveId?.handler;
|
|
369
|
-
}
|
|
370
|
-
function pluginLoadHandler(plugin) {
|
|
371
|
-
if (typeof plugin.load === "function") return plugin.load;
|
|
372
|
-
return plugin.load?.handler;
|
|
373
|
-
}
|
|
374
472
|
function pluginConfigResolvedHandler(plugin) {
|
|
375
473
|
if (typeof plugin.configResolved === "function") return plugin.configResolved;
|
|
376
474
|
return plugin.configResolved?.handler;
|
|
@@ -380,63 +478,20 @@ function asReplayResolvedConfig(config) {
|
|
|
380
478
|
find,
|
|
381
479
|
replacement
|
|
382
480
|
}));
|
|
481
|
+
if (!("logger" in config)) Object.assign(config, { logger: createLogger("silent") });
|
|
383
482
|
return config;
|
|
384
483
|
}
|
|
385
|
-
async function finalizeNitroReplayPlugins(plugins, config) {
|
|
484
|
+
async function finalizeNitroReplayPlugins(plugins, config, nitroOnly) {
|
|
386
485
|
const databaseOwners = plugins.filter((plugin) => plugin.name === "@vite-hub/database/vite");
|
|
387
|
-
const consumers = plugins.filter((plugin) =>
|
|
486
|
+
const consumers = plugins.filter((plugin) => plugin.name !== "@vite-hub/database/vite" && replaysNitroConfigResolved(plugin.name, nitroOnly));
|
|
388
487
|
for (const plugin of [...databaseOwners, ...consumers]) {
|
|
389
488
|
const configResolved = pluginConfigResolvedHandler(plugin);
|
|
390
489
|
if (!configResolved) continue;
|
|
391
490
|
await configResolved.call({}, asReplayResolvedConfig(config));
|
|
392
491
|
}
|
|
393
492
|
}
|
|
394
|
-
/** Keep the hook's filter, so the bundler skips the replayed hook for ids that the plugin does not own. */
|
|
395
|
-
function withHookFilter(hook, handler) {
|
|
396
|
-
return isRecord(hook) && hook.filter !== void 0 ? {
|
|
397
|
-
filter: hook.filter,
|
|
398
|
-
handler
|
|
399
|
-
} : handler;
|
|
400
|
-
}
|
|
401
|
-
function nitroRuntimeResolver(plugin, config, agentOptions) {
|
|
402
|
-
const resolveId = nitroRuntimeResolverNames.has(plugin.name) ? pluginResolveIdHandler(plugin) : void 0;
|
|
403
|
-
const load = nitroRuntimeResolverNames.has(plugin.name) ? pluginLoadHandler(plugin) : void 0;
|
|
404
|
-
const transformWorkspaceAgent = plugin.vitehub?.agent?.transformWorkspaceAgent;
|
|
405
|
-
const workflowTransform = plugin.name === "@vite-hub/workflow/vite" ? typeof plugin.transform === "function" ? plugin.transform : plugin.transform?.handler : void 0;
|
|
406
|
-
if (!resolveId && !load && !transformWorkspaceAgent && !workflowTransform) return;
|
|
407
|
-
const replayResolveId = resolveId && function(id, importer, options) {
|
|
408
|
-
if (isCloudflareDevShim(id) && isRecord(config.alias) && typeof config.alias[id] === "string") return;
|
|
409
|
-
return resolveId.call(this, id, importer, {
|
|
410
|
-
...options,
|
|
411
|
-
ssr: true
|
|
412
|
-
});
|
|
413
|
-
};
|
|
414
|
-
const replayLoad = load && function(id, options) {
|
|
415
|
-
return load.call(this, id, {
|
|
416
|
-
...options,
|
|
417
|
-
ssr: true
|
|
418
|
-
});
|
|
419
|
-
};
|
|
420
|
-
const replayWorkflowTransform = workflowTransform && function(code, id, options) {
|
|
421
|
-
return workflowTransform.call(this, code, id, {
|
|
422
|
-
moduleType: "js",
|
|
423
|
-
...options,
|
|
424
|
-
ssr: true
|
|
425
|
-
});
|
|
426
|
-
};
|
|
427
|
-
return {
|
|
428
|
-
name: `vite-hub/nuxt-runtime-resolver:${plugin.name}`,
|
|
429
|
-
...replayResolveId ? { resolveId: withHookFilter(plugin.resolveId, replayResolveId) } : {},
|
|
430
|
-
...replayLoad ? { load: withHookFilter(plugin.load, replayLoad) } : {},
|
|
431
|
-
...replayWorkflowTransform ? { transform: withHookFilter(plugin.transform, replayWorkflowTransform) } : {},
|
|
432
|
-
...transformWorkspaceAgent ? { transform: {
|
|
433
|
-
filter: { id: /\.[cm]?[jt]s(?:[?#]|$)/i },
|
|
434
|
-
handler: (code, id) => transformWorkspaceAgent(code, id, agentOptions)
|
|
435
|
-
} } : {}
|
|
436
|
-
};
|
|
437
|
-
}
|
|
438
493
|
function installNitroRuntimeResolvers(config, plugins, agentOptions) {
|
|
439
|
-
const resolvers = plugins.map((plugin) => nitroRuntimeResolver(plugin, config, agentOptions)).filter((plugin) => Boolean(plugin));
|
|
494
|
+
const resolvers = plugins.map((plugin) => nitroRuntimeResolver(plugin, config, agentOptions)?.plugin).filter((plugin) => Boolean(plugin));
|
|
440
495
|
if (!resolvers.length) return;
|
|
441
496
|
const rollupConfig = config.rollupConfig ??= {};
|
|
442
497
|
const configuredPlugins = rollupConfig.plugins;
|
|
@@ -444,6 +499,16 @@ function installNitroRuntimeResolvers(config, plugins, agentOptions) {
|
|
|
444
499
|
rollupConfig.plugins = nitroPlugins;
|
|
445
500
|
for (const resolver of resolvers) if (!nitroPlugins.some((candidate) => pluginOptionHasName(candidate, resolver.name))) nitroPlugins.push(resolver);
|
|
446
501
|
}
|
|
502
|
+
async function installNitroViteImports(config, root) {
|
|
503
|
+
const rollupConfig = config.rollupConfig ??= {};
|
|
504
|
+
const configuredPlugins = rollupConfig.plugins;
|
|
505
|
+
const plugins = Array.isArray(configuredPlugins) ? configuredPlugins : configuredPlugins ? [configuredPlugins] : [];
|
|
506
|
+
rollupConfig.plugins = plugins;
|
|
507
|
+
if (plugins.some((plugin) => isRecord(plugin) && plugin.name === "vite-hub/nitro-raw-imports")) return;
|
|
508
|
+
const paths = isRecord(config.deps) ? config.deps.paths : void 0;
|
|
509
|
+
const rolldownPath = isRecord(paths) && typeof paths.rolldown === "string" ? paths.rolldown : void 0;
|
|
510
|
+
plugins.push(...await nitroViteImports(root, rolldownPath));
|
|
511
|
+
}
|
|
447
512
|
function addTypeScriptDefaults(options, includes, excludes, key = "tsConfig") {
|
|
448
513
|
const typescript = options.typescript ??= {};
|
|
449
514
|
const tsConfig = typescript[key] ??= {};
|
|
@@ -563,9 +628,9 @@ export default defineNuxtPlugin({
|
|
|
563
628
|
mode: "client"
|
|
564
629
|
});
|
|
565
630
|
}
|
|
566
|
-
async function installConsole({ nuxt, projectRoot, name, sections, discovery,
|
|
631
|
+
async function installConsole({ nuxt, projectRoot, name, sections, discovery, writeGeneratedApp, canDiscoverDefinitions, access, siteAccess, writeApp }) {
|
|
567
632
|
const { discoveryRoot, serverDirs } = discovery;
|
|
568
|
-
const
|
|
633
|
+
const app = resolveGeneratedConsoleApp(projectRoot, nuxt.options.dev === true);
|
|
569
634
|
installConsoleProjectName(projectRoot, resolveConsoleProjectName(projectRoot, name));
|
|
570
635
|
if (nuxt.options.dev && nuxt.hook) {
|
|
571
636
|
Reflect.apply(nuxt.hook, nuxt, ["nitro:init", (nitro) => {
|
|
@@ -595,10 +660,11 @@ async function installConsole({ nuxt, projectRoot, name, sections, discovery, wr
|
|
|
595
660
|
...documentEditorSections
|
|
596
661
|
]);
|
|
597
662
|
const nitro = nuxt.options.nitro ??= {};
|
|
598
|
-
addConsoleRpcHandler(nitro, consoleRuntimeRoot);
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
663
|
+
addConsoleRpcHandler(nitro, consoleRuntimeRoot, void 0, { siteAccess });
|
|
664
|
+
nitro.alias = {
|
|
665
|
+
...nitro.alias,
|
|
666
|
+
[consoleAppModuleId]: app
|
|
667
|
+
};
|
|
602
668
|
const refreshAgentDefinitions = serializeConsoleRefresh(async () => {
|
|
603
669
|
const discoverySections = canDiscoverDefinitions() ? sections : sections.filter((section) => section !== "databases" && !isConsoleContributedSectionId(section));
|
|
604
670
|
const catalog = await discoverConsoleBuildCatalog({
|
|
@@ -606,17 +672,16 @@ async function installConsole({ nuxt, projectRoot, name, sections, discovery, wr
|
|
|
606
672
|
projectRoot,
|
|
607
673
|
sections: discoverySections
|
|
608
674
|
});
|
|
609
|
-
await
|
|
675
|
+
await writeApp(app, catalog);
|
|
610
676
|
});
|
|
611
|
-
if (
|
|
612
|
-
if (nuxt.options.dev &&
|
|
677
|
+
if (writeGeneratedApp) await refreshAgentDefinitions();
|
|
678
|
+
if (nuxt.options.dev && writeGeneratedApp) {
|
|
613
679
|
const hookBuilderWatch = nuxt.hook;
|
|
614
680
|
hookBuilderWatch?.("builder:watch", async (_event, _path) => {
|
|
615
681
|
await refreshAgentDefinitions();
|
|
616
682
|
});
|
|
617
683
|
}
|
|
618
|
-
|
|
619
|
-
return plugin;
|
|
684
|
+
return app;
|
|
620
685
|
}
|
|
621
686
|
function agentWorkflowRegistryTransform(plugin) {
|
|
622
687
|
return plugin.vitehub?.agent?.transformWorkflowRegistry;
|
|
@@ -688,11 +753,21 @@ function linkedViteHubPackageRoots(projectRoot) {
|
|
|
688
753
|
const scope = join(nodeModules, "@vite-hub");
|
|
689
754
|
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"));
|
|
690
755
|
}
|
|
691
|
-
|
|
756
|
+
const viteHubPackages = /(?:^|[\\/]node_modules[\\/])(?:vite-hub|@vite-hub[\\/][^\\/]+)(?:[\\/](?!(?:.*[\\/])?node_modules[\\/])|$)/;
|
|
757
|
+
const viteHubPackageStrings = /^(?:vite-hub|@vite-hub\/[^/]*)$/;
|
|
758
|
+
/**
|
|
759
|
+
* Nitro reads a string entry as an unanchored path pattern, so `"vite-hub"` (which Nuxt also adds from `build.transpile`)
|
|
760
|
+
* matches a project folder such as `~/vite-hub-shop`. Nitro then bundles every dependency of that app, and native packages
|
|
761
|
+
* such as libSQL fail to load. Replace those strings with a pattern for the installed ViteHub packages only.
|
|
762
|
+
*/
|
|
692
763
|
function addNoExternals(config, entries) {
|
|
693
764
|
if (config.noExternals === true) return;
|
|
694
|
-
const
|
|
695
|
-
config.noExternals = [.../* @__PURE__ */ new Set([
|
|
765
|
+
const kept = (Array.isArray(config.noExternals) ? config.noExternals : []).filter((entry) => typeof entry !== "string" || !viteHubPackageStrings.test(entry));
|
|
766
|
+
config.noExternals = [.../* @__PURE__ */ new Set([
|
|
767
|
+
...kept,
|
|
768
|
+
viteHubPackages,
|
|
769
|
+
...entries
|
|
770
|
+
])];
|
|
696
771
|
}
|
|
697
772
|
async function applyNitroConfig(plugins, nitroConfig, nuxt, projectRoot, deferHint) {
|
|
698
773
|
const incomingNoExternals = typeof nitroConfig.noExternals === "boolean" ? nitroConfig.noExternals : void 0;
|
|
@@ -777,7 +852,7 @@ async function applyNitroConfig(plugins, nitroConfig, nuxt, projectRoot, deferHi
|
|
|
777
852
|
});
|
|
778
853
|
}
|
|
779
854
|
}
|
|
780
|
-
await finalizeNitroReplayPlugins(plugins, config);
|
|
855
|
+
await finalizeNitroReplayPlugins(plugins, config, !nuxt.options.experimental?.nitroViteEnvironment);
|
|
781
856
|
if (!nuxt.options.dev && !nuxt.options._prepare) await (plugins.find((plugin) => plugin.name === "@vite-hub/rate-limit/vite")?.api)?.validateNitroBuild?.(asReplayResolvedConfig(Object.assign({}, config, { command: environment.command })));
|
|
782
857
|
if (config.nitro) {
|
|
783
858
|
installVitePluginNitroModules(config.nitro, plugins);
|
|
@@ -819,13 +894,15 @@ async function installViteHubUIRuntime(nuxt) {
|
|
|
819
894
|
ui.addViteHubUIComponents(nuxt);
|
|
820
895
|
});
|
|
821
896
|
}
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
897
|
+
function assertSupportedNuxt(nuxt) {
|
|
898
|
+
const builder = nuxt.options.server?.builder;
|
|
899
|
+
if (builder === "vite" || builder === "@nuxt/vite-server") throw viteHubErrorDiagnostics.VITE_HUB_B0023({ message: "[vitehub] vite-hub/nuxt needs Nitro 3, but Nuxt's Vite-only server builder does not run Nitro. Remove server.builder to use Nuxt's default Nitro builder." });
|
|
900
|
+
const version = nuxt._version;
|
|
901
|
+
const [major = NaN, minor = NaN] = (version ?? "").split(".").map((part) => Number.parseInt(part, 10));
|
|
902
|
+
const nitroMajor = nuxt.options._nitroMajor;
|
|
903
|
+
if (nitroMajor === void 0 ? !(major < 5) : nitroMajor === 3) return;
|
|
904
|
+
const nitroOptIn = nitroMajor === 2 && major === 4 && minor >= 7;
|
|
905
|
+
throw viteHubErrorDiagnostics.VITE_HUB_B0023({ message: nitroOptIn ? `[vitehub] vite-hub/nuxt needs Nitro 3. This app runs Nuxt ${version} with Nitro 2. If the nitro package is missing, run pnpm add nitro. If it is already listed, remove any configuration that forces Nitro 2.` : `[vitehub] vite-hub/nuxt needs Nitro 3, which runs on Nuxt 4.7 with the nitro package, or on Nuxt 5. This app runs Nuxt ${version}. Upgrade Nuxt and add Nitro 3: pnpm add nuxt@^4.7.0 nitro` });
|
|
829
906
|
}
|
|
830
907
|
function isPlainObject(value) {
|
|
831
908
|
if (typeof value !== "object" || value === null) return false;
|
|
@@ -855,7 +932,7 @@ function mergeNuxtModuleOptions(inline, config) {
|
|
|
855
932
|
const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtInstance) {
|
|
856
933
|
if (!nuxtInstance) return;
|
|
857
934
|
const nuxt = nuxtInstance;
|
|
858
|
-
assertSupportedNuxt(nuxt
|
|
935
|
+
assertSupportedNuxt(nuxt);
|
|
859
936
|
if (nuxt.hook) Reflect.apply(nuxt.hook, nuxt, ["doctor:extendExtensions", (entries) => {
|
|
860
937
|
entries.push(doctorExtensionEntry);
|
|
861
938
|
}]);
|
|
@@ -971,16 +1048,16 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtIn
|
|
|
971
1048
|
const runtimeCapabilityImports = {
|
|
972
1049
|
blob: consoleBlobEnabled ? "vite-hub/blob" : false,
|
|
973
1050
|
connections: options.connections ? generatedModules.connectionsAgent : false,
|
|
974
|
-
console: consoleOptions ?
|
|
1051
|
+
console: consoleOptions ? generatedModules.consoleAgent : false,
|
|
975
1052
|
db: options.database ? "@vite-hub/database/runtime/registry" : false,
|
|
976
1053
|
i18n: options.i18n ? "vite-hub/i18n/server" : false,
|
|
977
1054
|
realtime: options.realtime ? "vite-hub/realtime/agent" : false,
|
|
978
|
-
...ownerModules.emailVite ? { email: "vite-hub/email" } : {},
|
|
1055
|
+
...ownerModules.emailVite && options.email ? { email: "vite-hub/email" } : {},
|
|
979
1056
|
...ownerModules.kvVite ? { kv: "vite-hub/kv" } : {}
|
|
980
1057
|
};
|
|
981
1058
|
const consoleInvocationRootState = {};
|
|
982
1059
|
const consoleInvokeEnabled = consoleOptions ? consoleOptions.invoke ?? Boolean(nuxt.options.dev) : false;
|
|
983
|
-
let
|
|
1060
|
+
let generatedConsoleAppPath;
|
|
984
1061
|
let consoleWorkflowConfigResolved = false;
|
|
985
1062
|
const effectiveAuth = options.auth;
|
|
986
1063
|
const serverAutoImports = resolveViteHubServerImports({
|
|
@@ -996,7 +1073,7 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtIn
|
|
|
996
1073
|
workflow: Boolean(options.workflow)
|
|
997
1074
|
});
|
|
998
1075
|
if (nuxtServerAutoImportsEnabled(nuxt.options)) {
|
|
999
|
-
const { installNuxtServerAutoImports } = await import("./nuxt-server-auto-imports-
|
|
1076
|
+
const { installNuxtServerAutoImports } = await import("./nuxt-server-auto-imports-4aT5BD4u.js");
|
|
1000
1077
|
installNuxtServerAutoImports(nuxtInstance, serverAutoImports);
|
|
1001
1078
|
}
|
|
1002
1079
|
let consoleHasPrimaryAuth = false;
|
|
@@ -1015,30 +1092,39 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtIn
|
|
|
1015
1092
|
if (!nuxt.options.dev && !nuxt.options._prepare) assertConsoleProductionAuth(configuredConsole);
|
|
1016
1093
|
}
|
|
1017
1094
|
}
|
|
1018
|
-
const
|
|
1019
|
-
file,
|
|
1095
|
+
const consoleSiteAccess = resolveConsoleSiteAccess(options.comments, {
|
|
1020
1096
|
projectRoot,
|
|
1021
|
-
|
|
1022
|
-
sections: consoleSections,
|
|
1023
|
-
catalog,
|
|
1024
|
-
blobStores: consoleBlobStores,
|
|
1025
|
-
invoke: consoleInvokeEnabled,
|
|
1026
|
-
active: () => !consoleInvocationRootState.closed,
|
|
1027
|
-
access: consoleAccess,
|
|
1028
|
-
runtimeCapabilityImports,
|
|
1029
|
-
development: nuxt.options.dev === true,
|
|
1030
|
-
target: {
|
|
1031
|
-
host: {
|
|
1032
|
-
name: plan.host,
|
|
1033
|
-
preset: nitroPreset
|
|
1034
|
-
},
|
|
1035
|
-
framework: {
|
|
1036
|
-
name: "nuxt",
|
|
1037
|
-
version: nuxt._version
|
|
1038
|
-
}
|
|
1039
|
-
},
|
|
1040
|
-
...consoleOptions?.pill === false ? {} : { pageTool: { base: nuxt.options.app?.baseURL || "/" } }
|
|
1097
|
+
serverDirs: resolveNuxtServerDirs(nuxt.options)
|
|
1041
1098
|
});
|
|
1099
|
+
let consoleDocumentEditors;
|
|
1100
|
+
const writeNuxtConsoleApp = (file, catalog) => {
|
|
1101
|
+
const appModule = {
|
|
1102
|
+
file,
|
|
1103
|
+
projectRoot,
|
|
1104
|
+
name: options.name,
|
|
1105
|
+
sections: consoleSections,
|
|
1106
|
+
catalog,
|
|
1107
|
+
blobStores: consoleBlobStores,
|
|
1108
|
+
invoke: consoleInvokeEnabled,
|
|
1109
|
+
active: () => !consoleInvocationRootState.closed,
|
|
1110
|
+
access: consoleAccess,
|
|
1111
|
+
runtimeCapabilityImports: resolveConsoleRuntimeCapabilityImports(runtimeCapabilityImports, replayPlugins),
|
|
1112
|
+
development: nuxt.options.dev === true,
|
|
1113
|
+
target: {
|
|
1114
|
+
host: {
|
|
1115
|
+
name: plan.host,
|
|
1116
|
+
preset: nitroPreset
|
|
1117
|
+
},
|
|
1118
|
+
framework: {
|
|
1119
|
+
name: "nuxt",
|
|
1120
|
+
version: nuxt._version
|
|
1121
|
+
}
|
|
1122
|
+
},
|
|
1123
|
+
site: consoleSiteAccess
|
|
1124
|
+
};
|
|
1125
|
+
consoleDocumentEditors = consoleAppModuleHasDocumentEditors(appModule);
|
|
1126
|
+
return writeConsoleAppModule(appModule);
|
|
1127
|
+
};
|
|
1042
1128
|
const viteConfig = nuxt.options.vite;
|
|
1043
1129
|
const secondaryProjectRoots = [.../* @__PURE__ */ new Set([...configuredProjectRoots(options, rootDir, viteRoot), ...options.connections ? [viteRoot] : []])].filter((root) => root !== projectRoot);
|
|
1044
1130
|
const generatedTypes = [
|
|
@@ -1180,9 +1266,12 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtIn
|
|
|
1180
1266
|
if (nuxt.options.dev && !nuxt.options.vitehubCliDiscovery) publishNuxtDevServer(nuxt);
|
|
1181
1267
|
typesPlugin?.api?.setPrepareSources?.(sourcePlugin?.api?.prepareSources);
|
|
1182
1268
|
await typesPlugin?.api?.prepareTypes?.({ projectRoot });
|
|
1269
|
+
const consoleUrl = resolveConsoleUrl(consoleOptions);
|
|
1270
|
+
const consoleUrlDefine = consoleUrl === void 0 ? {} : { __VITEHUB_CONSOLE_URL__: JSON.stringify(consoleUrl) };
|
|
1183
1271
|
viteConfig.define = {
|
|
1184
1272
|
...viteConfig.define,
|
|
1185
|
-
__VITEHUB_APP_BASE_URL__: JSON.stringify(nuxt.options.app?.baseURL || "/")
|
|
1273
|
+
__VITEHUB_APP_BASE_URL__: JSON.stringify(nuxt.options.app?.baseURL || "/"),
|
|
1274
|
+
...consoleUrlDefine
|
|
1186
1275
|
};
|
|
1187
1276
|
viteConfig[VITEHUB_GENERATED_ROOT] = join(nuxt.options.buildDir, "vitehub");
|
|
1188
1277
|
viteConfig[VITEHUB_NITRO_CONFIG_CONTEXT] = true;
|
|
@@ -1229,6 +1318,10 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtIn
|
|
|
1229
1318
|
});
|
|
1230
1319
|
const nitro3ExternalLists = /* @__PURE__ */ new WeakMap();
|
|
1231
1320
|
nuxt.hook?.("nitro:config", async (config) => {
|
|
1321
|
+
if (consoleUrl !== void 0) config.replace = {
|
|
1322
|
+
...isRecord(config.replace) ? config.replace : {},
|
|
1323
|
+
...consoleUrlDefine
|
|
1324
|
+
};
|
|
1232
1325
|
const previousExternalList = nitro3ExternalLists.get(config);
|
|
1233
1326
|
if (previousExternalList && config.noExternals === previousExternalList) config.noExternals = false;
|
|
1234
1327
|
const incomingNoExternals = config.noExternals;
|
|
@@ -1272,8 +1365,7 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtIn
|
|
|
1272
1365
|
consoleBlobStores.splice(0, consoleBlobStores.length, ...resolvedReplayedBlob ? Object.keys(resolvedReplayedBlob.stores || { default: resolvedReplayedBlob.store }) : []);
|
|
1273
1366
|
installConsoleSections(projectRoot, consoleSections);
|
|
1274
1367
|
installConsoleProjectName(projectRoot, resolveConsoleProjectName(projectRoot, options.name));
|
|
1275
|
-
addConsoleRpcHandler(config, consoleRuntimeRoot);
|
|
1276
|
-
addConsoleAppRoutes(config, consoleRuntimeRoot);
|
|
1368
|
+
addConsoleRpcHandler(config, consoleRuntimeRoot, void 0, { siteAccess: consoleSiteAccess });
|
|
1277
1369
|
if (!nuxt.options.vitehubCliDiscovery) {
|
|
1278
1370
|
const consoleCatalog = await discoverConsoleBuildCatalog({
|
|
1279
1371
|
contentImportBase: "vite-hub/content",
|
|
@@ -1290,25 +1382,27 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtIn
|
|
|
1290
1382
|
workspaceDiscoveryRoot: configuredProjectRoot(viteRoot, options.workspace),
|
|
1291
1383
|
workflowDiscoveryRoot: rootDir
|
|
1292
1384
|
});
|
|
1293
|
-
await
|
|
1385
|
+
await writeNuxtConsoleApp(generatedConsoleAppPath ?? resolveGeneratedConsoleApp(projectRoot, nuxt.options.dev === true), consoleCatalog);
|
|
1294
1386
|
}
|
|
1295
1387
|
}
|
|
1296
1388
|
Object.assign(config, mergeGeneratedSourceNitroConfig(config, generatedSourceHandlers));
|
|
1297
1389
|
addNoExternals(config, [
|
|
1298
|
-
"vite-hub",
|
|
1299
|
-
"@vite-hub/",
|
|
1300
1390
|
join(projectRoot, ".vitehub"),
|
|
1301
1391
|
h3RuntimeRoot,
|
|
1302
1392
|
...linkedViteHubPackageRoots(projectRoot)
|
|
1303
1393
|
]);
|
|
1304
1394
|
if (incomingNoExternals === false && Array.isArray(config.noExternals)) nitro3ExternalLists.set(config, config.noExternals);
|
|
1305
1395
|
else nitro3ExternalLists.delete(config);
|
|
1306
|
-
if (!nuxt.options.experimental?.nitroViteEnvironment)
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1396
|
+
if (!nuxt.options.experimental?.nitroViteEnvironment) {
|
|
1397
|
+
installNitroRuntimeResolvers(config, replayPlugins, {
|
|
1398
|
+
root: replayConfig.root || viteRoot,
|
|
1399
|
+
projectRoot: rootDir,
|
|
1400
|
+
serverDirs: resolveNuxtServerDirs(nuxt.options)
|
|
1401
|
+
});
|
|
1402
|
+
await installNitroViteImports(config, rootDir);
|
|
1403
|
+
}
|
|
1310
1404
|
normalizeGeneratedNitroPlugins(config, projectRoot);
|
|
1311
|
-
installNitroBuildPlugins(config, [join(projectRoot, ".vitehub"), join(nuxt.options.buildDir, "vitehub")], nuxt.options.dev === true && plan.host === "cloudflare", consoleSections, !nuxt.options.dev);
|
|
1405
|
+
installNitroBuildPlugins(config, [join(projectRoot, ".vitehub"), join(nuxt.options.buildDir, "vitehub")], nuxt.options.dev === true && plan.host === "cloudflare", consoleSections, !nuxt.options.dev, () => nuxt.options.dev ? consoleDocumentEditorSectionIds.length > 0 : consoleDocumentEditors, nuxt.options.dev === true);
|
|
1312
1406
|
if (nuxt.options.dev && plan.host === "cloudflare") await writeCloudflareDevShims(nuxt.options.buildDir, config.alias ??= {});
|
|
1313
1407
|
if (plan.host === "cloudflare") {
|
|
1314
1408
|
if (!nuxt.options.dev) {
|
|
@@ -1403,11 +1497,12 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtIn
|
|
|
1403
1497
|
addNuxtVueImports(nuxt, "vite-hub/realtime", ["defineRealtime"]);
|
|
1404
1498
|
addNuxtVueImports(nuxt, "vite-hub/realtime/vue", ["useRealtimeTiptap"]);
|
|
1405
1499
|
}
|
|
1406
|
-
if (consoleOptions)
|
|
1500
|
+
if (consoleOptions) generatedConsoleAppPath = await installConsole({
|
|
1407
1501
|
nuxt,
|
|
1408
1502
|
projectRoot,
|
|
1409
1503
|
name: options.name,
|
|
1410
1504
|
sections: consoleSections,
|
|
1505
|
+
siteAccess: consoleSiteAccess,
|
|
1411
1506
|
discovery: {
|
|
1412
1507
|
contentImportBase: "vite-hub/content",
|
|
1413
1508
|
databaseDiscoveryRoot: configuredDatabaseDiscoveryRoot,
|
|
@@ -1421,10 +1516,10 @@ const viteHubNuxtModule = async function viteHubNuxtModule(inlineOptions, nuxtIn
|
|
|
1421
1516
|
workflowDiscoveryRoot: rootDir,
|
|
1422
1517
|
workspaceDiscoveryRoot: configuredProjectRoot(viteRoot, options.workspace)
|
|
1423
1518
|
},
|
|
1424
|
-
|
|
1519
|
+
writeGeneratedApp: !nuxt.options.vitehubCliDiscovery,
|
|
1425
1520
|
canDiscoverDefinitions: () => consoleWorkflowConfigResolved,
|
|
1426
1521
|
access: consoleAccess,
|
|
1427
|
-
|
|
1522
|
+
writeApp: writeNuxtConsoleApp
|
|
1428
1523
|
});
|
|
1429
1524
|
};
|
|
1430
1525
|
viteHubNuxtModule.getMeta = async () => ({
|
|
@@ -1474,5 +1569,4 @@ function usesOnlyPostgresDatabases(rootDir, serverDirs) {
|
|
|
1474
1569
|
const definitions = discoverDatabaseDefinitions(rootDir, { serverDirs });
|
|
1475
1570
|
return definitions.length > 0 && definitions.every((definition) => readDatabaseDefinitionDialect(definition.handler) === "postgresql");
|
|
1476
1571
|
}
|
|
1477
|
-
//#endregion
|
|
1478
1572
|
export { viteHubNuxtModule as default };
|