eddev 2.0.0-beta.2 → 2.0.0-beta.200
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/css/editor-styles.css +4 -0
- package/dist/app/entry/HydrationOverlay.d.ts +2 -0
- package/dist/app/entry/HydrationOverlay.d.ts.map +1 -0
- package/dist/app/entry/HydrationOverlay.js +2 -0
- package/dist/app/entry/MetaTags.d.ts +8 -0
- package/dist/app/entry/MetaTags.d.ts.map +1 -0
- package/dist/app/entry/MetaTags.js +30 -0
- package/dist/app/entry/boot-admin.d.ts +2 -0
- package/dist/app/entry/boot-admin.d.ts.map +1 -0
- package/dist/app/entry/boot-admin.js +12 -0
- package/dist/app/entry/hydration-script.d.ts +2 -0
- package/dist/app/entry/hydration-script.d.ts.map +1 -0
- package/dist/app/entry/hydration-script.js +18 -0
- package/dist/app/entry/spa-root.d.ts +2 -0
- package/dist/app/entry/spa-root.d.ts.map +1 -0
- package/dist/app/entry/spa-root.js +7 -0
- package/dist/app/entry/ssr-root-client.d.ts +7 -0
- package/dist/app/entry/ssr-root-client.d.ts.map +1 -0
- package/dist/app/entry/ssr-root-client.js +21 -0
- package/dist/app/entry/ssr-root.d.ts +11 -0
- package/dist/app/entry/ssr-root.d.ts.map +1 -0
- package/dist/app/entry/ssr-root.js +22 -0
- package/dist/app/lib/admin/defineField.d.ts +1 -0
- package/dist/app/lib/admin/defineField.d.ts.map +1 -0
- package/dist/app/lib/admin/defineWidget.d.ts +1 -0
- package/dist/app/lib/admin/defineWidget.d.ts.map +1 -0
- package/dist/app/lib/admin/index.d.ts +3 -2
- package/dist/app/lib/admin/index.d.ts.map +1 -0
- package/dist/app/lib/admin/index.js +2 -2
- package/dist/app/lib/admin/installFieldTypes.d.ts +1 -0
- package/dist/app/lib/admin/installFieldTypes.d.ts.map +1 -0
- package/dist/app/lib/admin/installFieldTypes.js +3 -1
- package/dist/app/lib/admin/runWidgets.d.ts +1 -0
- package/dist/app/lib/admin/runWidgets.d.ts.map +1 -0
- package/dist/app/lib/admin/runWidgets.js +8 -3
- package/dist/app/lib/blocks/ContentBlocks.d.ts +7 -4
- package/dist/app/lib/blocks/ContentBlocks.d.ts.map +1 -0
- package/dist/app/lib/blocks/ContentBlocks.js +19 -6
- package/dist/app/lib/blocks/EditableText.d.ts +31 -6
- package/dist/app/lib/blocks/EditableText.d.ts.map +1 -0
- package/dist/app/lib/blocks/EditableText.js +36 -7
- package/dist/app/lib/blocks/InnerBlocks.d.ts +23 -8
- package/dist/app/lib/blocks/InnerBlocks.d.ts.map +1 -0
- package/dist/app/lib/blocks/InnerBlocks.js +76 -28
- package/dist/app/lib/blocks/SlotBlocks.d.ts +8 -0
- package/dist/app/lib/blocks/SlotBlocks.d.ts.map +1 -0
- package/dist/app/lib/blocks/SlotBlocks.js +46 -0
- package/dist/app/lib/blocks/block-utils.d.ts +3 -2
- package/dist/app/lib/blocks/block-utils.d.ts.map +1 -0
- package/dist/app/lib/blocks/block-utils.js +4 -2
- package/dist/app/lib/blocks/builtin-blocks.d.ts +2 -0
- package/dist/app/lib/blocks/builtin-blocks.d.ts.map +1 -0
- package/dist/app/lib/blocks/builtin-blocks.js +55 -0
- package/dist/app/lib/blocks/defineBlock.d.ts +4 -0
- package/dist/app/lib/blocks/defineBlock.d.ts.map +1 -0
- package/dist/app/lib/blocks/defineBlock.js +9 -0
- package/dist/app/lib/blocks/editor/EditorHighlights.d.ts +8 -0
- package/dist/app/lib/blocks/editor/EditorHighlights.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/EditorHighlights.js +164 -0
- package/dist/app/lib/blocks/editor/EditorSupport.d.ts +1 -0
- package/dist/app/lib/blocks/editor/EditorSupport.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/EditorSupport.js +19 -12
- package/dist/app/lib/blocks/editor/ErrorBoundaryEditor.d.ts +1 -0
- package/dist/app/lib/blocks/editor/ErrorBoundaryEditor.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/block-templates.d.ts +8 -1
- package/dist/app/lib/blocks/editor/block-templates.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/block-templates.js +71 -2
- package/dist/app/lib/blocks/editor/blocks-by-tag.d.ts +1 -0
- package/dist/app/lib/blocks/editor/blocks-by-tag.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/controls.d.ts +1 -0
- package/dist/app/lib/blocks/editor/controls.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/create-block.d.ts +10 -0
- package/dist/app/lib/blocks/editor/create-block.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/create-block.js +13 -0
- package/dist/app/lib/blocks/editor/editor-config.d.ts +78 -9
- package/dist/app/lib/blocks/editor/editor-config.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/editor-config.js +29 -62
- package/dist/app/lib/blocks/editor/installGutenbergHooks.d.ts +4 -0
- package/dist/app/lib/blocks/editor/installGutenbergHooks.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/installGutenbergHooks.js +130 -25
- package/dist/app/lib/blocks/editor/root-blocks.d.ts +7 -0
- package/dist/app/lib/blocks/editor/root-blocks.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/root-blocks.js +30 -0
- package/dist/app/lib/blocks/editor/usePostEditor.d.ts +13 -2
- package/dist/app/lib/blocks/editor/usePostEditor.d.ts.map +1 -0
- package/dist/app/lib/blocks/editor/usePostEditor.js +28 -13
- package/dist/app/lib/blocks/index.d.ts +12 -9
- package/dist/app/lib/blocks/index.d.ts.map +1 -0
- package/dist/app/lib/blocks/index.js +11 -9
- package/dist/app/lib/blocks/inline-editing.d.ts +11 -1
- package/dist/app/lib/blocks/inline-editing.d.ts.map +1 -0
- package/dist/app/lib/blocks/inline-editing.js +15 -5
- package/dist/app/lib/devtools/components/BreakpointIndicator.d.ts +1 -0
- package/dist/app/lib/devtools/components/BreakpointIndicator.d.ts.map +1 -0
- package/dist/app/lib/devtools/components/BreakpointIndicator.js +7 -5
- package/dist/app/lib/devtools/components/DevUI.d.ts +1 -0
- package/dist/app/lib/devtools/components/DevUI.d.ts.map +1 -0
- package/dist/app/lib/devtools/components/DevUI.js +4 -3
- package/dist/app/lib/devtools/components/GridIndicator.d.ts +2 -0
- package/dist/app/lib/devtools/components/GridIndicator.d.ts.map +1 -0
- package/dist/app/lib/devtools/components/GridIndicator.js +29 -0
- package/dist/app/lib/devtools/dev-tools-store.d.ts +10 -0
- package/dist/app/lib/devtools/dev-tools-store.d.ts.map +1 -0
- package/dist/app/lib/devtools/dev-tools-store.js +8 -0
- package/dist/app/lib/devtools/hooks/usePersistState.d.ts +2 -1
- package/dist/app/lib/devtools/hooks/usePersistState.d.ts.map +1 -0
- package/dist/app/lib/devtools/hooks/usePersistState.js +11 -2
- package/dist/app/lib/devtools/hooks/useTailwind.d.ts +2311 -1267
- package/dist/app/lib/devtools/hooks/useTailwind.d.ts.map +1 -0
- package/dist/app/lib/devtools/hooks/useTailwind.js +6 -3
- package/dist/app/lib/devtools/index.d.ts +2 -0
- package/dist/app/lib/devtools/index.d.ts.map +1 -0
- package/dist/app/lib/devtools/index.js +1 -1
- package/dist/app/lib/devtools/loader.d.ts +1 -0
- package/dist/app/lib/devtools/loader.d.ts.map +1 -0
- package/dist/app/lib/devtools/loader.js +8 -7
- package/dist/app/lib/devtools/tailwind.config.d.ts +1 -0
- package/dist/app/lib/devtools/tailwind.config.d.ts.map +1 -0
- package/dist/app/lib/devtools/useQueryDebug.d.ts +8 -1
- package/dist/app/lib/devtools/useQueryDebug.d.ts.map +1 -0
- package/dist/app/lib/devtools/useQueryDebug.js +5 -8
- package/dist/app/lib/dynamic/dynamic.d.ts +2 -1
- package/dist/app/lib/dynamic/dynamic.d.ts.map +1 -0
- package/dist/app/lib/dynamic/dynamic.js +5 -1
- package/dist/app/lib/dynamic/index.d.ts +2 -1
- package/dist/app/lib/dynamic/index.d.ts.map +1 -0
- package/dist/app/lib/dynamic/index.js +1 -1
- package/dist/app/lib/hooks/index.d.ts +5 -5
- package/dist/app/lib/hooks/index.d.ts.map +1 -0
- package/dist/app/lib/hooks/index.js +4 -5
- package/dist/app/lib/hooks/{queryUtils.d.ts → query-hooks.d.ts} +46 -4
- package/dist/app/lib/hooks/query-hooks.d.ts.map +1 -0
- package/dist/app/lib/hooks/{queryUtils.js → query-hooks.js} +99 -40
- package/dist/app/lib/hooks/useAppData.d.ts +1 -0
- package/dist/app/lib/hooks/useAppData.d.ts.map +1 -0
- package/dist/app/lib/hooks/useAppData.js +12 -1
- package/dist/app/lib/hooks/useRPC.d.ts +1 -4
- package/dist/app/lib/hooks/useRPC.d.ts.map +1 -0
- package/dist/app/lib/hooks/useRPC.js +0 -8
- package/dist/app/lib/integrations/gravityforms/index.d.ts +3 -0
- package/dist/app/lib/integrations/gravityforms/index.d.ts.map +1 -0
- package/dist/app/lib/integrations/gravityforms/index.js +2 -0
- package/dist/app/lib/integrations/gravityforms/types.d.ts +145 -0
- package/dist/app/lib/integrations/gravityforms/types.d.ts.map +1 -0
- package/dist/app/lib/integrations/gravityforms/types.js +1 -0
- package/dist/app/lib/integrations/gravityforms/useGravityForm.d.ts +31 -0
- package/dist/app/lib/integrations/gravityforms/useGravityForm.d.ts.map +1 -0
- package/dist/app/lib/integrations/gravityforms/useGravityForm.js +295 -0
- package/dist/app/lib/internal/finalize-rpc.d.ts +18 -0
- package/dist/app/lib/internal/finalize-rpc.d.ts.map +1 -0
- package/dist/app/lib/internal/finalize-rpc.js +3 -0
- package/dist/app/lib/internal/index.d.ts +6 -4
- package/dist/app/lib/internal/index.d.ts.map +1 -0
- package/dist/app/lib/internal/index.js +5 -4
- package/dist/app/lib/internal/internal-store.d.ts +1 -2
- package/dist/app/lib/internal/internal-store.d.ts.map +1 -0
- package/dist/app/lib/internal/internal-store.js +1 -3
- package/dist/app/lib/internal/read-admin-manifest.d.ts +2 -1
- package/dist/app/lib/internal/read-admin-manifest.d.ts.map +1 -0
- package/dist/app/lib/internal/read-block-manifest.d.ts +1 -0
- package/dist/app/lib/internal/read-block-manifest.d.ts.map +1 -0
- package/dist/app/lib/internal/read-view-manifest.d.ts +1 -0
- package/dist/app/lib/internal/read-view-manifest.d.ts.map +1 -0
- package/dist/app/lib/legacy-stitches/createStitches.d.ts +22 -21
- package/dist/app/lib/legacy-stitches/createStitches.d.ts.map +1 -0
- package/dist/app/lib/legacy-stitches/createStitches.js +1 -1
- package/dist/app/lib/legacy-stitches/index.d.ts +2 -1
- package/dist/app/lib/legacy-stitches/index.d.ts.map +1 -0
- package/dist/app/lib/legacy-stitches/index.js +1 -1
- package/dist/app/lib/routing/components/BackButton.d.ts +50 -0
- package/dist/app/lib/routing/components/BackButton.d.ts.map +1 -0
- package/dist/app/lib/routing/components/BackButton.js +47 -0
- package/dist/app/lib/routing/components/BrowserRouter.d.ts +10 -1
- package/dist/app/lib/routing/components/BrowserRouter.d.ts.map +1 -0
- package/dist/app/lib/routing/components/BrowserRouter.js +138 -23
- package/dist/app/lib/routing/components/ClientOnly.d.ts +1 -0
- package/dist/app/lib/routing/components/ClientOnly.d.ts.map +1 -0
- package/dist/app/lib/routing/components/ClientOnly.js +2 -2
- package/dist/app/lib/routing/components/Link.d.ts +19 -2
- package/dist/app/lib/routing/components/Link.d.ts.map +1 -0
- package/dist/app/lib/routing/components/Link.js +47 -27
- package/dist/app/lib/routing/components/NativeLinkHandler.d.ts +10 -0
- package/dist/app/lib/routing/components/NativeLinkHandler.d.ts.map +1 -0
- package/dist/app/lib/routing/components/NativeLinkHandler.js +23 -0
- package/dist/app/lib/routing/components/RouteRenderer.d.ts +2 -1
- package/dist/app/lib/routing/components/RouteRenderer.d.ts.map +1 -0
- package/dist/app/lib/routing/components/RouteRenderer.js +20 -6
- package/dist/app/lib/routing/components/SSRRouter.d.ts +5 -2
- package/dist/app/lib/routing/components/SSRRouter.d.ts.map +1 -0
- package/dist/app/lib/routing/components/SSRRouter.js +7 -6
- package/dist/app/lib/routing/components/ScrollRestoration.d.ts +1 -0
- package/dist/app/lib/routing/components/ScrollRestoration.d.ts.map +1 -0
- package/dist/app/lib/routing/components/ScrollRestoration.js +5 -2
- package/dist/app/lib/routing/context.d.ts +9 -5
- package/dist/app/lib/routing/context.d.ts.map +1 -0
- package/dist/app/lib/routing/context.js +13 -96
- package/dist/app/lib/routing/hooks/useIsSSR.d.ts +1 -0
- package/dist/app/lib/routing/hooks/useIsSSR.d.ts.map +1 -0
- package/dist/app/lib/routing/hooks/useRestorableState.d.ts +3 -1
- package/dist/app/lib/routing/hooks/useRestorableState.d.ts.map +1 -0
- package/dist/app/lib/routing/hooks/useRestorableState.js +2 -1
- package/dist/app/lib/routing/hooks/useRoute.d.ts +17 -1
- package/dist/app/lib/routing/hooks/useRoute.d.ts.map +1 -0
- package/dist/app/lib/routing/hooks/useRoute.js +22 -1
- package/dist/app/lib/routing/hooks/useRouteMeta.d.ts +6 -0
- package/dist/app/lib/routing/hooks/useRouteMeta.d.ts.map +1 -0
- package/dist/app/lib/routing/hooks/useRouteMeta.js +9 -0
- package/dist/app/lib/routing/hooks/useRouteTransition.d.ts +2 -1
- package/dist/app/lib/routing/hooks/useRouteTransition.d.ts.map +1 -0
- package/dist/app/lib/routing/hooks/useRouteTransition.js +1 -1
- package/dist/app/lib/routing/hooks/useRouter.d.ts +2 -1
- package/dist/app/lib/routing/hooks/useRouter.d.ts.map +1 -0
- package/dist/app/lib/routing/hooks/useRouter.js +1 -1
- package/dist/app/lib/routing/hooks/useRouterEvents.d.ts +2 -1
- package/dist/app/lib/routing/hooks/useRouterEvents.d.ts.map +1 -0
- package/dist/app/lib/routing/hooks/useRouterEvents.js +1 -1
- package/dist/app/lib/routing/hooks/useRouterState.d.ts +2 -1
- package/dist/app/lib/routing/hooks/useRouterState.d.ts.map +1 -0
- package/dist/app/lib/routing/hooks/useRouterState.js +1 -1
- package/dist/app/lib/routing/hooks/useSearchParams.d.ts +78 -6
- package/dist/app/lib/routing/hooks/useSearchParams.d.ts.map +1 -0
- package/dist/app/lib/routing/hooks/useSearchParams.js +77 -17
- package/dist/app/lib/routing/index.d.ts +16 -13
- package/dist/app/lib/routing/index.d.ts.map +1 -0
- package/dist/app/lib/routing/index.js +15 -13
- package/dist/app/lib/routing/loader.d.ts +3 -2
- package/dist/app/lib/routing/loader.d.ts.map +1 -0
- package/dist/app/lib/routing/loader.js +26 -15
- package/dist/app/lib/routing/types.d.ts +62 -14
- package/dist/app/lib/routing/types.d.ts.map +1 -0
- package/dist/app/lib/routing/utils.d.ts +7 -2
- package/dist/app/lib/routing/utils.d.ts.map +1 -0
- package/dist/app/lib/routing/utils.js +41 -4
- package/dist/app/lib/{hooks → runtime}/apiConfig.d.ts +11 -2
- package/dist/app/lib/runtime/apiConfig.d.ts.map +1 -0
- package/dist/app/lib/runtime/apiConfig.js +6 -0
- package/dist/app/lib/runtime/errorHandling.d.ts +40 -0
- package/dist/app/lib/runtime/errorHandling.d.ts.map +1 -0
- package/dist/app/lib/runtime/errorHandling.js +6 -0
- package/dist/app/lib/runtime/index.d.ts +3 -0
- package/dist/app/lib/runtime/index.d.ts.map +1 -0
- package/dist/app/lib/runtime/index.js +2 -0
- package/dist/app/lib/views/defineView.d.ts +2 -1
- package/dist/app/lib/views/defineView.d.ts.map +1 -0
- package/dist/app/lib/views/index.d.ts +2 -1
- package/dist/app/lib/views/index.d.ts.map +1 -0
- package/dist/app/lib/views/index.js +1 -1
- package/dist/app/server/index.d.ts +6 -0
- package/dist/app/server/index.d.ts.map +1 -0
- package/dist/app/server/index.js +5 -0
- package/dist/app/server/proxy-wp-admin.d.ts +3 -0
- package/dist/app/server/proxy-wp-admin.d.ts.map +1 -0
- package/dist/app/server/proxy-wp-admin.js +138 -0
- package/dist/app/server/render-ai-page.d.ts +13 -0
- package/dist/app/server/render-ai-page.d.ts.map +1 -0
- package/dist/app/server/render-ai-page.js +100 -0
- package/dist/app/server/render-ssr-page.d.ts +31 -0
- package/dist/app/server/render-ssr-page.d.ts.map +1 -0
- package/dist/app/server/render-ssr-page.js +237 -0
- package/dist/app/server/rpc.d.ts +52 -0
- package/dist/app/server/rpc.d.ts.map +1 -0
- package/dist/app/server/rpc.js +18 -0
- package/dist/app/server/server-context.d.ts +75 -0
- package/dist/app/server/server-context.d.ts.map +1 -0
- package/dist/app/server/server-context.js +417 -0
- package/dist/app/server/server-custom-config.d.ts +3 -0
- package/dist/app/server/server-custom-config.d.ts.map +1 -0
- package/dist/app/server/server-custom-config.js +1 -0
- package/dist/app/server/utils/content-security.d.ts +26 -0
- package/dist/app/server/utils/content-security.d.ts.map +1 -0
- package/dist/app/server/utils/content-security.js +124 -0
- package/dist/app/server/utils/headers.d.ts +2 -0
- package/dist/app/server/utils/headers.d.ts.map +1 -0
- package/dist/app/server/utils/headers.js +17 -0
- package/dist/app/server/utils/replace-host.d.ts +7 -4
- package/dist/app/server/utils/replace-host.d.ts.map +1 -0
- package/dist/app/server/utils/replace-host.js +66 -11
- package/dist/app/server/utils/swr-cache.d.ts +5 -0
- package/dist/app/server/utils/swr-cache.d.ts.map +1 -0
- package/dist/app/server/utils/swr-cache.js +31 -0
- package/dist/app/utils/APIProvider.d.ts +3 -0
- package/dist/app/utils/APIProvider.d.ts.map +1 -0
- package/dist/app/utils/APIProvider.js +5 -0
- package/dist/app/utils/BlockErrorBoundary.d.ts +20 -0
- package/dist/app/utils/BlockErrorBoundary.d.ts.map +1 -0
- package/dist/app/utils/BlockErrorBoundary.js +38 -0
- package/dist/app/utils/ErrorMessage.d.ts +6 -0
- package/dist/app/utils/ErrorMessage.d.ts.map +1 -0
- package/dist/app/utils/ErrorMessage.js +14 -0
- package/dist/app/utils/RouteErrorBoundary.d.ts +20 -0
- package/dist/app/utils/RouteErrorBoundary.d.ts.map +1 -0
- package/dist/app/utils/RouteErrorBoundary.js +41 -0
- package/dist/app/utils/asset-capture.d.ts +3 -0
- package/dist/app/utils/asset-capture.d.ts.map +1 -0
- package/dist/app/utils/asset-capture.js +5 -0
- package/dist/app/utils/hydration-debugger.d.ts +14 -0
- package/dist/app/utils/hydration-debugger.d.ts.map +1 -0
- package/dist/app/utils/hydration-debugger.js +11 -0
- package/dist/app/utils/query-client.d.ts +3 -0
- package/dist/app/utils/query-client.d.ts.map +1 -0
- package/dist/app/utils/query-client.js +5 -1
- package/dist/app/utils/query-monitor.d.ts +27 -0
- package/dist/app/utils/query-monitor.d.ts.map +1 -0
- package/dist/app/utils/query-monitor.js +7 -0
- package/dist/app/utils/trpc-client.d.ts +3 -0
- package/dist/app/utils/trpc-client.d.ts.map +1 -0
- package/dist/app/utils/trpc-client.js +39 -0
- package/dist/app/utils/wp.d.ts +11 -10
- package/dist/app/utils/wp.d.ts.map +1 -0
- package/dist/node/cli/cli-mode.d.ts +1 -0
- package/dist/node/cli/cli-mode.d.ts.map +1 -0
- package/dist/node/cli/cli-worker.d.ts +2 -1
- package/dist/node/cli/cli-worker.d.ts.map +1 -0
- package/dist/node/cli/cli-worker.js +12 -3
- package/dist/node/cli/cli.d.ts +1 -0
- package/dist/node/cli/cli.d.ts.map +1 -0
- package/dist/node/cli/cli.js +195 -11
- package/dist/node/cli/display/CLIApp.d.ts +2 -1
- package/dist/node/cli/display/CLIApp.d.ts.map +1 -0
- package/dist/node/cli/display/CLIApp.js +4 -7
- package/dist/node/cli/display/boot-cli-app.d.ts +1 -0
- package/dist/node/cli/display/boot-cli-app.d.ts.map +1 -0
- package/dist/node/cli/display/boot-cli-app.js +1 -1
- package/dist/node/cli/display/components/Fullscreen.d.ts +1 -0
- package/dist/node/cli/display/components/Fullscreen.d.ts.map +1 -0
- package/dist/node/cli/display/components/LogEntries.d.ts +2 -1
- package/dist/node/cli/display/components/LogEntries.d.ts.map +1 -0
- package/dist/node/cli/display/components/MenuItem.d.ts +1 -0
- package/dist/node/cli/display/components/MenuItem.d.ts.map +1 -0
- package/dist/node/cli/display/components/TextInput.d.ts +1 -0
- package/dist/node/cli/display/components/TextInput.d.ts.map +1 -0
- package/dist/node/cli/display/hooks/useManifest.d.ts +1 -0
- package/dist/node/cli/display/hooks/useManifest.d.ts.map +1 -0
- package/dist/node/cli/display/hooks/useStatefulLog.d.ts +2 -1
- package/dist/node/cli/display/hooks/useStatefulLog.d.ts.map +1 -0
- package/dist/node/cli/display/tools/BlockList.d.ts +1 -0
- package/dist/node/cli/display/tools/BlockList.d.ts.map +1 -0
- package/dist/node/cli/display/tools/CreateBlock.d.ts +2 -1
- package/dist/node/cli/display/tools/CreateBlock.d.ts.map +1 -0
- package/dist/node/cli/display/tools/cli-tool-list.d.ts +1 -0
- package/dist/node/cli/display/tools/cli-tool-list.d.ts.map +1 -0
- package/dist/node/cli/display/tools/cli-tools.d.ts +2 -11
- package/dist/node/cli/display/tools/cli-tools.d.ts.map +1 -0
- package/dist/node/cli/display/tools/cli-tools.js +9 -9
- package/dist/node/cli/display/util/colors.d.ts +3 -2
- package/dist/node/cli/display/util/colors.d.ts.map +1 -0
- package/dist/node/cli/version.d.ts +2 -1
- package/dist/node/cli/version.d.ts.map +1 -0
- package/dist/node/cli/version.js +1 -1
- package/dist/node/compiler/build-vinxi.d.ts +9 -0
- package/dist/node/compiler/build-vinxi.d.ts.map +1 -0
- package/dist/node/compiler/build-vinxi.js +38 -0
- package/dist/node/compiler/bundler.admin.d.ts +3 -2
- package/dist/node/compiler/bundler.admin.d.ts.map +1 -0
- package/dist/node/compiler/bundler.admin.js +4 -4
- package/dist/node/compiler/bundler.frontend.d.ts +3 -1
- package/dist/node/compiler/bundler.frontend.d.ts.map +1 -0
- package/dist/node/compiler/bundler.frontend.js +29 -15
- package/dist/node/compiler/dev-server.d.ts +19 -0
- package/dist/node/compiler/dev-server.d.ts.map +1 -0
- package/dist/node/compiler/dev-server.js +113 -0
- package/dist/node/compiler/get-vite-config.d.ts +30 -0
- package/dist/node/compiler/get-vite-config.d.ts.map +1 -0
- package/dist/node/compiler/get-vite-config.js +332 -0
- package/dist/node/compiler/vinxi-app.d.ts +23 -0
- package/dist/node/compiler/vinxi-app.d.ts.map +1 -0
- package/dist/node/compiler/vinxi-app.js +230 -0
- package/dist/node/compiler/vinxi-codegen.d.ts +13 -0
- package/dist/node/compiler/vinxi-codegen.d.ts.map +1 -0
- package/dist/node/compiler/vinxi-codegen.js +731 -0
- package/dist/node/graphql/graphql-codegen.d.ts +13 -2
- package/dist/node/graphql/graphql-codegen.d.ts.map +1 -0
- package/dist/node/graphql/graphql-codegen.js +242 -40
- package/dist/node/graphql/graphql-schema-loader.d.ts +3 -1
- package/dist/node/graphql/graphql-schema-loader.d.ts.map +1 -0
- package/dist/node/graphql/graphql-schema-loader.js +5 -19
- package/dist/node/graphql/plugins/gql-plugin-files.d.ts +3 -1
- package/dist/node/graphql/plugins/gql-plugin-files.d.ts.map +1 -0
- package/dist/node/graphql/plugins/gql-plugin-files.js +3 -2
- package/dist/node/graphql/plugins/gql-plugin-no-duplicates.d.ts +1 -0
- package/dist/node/graphql/plugins/gql-plugin-no-duplicates.d.ts.map +1 -0
- package/dist/node/graphql/plugins/gql-plugin-queries.d.ts +1 -0
- package/dist/node/graphql/plugins/gql-plugin-queries.d.ts.map +1 -0
- package/dist/node/graphql/plugins/gql-plugin-queries.js +2 -2
- package/dist/node/graphql/query-files-loader.d.ts +4 -0
- package/dist/node/graphql/query-files-loader.d.ts.map +1 -0
- package/dist/node/graphql/query-files-loader.js +5 -0
- package/dist/node/graphql/wp-info-query.d.ts +1 -0
- package/dist/node/graphql/wp-info-query.d.ts.map +1 -0
- package/dist/node/project/config.d.ts +207 -73
- package/dist/node/project/config.d.ts.map +1 -0
- package/dist/node/project/config.js +95 -21
- package/dist/node/project/eddev-build-file.d.ts +1 -0
- package/dist/node/project/eddev-build-file.d.ts.map +1 -0
- package/dist/node/project/eddev-build-file.js +4 -2
- package/dist/node/project/env.d.ts +6 -1
- package/dist/node/project/env.d.ts.map +1 -0
- package/dist/node/project/env.js +2 -1
- package/dist/node/project/favicons.d.ts +1 -0
- package/dist/node/project/favicons.d.ts.map +1 -0
- package/dist/node/project/manifest/block-manifest.d.ts +1 -0
- package/dist/node/project/manifest/block-manifest.d.ts.map +1 -0
- package/dist/node/project/manifest/block-manifest.js +8 -4
- package/dist/node/project/manifest/field-manifest.d.ts +1 -0
- package/dist/node/project/manifest/field-manifest.d.ts.map +1 -0
- package/dist/node/project/manifest/manifest.d.ts +3 -1
- package/dist/node/project/manifest/manifest.d.ts.map +1 -0
- package/dist/node/project/manifest/manifest.js +15 -11
- package/dist/node/project/manifest/routes-manifest.d.ts +21 -0
- package/dist/node/project/manifest/routes-manifest.d.ts.map +1 -0
- package/dist/node/project/manifest/routes-manifest.js +74 -0
- package/dist/node/project/manifest/view-manifest.d.ts +1 -0
- package/dist/node/project/manifest/view-manifest.d.ts.map +1 -0
- package/dist/node/project/manifest/view-manifest.js +2 -2
- package/dist/node/project/manifest/widget-manifest.d.ts +1 -0
- package/dist/node/project/manifest/widget-manifest.d.ts.map +1 -0
- package/dist/node/project/project.d.ts +15 -2
- package/dist/node/project/project.d.ts.map +1 -0
- package/dist/node/project/project.js +73 -21
- package/dist/node/project/wp-info.d.ts +3 -0
- package/dist/node/project/wp-info.d.ts.map +1 -0
- package/dist/node/project/wp-info.js +13 -3
- package/dist/node/storybook/index.d.ts +3 -0
- package/dist/node/storybook/index.d.ts.map +1 -0
- package/dist/node/storybook/index.js +13 -0
- package/dist/node/types/block-type.d.ts +57 -25
- package/dist/node/types/block-type.d.ts.map +1 -0
- package/dist/node/types/block-type.js +4 -1
- package/dist/node/types/view-type.d.ts +8 -7
- package/dist/node/types/view-type.d.ts.map +1 -0
- package/dist/node/types/view-type.js +3 -4
- package/dist/node/utils/fetch-wp.d.ts +2 -0
- package/dist/node/utils/fetch-wp.d.ts.map +1 -0
- package/dist/node/utils/fetch-wp.js +28 -0
- package/dist/node/utils/{formatZodError.d.ts → format-zod-error.d.ts} +1 -0
- package/dist/node/utils/format-zod-error.d.ts.map +1 -0
- package/dist/node/utils/fs-codegen.d.ts +44 -0
- package/dist/node/utils/fs-codegen.d.ts.map +1 -0
- package/dist/node/utils/fs-codegen.js +105 -0
- package/dist/node/utils/fs.d.ts +5 -0
- package/dist/node/utils/fs.d.ts.map +1 -0
- package/dist/node/utils/fs.js +2 -0
- package/dist/node/utils/{getRepoInfo.d.ts → get-repo-info.d.ts} +1 -0
- package/dist/node/utils/get-repo-info.d.ts.map +1 -0
- package/dist/node/utils/helpers.d.ts +1 -0
- package/dist/node/utils/helpers.d.ts.map +1 -0
- package/dist/node/utils/{highlightCode.d.ts → highlight-code.d.ts} +1 -0
- package/dist/node/utils/highlight-code.d.ts.map +1 -0
- package/dist/node/utils/{isDeploying.d.ts → is-deploying.d.ts} +1 -0
- package/dist/node/utils/is-deploying.d.ts.map +1 -0
- package/dist/node/utils/{isDeploying.js → is-deploying.js} +1 -1
- package/dist/node/utils/report-builder.d.ts +7 -6
- package/dist/node/utils/report-builder.d.ts.map +1 -0
- package/dist/node/utils/self-signed-cert.d.ts +9 -0
- package/dist/node/utils/self-signed-cert.d.ts.map +1 -0
- package/dist/node/utils/{selfSignedCert.js → self-signed-cert.js} +29 -5
- package/dist/node/utils/{statefulLog.d.ts → stateful-log.d.ts} +1 -0
- package/dist/node/utils/stateful-log.d.ts.map +1 -0
- package/dist/node/utils/{statefulLog.js → stateful-log.js} +3 -1
- package/dist/node/utils/{export-extractor.d.ts → ts-export-extractor.d.ts} +1 -0
- package/dist/node/utils/ts-export-extractor.d.ts.map +1 -0
- package/dist/node/utils/watch-file-tree.d.ts +26 -0
- package/dist/node/utils/watch-file-tree.d.ts.map +1 -0
- package/dist/node/utils/{watchFileTree.js → watch-file-tree.js} +12 -5
- package/package.json +62 -47
- package/tsconfig.app.json +8 -3
- package/tsconfig.node.json +1 -0
- package/types.app.d.ts +4 -2
- package/types.app.internal.d.ts +2 -2
- package/types.meta.d.ts +449 -136
- package/types.node.d.ts +3 -3
- package/dist/app/entry/Root.d.ts +0 -1
- package/dist/app/entry/Root.js +0 -9
- package/dist/app/entry/main.admin.d.ts +0 -3
- package/dist/app/entry/main.admin.js +0 -10
- package/dist/app/entry/main.frontend.spa.d.ts +0 -3
- package/dist/app/entry/main.frontend.spa.js +0 -13
- package/dist/app/entry/main.frontend.ssr.d.ts +0 -21
- package/dist/app/entry/main.frontend.ssr.js +0 -79
- package/dist/app/entry/main.serverless.dev.d.ts +0 -4
- package/dist/app/entry/main.serverless.dev.js +0 -21
- package/dist/app/lib/blocks/ErrorBoundaryFrontend.d.ts +0 -15
- package/dist/app/lib/blocks/ErrorBoundaryFrontend.js +0 -35
- package/dist/app/lib/hooks/apiConfig.js +0 -4
- package/dist/app/lib/hooks/usePageLoad.d.ts +0 -6
- package/dist/app/lib/hooks/usePageLoad.js +0 -5
- package/dist/app/server/create-api-builtin-hono.d.ts +0 -8
- package/dist/app/server/create-api-builtin-hono.js +0 -80
- package/dist/app/server/create-ssr-hono.d.ts +0 -18
- package/dist/app/server/create-ssr-hono.js +0 -104
- package/dist/app/server/utils/index.html.d.ts +0 -2
- package/dist/app/server/utils/index.html.js +0 -14
- package/dist/node/compiler/index.html.d.ts +0 -2
- package/dist/node/compiler/index.html.js +0 -15
- package/dist/node/compiler/serverless.dev.d.ts +0 -16
- package/dist/node/compiler/serverless.dev.js +0 -215
- package/dist/node/compiler/vite/get-vite-config.d.ts +0 -13
- package/dist/node/compiler/vite/get-vite-config.js +0 -315
- package/dist/node/compiler/vite/plugin-admin.d.ts +0 -4
- package/dist/node/compiler/vite/plugin-admin.js +0 -67
- package/dist/node/compiler/vite/plugin-blocks.d.ts +0 -4
- package/dist/node/compiler/vite/plugin-blocks.js +0 -73
- package/dist/node/compiler/vite/plugin-entry.d.ts +0 -6
- package/dist/node/compiler/vite/plugin-entry.js +0 -16
- package/dist/node/compiler/vite/plugin-resolved-tailwind.d.ts +0 -4
- package/dist/node/compiler/vite/plugin-resolved-tailwind.js +0 -29
- package/dist/node/compiler/vite/plugin-theme.d.ts +0 -4
- package/dist/node/compiler/vite/plugin-theme.js +0 -40
- package/dist/node/compiler/vite/plugin-views.d.ts +0 -4
- package/dist/node/compiler/vite/plugin-views.js +0 -51
- package/dist/node/utils/console.d.ts +0 -21
- package/dist/node/utils/console.js +0 -28
- package/dist/node/utils/selfSignedCert.d.ts +0 -4
- package/dist/node/utils/unsafe-fetch.d.ts +0 -2
- package/dist/node/utils/unsafe-fetch.js +0 -19
- package/dist/node/utils/watchFileTree.d.ts +0 -11
- package/tsup.config.ts +0 -40
- package/types.manifests.d.ts +0 -22
- /package/dist/node/utils/{formatZodError.js → format-zod-error.js} +0 -0
- /package/dist/node/utils/{getRepoInfo.js → get-repo-info.js} +0 -0
- /package/dist/node/utils/{highlightCode.js → highlight-code.js} +0 -0
- /package/dist/node/utils/{export-extractor.js → ts-export-extractor.js} +0 -0
package/dist/node/cli/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "2.0.0-beta.
|
|
1
|
+
export const VERSION = "2.0.0-beta.200";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Project } from "../project/project.js";
|
|
2
|
+
import { StatefulLog } from "../utils/stateful-log.js";
|
|
3
|
+
type Options = {
|
|
4
|
+
project: Project;
|
|
5
|
+
console: StatefulLog<any>;
|
|
6
|
+
};
|
|
7
|
+
export declare function buildVinxi(opts: Options): Promise<void>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=build-vinxi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-vinxi.d.ts","sourceRoot":"","sources":["../../../src/node/compiler/build-vinxi.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAItD,KAAK,OAAO,GAAG;IACb,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;CAC1B,CAAA;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,OAAO,iBAwC7C"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { code } from "ts-poet";
|
|
2
|
+
import { createVinxiApp } from "./vinxi-app.js";
|
|
3
|
+
import { createVinxiCodegen } from "./vinxi-codegen.js";
|
|
4
|
+
export async function buildVinxi(opts) {
|
|
5
|
+
const { project, console } = opts;
|
|
6
|
+
const preset = process.env.TARGET ??
|
|
7
|
+
process.env.PRESET ??
|
|
8
|
+
process.env.SERVER_PRESET ??
|
|
9
|
+
process.env.SERVER_TARGET ??
|
|
10
|
+
process.env.NITRO_PRESET ??
|
|
11
|
+
process.env.NITRO_TARGET ??
|
|
12
|
+
(process.env.VERCEL ? "vercel" : undefined) ??
|
|
13
|
+
(process.versions.bun !== undefined ? "bun" : "node-server");
|
|
14
|
+
const appConf = {
|
|
15
|
+
mode: "production",
|
|
16
|
+
origin: project.origin,
|
|
17
|
+
publicUrl: project.publicUrl,
|
|
18
|
+
rootDir: project.rootDir,
|
|
19
|
+
rpcBases: (await project.serverRoutes.get()).bases,
|
|
20
|
+
preset,
|
|
21
|
+
config: project.config,
|
|
22
|
+
};
|
|
23
|
+
const codegen = createVinxiCodegen({
|
|
24
|
+
mode: "production",
|
|
25
|
+
project: project,
|
|
26
|
+
serverless: true,
|
|
27
|
+
});
|
|
28
|
+
codegen.registerFile({
|
|
29
|
+
name: "../../app.config.mjs",
|
|
30
|
+
generate: code /* ts */ `
|
|
31
|
+
import { createVinxiApp } from 'eddev/_internal/create-vinxi-app.js'
|
|
32
|
+
export default createVinxiApp(${JSON.stringify(appConf)})
|
|
33
|
+
`,
|
|
34
|
+
});
|
|
35
|
+
await codegen.runAndWatch();
|
|
36
|
+
const app = createVinxiApp(appConf);
|
|
37
|
+
await app.build();
|
|
38
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Project } from "../project/project.js";
|
|
2
|
-
export declare const adminLog: import("../utils/
|
|
2
|
+
export declare const adminLog: import("../utils/stateful-log.js").StatefulLog<unknown>;
|
|
3
3
|
type Options = {
|
|
4
4
|
mode: "development" | "production";
|
|
5
5
|
watch?: boolean;
|
|
@@ -8,6 +8,7 @@ export declare class AdminBundler {
|
|
|
8
8
|
project: Project;
|
|
9
9
|
opts: Options;
|
|
10
10
|
constructor(project: Project, opts: Options);
|
|
11
|
-
|
|
11
|
+
start(): Promise<void>;
|
|
12
12
|
}
|
|
13
13
|
export {};
|
|
14
|
+
//# sourceMappingURL=bundler.admin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundler.admin.d.ts","sourceRoot":"","sources":["../../../src/node/compiler/bundler.admin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAO/C,eAAO,MAAM,QAAQ,yDAAU,CAAA;AAE/B,KAAK,OAAO,GAAG;IACb,IAAI,EAAE,aAAa,GAAG,YAAY,CAAA;IAClC,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,qBAAa,YAAY;IAEd,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,OAAO;gBADb,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,OAAO;IAGhB,KAAK;CA+BZ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { relative } from "path";
|
|
2
2
|
import { build, defineConfig, mergeConfig } from "vite";
|
|
3
|
-
import { createConsole } from "../utils/
|
|
4
|
-
import { getViteConfig } from "./
|
|
3
|
+
import { createConsole } from "../utils/stateful-log.js";
|
|
4
|
+
import { getViteConfig } from "./get-vite-config.js";
|
|
5
5
|
const console = createConsole("Admin Bundle", "admin");
|
|
6
6
|
export const adminLog = console;
|
|
7
7
|
export class AdminBundler {
|
|
@@ -10,18 +10,18 @@ export class AdminBundler {
|
|
|
10
10
|
constructor(project, opts) {
|
|
11
11
|
this.project = project;
|
|
12
12
|
this.opts = opts;
|
|
13
|
-
this.start();
|
|
14
13
|
}
|
|
15
14
|
async start() {
|
|
16
15
|
console.info(`Creating ${this.opts.mode} WordPress admin build...`);
|
|
17
16
|
const baseConfig = getViteConfig({
|
|
18
17
|
console,
|
|
19
18
|
mode: this.opts.mode,
|
|
20
|
-
|
|
19
|
+
publicUrl: this.project.publicUrl,
|
|
21
20
|
rootDir: this.project.rootDir,
|
|
22
21
|
outDir: relative(this.project.rootDir, "./dist/cms/"),
|
|
23
22
|
serverless: false,
|
|
24
23
|
target: "cms",
|
|
24
|
+
client: true,
|
|
25
25
|
});
|
|
26
26
|
console.verbose("Vite config:", baseConfig);
|
|
27
27
|
await build(mergeConfig(baseConfig, defineConfig({
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Project } from "../project/project.js";
|
|
2
|
-
export declare const frontendLog: import("../utils/
|
|
2
|
+
export declare const frontendLog: import("../utils/stateful-log.js").StatefulLog<unknown>;
|
|
3
3
|
type Options = {
|
|
4
4
|
mode: "development" | "production";
|
|
5
5
|
watch?: boolean;
|
|
6
|
+
bundleAnalysis?: boolean;
|
|
6
7
|
};
|
|
7
8
|
export declare class FrontendBundler {
|
|
8
9
|
project: Project;
|
|
@@ -11,3 +12,4 @@ export declare class FrontendBundler {
|
|
|
11
12
|
start(): Promise<void>;
|
|
12
13
|
}
|
|
13
14
|
export {};
|
|
15
|
+
//# sourceMappingURL=bundler.frontend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundler.frontend.d.ts","sourceRoot":"","sources":["../../../src/node/compiler/bundler.frontend.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAQ/C,eAAO,MAAM,WAAW,yDAAU,CAAA;AAElC,KAAK,OAAO,GAAG;IACb,IAAI,EAAE,aAAa,GAAG,YAAY,CAAA;IAClC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,CAAA;AAED,qBAAa,eAAe;IAEjB,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,OAAO;gBADb,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,OAAO;IAGhB,KAAK;CAwCZ"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { relative } from "path";
|
|
2
2
|
import { build, defineConfig, mergeConfig } from "vite";
|
|
3
|
-
import { createConsole } from "../utils/
|
|
4
|
-
import { getViteConfig } from "./
|
|
3
|
+
import { createConsole } from "../utils/stateful-log.js";
|
|
4
|
+
import { getViteConfig } from "./get-vite-config.js";
|
|
5
|
+
import rollupVisualizer from "rollup-plugin-visualizer";
|
|
5
6
|
const console = createConsole("Frontend Bundler", "spa");
|
|
6
7
|
export const frontendLog = console;
|
|
7
8
|
export class FrontendBundler {
|
|
@@ -10,21 +11,10 @@ export class FrontendBundler {
|
|
|
10
11
|
constructor(project, opts) {
|
|
11
12
|
this.project = project;
|
|
12
13
|
this.opts = opts;
|
|
13
|
-
this.start();
|
|
14
14
|
}
|
|
15
15
|
async start() {
|
|
16
16
|
console.info(`Creating ${this.opts.mode} SPA build...`);
|
|
17
|
-
const
|
|
18
|
-
console,
|
|
19
|
-
mode: this.opts.mode,
|
|
20
|
-
project: this.project,
|
|
21
|
-
rootDir: this.project.rootDir,
|
|
22
|
-
outDir: relative(this.project.rootDir, "./dist/frontend/"),
|
|
23
|
-
serverless: false,
|
|
24
|
-
target: "frontend",
|
|
25
|
-
});
|
|
26
|
-
console.verbose("Vite config:", baseConfig);
|
|
27
|
-
await build(mergeConfig(baseConfig, defineConfig({
|
|
17
|
+
const config = {
|
|
28
18
|
build: {
|
|
29
19
|
watch: this.opts.watch
|
|
30
20
|
? {
|
|
@@ -32,6 +22,30 @@ export class FrontendBundler {
|
|
|
32
22
|
}
|
|
33
23
|
: undefined,
|
|
34
24
|
},
|
|
35
|
-
}
|
|
25
|
+
};
|
|
26
|
+
let outDir = relative(this.project.rootDir, "./dist/frontend/");
|
|
27
|
+
if (this.opts.bundleAnalysis) {
|
|
28
|
+
outDir = relative(this.project.rootDir, "./dist/frontend-analysis/");
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
const visualizer = rollupVisualizer.default;
|
|
31
|
+
config.plugins = [
|
|
32
|
+
visualizer({
|
|
33
|
+
emitFile: true,
|
|
34
|
+
filename: "stats.html",
|
|
35
|
+
template: "sunburst",
|
|
36
|
+
}),
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
const baseConfig = getViteConfig({
|
|
40
|
+
console,
|
|
41
|
+
mode: this.opts.mode,
|
|
42
|
+
publicUrl: this.project.publicUrl,
|
|
43
|
+
rootDir: this.project.rootDir,
|
|
44
|
+
outDir: outDir,
|
|
45
|
+
serverless: false,
|
|
46
|
+
target: "frontend",
|
|
47
|
+
client: true,
|
|
48
|
+
});
|
|
49
|
+
await build(mergeConfig(baseConfig, defineConfig(config)));
|
|
36
50
|
}
|
|
37
51
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Project } from "../project/project.js";
|
|
2
|
+
export type ServerlessDevStatus = {
|
|
3
|
+
serverlessUrl: string;
|
|
4
|
+
wordpressUrl: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const serverlessLog: import("../utils/stateful-log.js").StatefulLog<ServerlessDevStatus>;
|
|
7
|
+
type Options = {};
|
|
8
|
+
export declare class DevServer {
|
|
9
|
+
project: Project;
|
|
10
|
+
opts: Options;
|
|
11
|
+
origin: string;
|
|
12
|
+
hostname: string;
|
|
13
|
+
hostOrigin: string;
|
|
14
|
+
port: number;
|
|
15
|
+
constructor(project: Project, opts: Options);
|
|
16
|
+
start(): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=dev-server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-server.d.ts","sourceRoot":"","sources":["../../../src/node/compiler/dev-server.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAO/C,MAAM,MAAM,mBAAmB,GAAG;IAChC,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAID,eAAO,MAAM,aAAa,qEAAU,CAAA;AAEpC,KAAK,OAAO,GAAG,EAAE,CAAA;AAEjB,qBAAa,SAAS;IAOX,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,OAAO;IAPtB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,SAAO;gBAGF,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,OAAO;IAUhB,KAAK;CAmGZ"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { parseURL } from "ufo";
|
|
2
|
+
import { createDevServer } from "vinxi/dev-server";
|
|
3
|
+
import { ProjectEnvUtils } from "../project/env.js";
|
|
4
|
+
import { ensureSelfSignedCert, isCertificateTrusted } from "../utils/self-signed-cert.js";
|
|
5
|
+
import { createConsole } from "../utils/stateful-log.js";
|
|
6
|
+
import { createVinxiApp } from "./vinxi-app.js";
|
|
7
|
+
import { createVinxiCodegen } from "./vinxi-codegen.js";
|
|
8
|
+
import chalk from "chalk";
|
|
9
|
+
const console = createConsole("Dev Server", "dev");
|
|
10
|
+
export const serverlessLog = console;
|
|
11
|
+
export class DevServer {
|
|
12
|
+
project;
|
|
13
|
+
opts;
|
|
14
|
+
origin;
|
|
15
|
+
hostname;
|
|
16
|
+
hostOrigin;
|
|
17
|
+
port = 8080;
|
|
18
|
+
constructor(project, opts) {
|
|
19
|
+
this.project = project;
|
|
20
|
+
this.opts = opts;
|
|
21
|
+
this.start();
|
|
22
|
+
this.origin = ProjectEnvUtils.get("SITE_URL");
|
|
23
|
+
const parsedSiteURL = parseURL(this.origin);
|
|
24
|
+
this.hostname = parsedSiteURL.host?.endsWith(".local") ? parsedSiteURL.host : "localhost";
|
|
25
|
+
this.hostOrigin = "https://" + this.hostname + ":" + this.port;
|
|
26
|
+
}
|
|
27
|
+
async start() {
|
|
28
|
+
console.setWorking(true);
|
|
29
|
+
// console.log("Setting up vinxi codegen")
|
|
30
|
+
const codegen = createVinxiCodegen({
|
|
31
|
+
mode: "development",
|
|
32
|
+
project: this.project,
|
|
33
|
+
serverless: true,
|
|
34
|
+
});
|
|
35
|
+
await codegen.runAndWatch();
|
|
36
|
+
// console.log("Has run once")
|
|
37
|
+
const app = createVinxiApp({
|
|
38
|
+
mode: "development",
|
|
39
|
+
origin: this.origin,
|
|
40
|
+
publicUrl: this.project.publicUrl,
|
|
41
|
+
rootDir: this.project.rootDir,
|
|
42
|
+
log: console,
|
|
43
|
+
rpcBases: (await this.project.serverRoutes.get()).bases,
|
|
44
|
+
config: this.project.config,
|
|
45
|
+
});
|
|
46
|
+
const preset = process.env.TARGET ??
|
|
47
|
+
process.env.PRESET ??
|
|
48
|
+
process.env.SERVER_PRESET ??
|
|
49
|
+
process.env.SERVER_TARGET ??
|
|
50
|
+
process.env.NITRO_PRESET ??
|
|
51
|
+
process.env.NITRO_TARGET ??
|
|
52
|
+
(process.versions.bun !== undefined ? "bun" : "node-server");
|
|
53
|
+
const keys = await ensureSelfSignedCert(this.hostname, this.project.rootDir);
|
|
54
|
+
const httpsConfig = {
|
|
55
|
+
cert: keys.certFile,
|
|
56
|
+
key: keys.keyFile,
|
|
57
|
+
domains: [this.hostname, "localhost"],
|
|
58
|
+
};
|
|
59
|
+
isCertificateTrusted(keys.certFile).then((trusted) => {
|
|
60
|
+
if (!trusted) {
|
|
61
|
+
serverlessLog.warn(`The certificate for ${chalk.bold(this.hostname)} is not trusted.`);
|
|
62
|
+
serverlessLog.info(`- Please open Keychain\n- Search for ${chalk.bold(this.hostname)}\n- Double-click each entry\n- Select 'Always Trust'`);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
let devApp = null;
|
|
66
|
+
app.hooks.addHooks({
|
|
67
|
+
"app:dev:start": async ({ app, serveConfig }) => {
|
|
68
|
+
serveConfig.https = httpsConfig;
|
|
69
|
+
serveConfig.hostname = this.hostname;
|
|
70
|
+
serveConfig.allowedHosts = true;
|
|
71
|
+
},
|
|
72
|
+
"app:dev:server:created": async (args) => {
|
|
73
|
+
devApp = args.devApp;
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
// console.log("Creating dev server")
|
|
77
|
+
await createDevServer(app, {
|
|
78
|
+
force: false,
|
|
79
|
+
devtools: false,
|
|
80
|
+
// @ts-ignore
|
|
81
|
+
hostname: this.hostname,
|
|
82
|
+
port: this.port,
|
|
83
|
+
// @ts-ignore
|
|
84
|
+
preset: preset,
|
|
85
|
+
https: httpsConfig,
|
|
86
|
+
});
|
|
87
|
+
// console.log("Rnning listen hook")
|
|
88
|
+
// @ts-ignore
|
|
89
|
+
await app.hooks.callHook("app:dev:server:listener:creating", {
|
|
90
|
+
app,
|
|
91
|
+
devApp,
|
|
92
|
+
});
|
|
93
|
+
// console.log("Creating another listener")
|
|
94
|
+
const listener = await devApp.listen(this.port, {
|
|
95
|
+
hostname: this.hostname,
|
|
96
|
+
port: this.port,
|
|
97
|
+
https: httpsConfig,
|
|
98
|
+
qr: false,
|
|
99
|
+
showURL: false,
|
|
100
|
+
});
|
|
101
|
+
await app.hooks.callHook("app:dev:server:listener:created", {
|
|
102
|
+
app,
|
|
103
|
+
devApp,
|
|
104
|
+
listener,
|
|
105
|
+
});
|
|
106
|
+
// console.log("Listening")
|
|
107
|
+
console.setWorking(false);
|
|
108
|
+
console.setState({
|
|
109
|
+
serverlessUrl: this.hostOrigin,
|
|
110
|
+
wordpressUrl: this.origin,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { InlineConfig, PluginOption } from "vite";
|
|
2
|
+
import { StatefulLog } from "../utils/stateful-log.js";
|
|
3
|
+
export type Args = {
|
|
4
|
+
mode: "development" | "production";
|
|
5
|
+
serverless: boolean;
|
|
6
|
+
target: "frontend" | "cms";
|
|
7
|
+
rootDir: string;
|
|
8
|
+
outDir?: string;
|
|
9
|
+
publicUrl: string;
|
|
10
|
+
console: StatefulLog<any>;
|
|
11
|
+
client: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare function envPlugin(args: Args): PluginOption;
|
|
14
|
+
type ReactPluginArgs = {
|
|
15
|
+
retainBlockMeta?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare function reactPlugin(args?: ReactPluginArgs): PluginOption[];
|
|
18
|
+
/**
|
|
19
|
+
* Turns on SSR module proxying,
|
|
20
|
+
*/
|
|
21
|
+
export declare function ssrPlugin(): PluginOption;
|
|
22
|
+
export declare function corePlugins(args: Args): PluginOption[];
|
|
23
|
+
export declare function storybookVitePlugins(args: Args): PluginOption[];
|
|
24
|
+
export declare function ignoreRollupErrorsPlugin(): PluginOption;
|
|
25
|
+
export declare function loggerPlugin(args: {
|
|
26
|
+
console: StatefulLog<any>;
|
|
27
|
+
}): PluginOption;
|
|
28
|
+
export declare function getViteConfig(args: Args): InlineConfig;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=get-vite-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-vite-config.d.ts","sourceRoot":"","sources":["../../../src/node/compiler/get-vite-config.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgB,YAAY,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAG/D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAEtD,MAAM,MAAM,IAAI,GAAG;IACjB,IAAI,EAAE,aAAa,GAAG,YAAY,CAAA;IAClC,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,EAAE,UAAU,GAAG,KAAK,CAAA;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;IACzB,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,CAkDlD;AAED,KAAK,eAAe,GAAG;IACrB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,wBAAgB,WAAW,CAAC,IAAI,GAAE,eAAoB,kBA4FrD;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,YAAY,CA4CxC;AAwBD,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,EAAE,CAStD;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,EAAE,CAE/D;AAED,wBAAgB,wBAAwB,IAAI,YAAY,CA8BvD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;CAAE,GAAG,YAAY,CA4B9E;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,CA8DtD"}
|