diff --git a/test/app/(payload)/admin/[[...segments]]/not-found.tsx b/app/(payload)/admin/[[...segments]]/not-found.tsx similarity index 84% rename from test/app/(payload)/admin/[[...segments]]/not-found.tsx rename to app/(payload)/admin/[[...segments]]/not-found.tsx index 6229ae574c..01e12371fb 100644 --- a/test/app/(payload)/admin/[[...segments]]/not-found.tsx +++ b/app/(payload)/admin/[[...segments]]/not-found.tsx @@ -1,7 +1,7 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ import config from '@payload-config' /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import { NotFoundView } from '@payloadcms/next/views' +import { NotFoundView } from '@payloadcms/next/views/NotFound/index.js' type Args = { params: { diff --git a/test/app/(payload)/admin/[[...segments]]/page.tsx b/app/(payload)/admin/[[...segments]]/page.tsx similarity index 96% rename from test/app/(payload)/admin/[[...segments]]/page.tsx rename to app/(payload)/admin/[[...segments]]/page.tsx index 61be15c883..ee9bd415c3 100644 --- a/test/app/(payload)/admin/[[...segments]]/page.tsx +++ b/app/(payload)/admin/[[...segments]]/page.tsx @@ -3,7 +3,7 @@ import type { Metadata } from 'next' import config from '@payload-config' /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import { RootPage, generatePageMetadata } from '@payloadcms/next/views' +import { RootPage, generatePageMetadata } from '@payloadcms/next/views/Root/index.js' type Args = { params: { diff --git a/test/app/(payload)/api/[...slug]/route.ts b/app/(payload)/api/[...slug]/route.ts similarity index 92% rename from test/app/(payload)/api/[...slug]/route.ts rename to app/(payload)/api/[...slug]/route.ts index 282e1ad32f..eacae29614 100644 --- a/test/app/(payload)/api/[...slug]/route.ts +++ b/app/(payload)/api/[...slug]/route.ts @@ -1,7 +1,7 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ /* DO NOT MODIFY it because it could be re-written at any time. */ import config from '@payload-config' -import { REST_DELETE, REST_GET, REST_PATCH, REST_POST } from '@payloadcms/next/routes' +import { REST_DELETE, REST_GET, REST_PATCH, REST_POST } from '@payloadcms/next/routes/index.js' export const GET = REST_GET(config) export const POST = REST_POST(config) diff --git a/test/app/(payload)/api/graphql-playground/route.ts b/app/(payload)/api/graphql-playground/route.ts similarity index 74% rename from test/app/(payload)/api/graphql-playground/route.ts rename to app/(payload)/api/graphql-playground/route.ts index 7b7f279983..7832c8ba92 100644 --- a/test/app/(payload)/api/graphql-playground/route.ts +++ b/app/(payload)/api/graphql-playground/route.ts @@ -1,6 +1,6 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ /* DO NOT MODIFY it because it could be re-written at any time. */ import config from '@payload-config' -import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' +import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes/index.js' export const GET = GRAPHQL_PLAYGROUND_GET(config) diff --git a/test/app/(payload)/api/graphql/route.ts b/app/(payload)/api/graphql/route.ts similarity index 75% rename from test/app/(payload)/api/graphql/route.ts rename to app/(payload)/api/graphql/route.ts index c2723e439f..4caee1b7cb 100644 --- a/test/app/(payload)/api/graphql/route.ts +++ b/app/(payload)/api/graphql/route.ts @@ -1,6 +1,6 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ /* DO NOT MODIFY it because it could be re-written at any time. */ import config from '@payload-config' -import { GRAPHQL_POST } from '@payloadcms/next/routes' +import { GRAPHQL_POST } from '@payloadcms/next/routes/index.js' export const POST = GRAPHQL_POST(config) diff --git a/test/app/(payload)/custom.scss b/app/(payload)/custom.scss similarity index 100% rename from test/app/(payload)/custom.scss rename to app/(payload)/custom.scss diff --git a/test/app/(payload)/layout.tsx b/app/(payload)/layout.tsx similarity index 84% rename from test/app/(payload)/layout.tsx rename to app/(payload)/layout.tsx index 78db7265e1..88fedb4042 100644 --- a/test/app/(payload)/layout.tsx +++ b/app/(payload)/layout.tsx @@ -1,6 +1,6 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ import configPromise from '@payload-config' -import { RootLayout } from '@payloadcms/next/layouts' +import { RootLayout } from '@payloadcms/next/layouts/Root/index.js' /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' diff --git a/test/app/live-preview/(pages)/[slug]/page.client.tsx b/app/live-preview/(pages)/[slug]/page.client.tsx similarity index 100% rename from test/app/live-preview/(pages)/[slug]/page.client.tsx rename to app/live-preview/(pages)/[slug]/page.client.tsx diff --git a/test/app/live-preview/(pages)/[slug]/page.tsx b/app/live-preview/(pages)/[slug]/page.tsx similarity index 100% rename from test/app/live-preview/(pages)/[slug]/page.tsx rename to app/live-preview/(pages)/[slug]/page.tsx diff --git a/test/app/live-preview/(pages)/posts/[slug]/page.client.tsx b/app/live-preview/(pages)/posts/[slug]/page.client.tsx similarity index 100% rename from test/app/live-preview/(pages)/posts/[slug]/page.client.tsx rename to app/live-preview/(pages)/posts/[slug]/page.client.tsx diff --git a/test/app/live-preview/(pages)/posts/[slug]/page.tsx b/app/live-preview/(pages)/posts/[slug]/page.tsx similarity index 100% rename from test/app/live-preview/(pages)/posts/[slug]/page.tsx rename to app/live-preview/(pages)/posts/[slug]/page.tsx diff --git a/test/app/live-preview/_api/fetchDoc.ts b/app/live-preview/_api/fetchDoc.ts similarity index 100% rename from test/app/live-preview/_api/fetchDoc.ts rename to app/live-preview/_api/fetchDoc.ts diff --git a/test/app/live-preview/_api/fetchDocs.ts b/app/live-preview/_api/fetchDocs.ts similarity index 100% rename from test/app/live-preview/_api/fetchDocs.ts rename to app/live-preview/_api/fetchDocs.ts diff --git a/test/app/live-preview/_api/fetchFooter.ts b/app/live-preview/_api/fetchFooter.ts similarity index 100% rename from test/app/live-preview/_api/fetchFooter.ts rename to app/live-preview/_api/fetchFooter.ts diff --git a/test/app/live-preview/_api/fetchHeader.ts b/app/live-preview/_api/fetchHeader.ts similarity index 100% rename from test/app/live-preview/_api/fetchHeader.ts rename to app/live-preview/_api/fetchHeader.ts diff --git a/test/app/live-preview/_api/serverURL.ts b/app/live-preview/_api/serverURL.ts similarity index 100% rename from test/app/live-preview/_api/serverURL.ts rename to app/live-preview/_api/serverURL.ts diff --git a/test/app/live-preview/_blocks/ArchiveBlock/index.module.scss b/app/live-preview/_blocks/ArchiveBlock/index.module.scss similarity index 100% rename from test/app/live-preview/_blocks/ArchiveBlock/index.module.scss rename to app/live-preview/_blocks/ArchiveBlock/index.module.scss diff --git a/test/app/live-preview/_blocks/ArchiveBlock/index.tsx b/app/live-preview/_blocks/ArchiveBlock/index.tsx similarity index 100% rename from test/app/live-preview/_blocks/ArchiveBlock/index.tsx rename to app/live-preview/_blocks/ArchiveBlock/index.tsx diff --git a/test/app/live-preview/_blocks/ArchiveBlock/types.ts b/app/live-preview/_blocks/ArchiveBlock/types.ts similarity index 100% rename from test/app/live-preview/_blocks/ArchiveBlock/types.ts rename to app/live-preview/_blocks/ArchiveBlock/types.ts diff --git a/test/app/live-preview/_blocks/CallToAction/index.module.scss b/app/live-preview/_blocks/CallToAction/index.module.scss similarity index 100% rename from test/app/live-preview/_blocks/CallToAction/index.module.scss rename to app/live-preview/_blocks/CallToAction/index.module.scss diff --git a/test/app/live-preview/_blocks/CallToAction/index.tsx b/app/live-preview/_blocks/CallToAction/index.tsx similarity index 100% rename from test/app/live-preview/_blocks/CallToAction/index.tsx rename to app/live-preview/_blocks/CallToAction/index.tsx diff --git a/test/app/live-preview/_blocks/Content/index.module.scss b/app/live-preview/_blocks/Content/index.module.scss similarity index 100% rename from test/app/live-preview/_blocks/Content/index.module.scss rename to app/live-preview/_blocks/Content/index.module.scss diff --git a/test/app/live-preview/_blocks/Content/index.tsx b/app/live-preview/_blocks/Content/index.tsx similarity index 100% rename from test/app/live-preview/_blocks/Content/index.tsx rename to app/live-preview/_blocks/Content/index.tsx diff --git a/test/app/live-preview/_blocks/MediaBlock/index.module.scss b/app/live-preview/_blocks/MediaBlock/index.module.scss similarity index 100% rename from test/app/live-preview/_blocks/MediaBlock/index.module.scss rename to app/live-preview/_blocks/MediaBlock/index.module.scss diff --git a/test/app/live-preview/_blocks/MediaBlock/index.tsx b/app/live-preview/_blocks/MediaBlock/index.tsx similarity index 100% rename from test/app/live-preview/_blocks/MediaBlock/index.tsx rename to app/live-preview/_blocks/MediaBlock/index.tsx diff --git a/test/app/live-preview/_blocks/RelatedPosts/index.module.scss b/app/live-preview/_blocks/RelatedPosts/index.module.scss similarity index 100% rename from test/app/live-preview/_blocks/RelatedPosts/index.module.scss rename to app/live-preview/_blocks/RelatedPosts/index.module.scss diff --git a/test/app/live-preview/_blocks/RelatedPosts/index.tsx b/app/live-preview/_blocks/RelatedPosts/index.tsx similarity index 100% rename from test/app/live-preview/_blocks/RelatedPosts/index.tsx rename to app/live-preview/_blocks/RelatedPosts/index.tsx diff --git a/test/app/live-preview/_blocks/Relationships/index.module.scss b/app/live-preview/_blocks/Relationships/index.module.scss similarity index 100% rename from test/app/live-preview/_blocks/Relationships/index.module.scss rename to app/live-preview/_blocks/Relationships/index.module.scss diff --git a/test/app/live-preview/_blocks/Relationships/index.tsx b/app/live-preview/_blocks/Relationships/index.tsx similarity index 100% rename from test/app/live-preview/_blocks/Relationships/index.tsx rename to app/live-preview/_blocks/Relationships/index.tsx diff --git a/test/app/live-preview/_components/BackgroundColor/index.module.scss b/app/live-preview/_components/BackgroundColor/index.module.scss similarity index 100% rename from test/app/live-preview/_components/BackgroundColor/index.module.scss rename to app/live-preview/_components/BackgroundColor/index.module.scss diff --git a/test/app/live-preview/_components/BackgroundColor/index.tsx b/app/live-preview/_components/BackgroundColor/index.tsx similarity index 100% rename from test/app/live-preview/_components/BackgroundColor/index.tsx rename to app/live-preview/_components/BackgroundColor/index.tsx diff --git a/test/app/live-preview/_components/Blocks/index.tsx b/app/live-preview/_components/Blocks/index.tsx similarity index 100% rename from test/app/live-preview/_components/Blocks/index.tsx rename to app/live-preview/_components/Blocks/index.tsx diff --git a/test/app/live-preview/_components/Button/index.module.scss b/app/live-preview/_components/Button/index.module.scss similarity index 100% rename from test/app/live-preview/_components/Button/index.module.scss rename to app/live-preview/_components/Button/index.module.scss diff --git a/test/app/live-preview/_components/Button/index.tsx b/app/live-preview/_components/Button/index.tsx similarity index 100% rename from test/app/live-preview/_components/Button/index.tsx rename to app/live-preview/_components/Button/index.tsx diff --git a/test/app/live-preview/_components/Card/index.module.scss b/app/live-preview/_components/Card/index.module.scss similarity index 100% rename from test/app/live-preview/_components/Card/index.module.scss rename to app/live-preview/_components/Card/index.module.scss diff --git a/test/app/live-preview/_components/Card/index.tsx b/app/live-preview/_components/Card/index.tsx similarity index 100% rename from test/app/live-preview/_components/Card/index.tsx rename to app/live-preview/_components/Card/index.tsx diff --git a/test/app/live-preview/_components/Chevron/index.tsx b/app/live-preview/_components/Chevron/index.tsx similarity index 100% rename from test/app/live-preview/_components/Chevron/index.tsx rename to app/live-preview/_components/Chevron/index.tsx diff --git a/test/app/live-preview/_components/CollectionArchive/PopulateByCollection/index.module.scss b/app/live-preview/_components/CollectionArchive/PopulateByCollection/index.module.scss similarity index 100% rename from test/app/live-preview/_components/CollectionArchive/PopulateByCollection/index.module.scss rename to app/live-preview/_components/CollectionArchive/PopulateByCollection/index.module.scss diff --git a/test/app/live-preview/_components/CollectionArchive/PopulateByCollection/index.tsx b/app/live-preview/_components/CollectionArchive/PopulateByCollection/index.tsx similarity index 100% rename from test/app/live-preview/_components/CollectionArchive/PopulateByCollection/index.tsx rename to app/live-preview/_components/CollectionArchive/PopulateByCollection/index.tsx diff --git a/test/app/live-preview/_components/CollectionArchive/PopulateBySelection/index.module.scss b/app/live-preview/_components/CollectionArchive/PopulateBySelection/index.module.scss similarity index 100% rename from test/app/live-preview/_components/CollectionArchive/PopulateBySelection/index.module.scss rename to app/live-preview/_components/CollectionArchive/PopulateBySelection/index.module.scss diff --git a/test/app/live-preview/_components/CollectionArchive/PopulateBySelection/index.tsx b/app/live-preview/_components/CollectionArchive/PopulateBySelection/index.tsx similarity index 100% rename from test/app/live-preview/_components/CollectionArchive/PopulateBySelection/index.tsx rename to app/live-preview/_components/CollectionArchive/PopulateBySelection/index.tsx diff --git a/test/app/live-preview/_components/CollectionArchive/index.tsx b/app/live-preview/_components/CollectionArchive/index.tsx similarity index 100% rename from test/app/live-preview/_components/CollectionArchive/index.tsx rename to app/live-preview/_components/CollectionArchive/index.tsx diff --git a/test/app/live-preview/_components/Footer/index.module.scss b/app/live-preview/_components/Footer/index.module.scss similarity index 100% rename from test/app/live-preview/_components/Footer/index.module.scss rename to app/live-preview/_components/Footer/index.module.scss diff --git a/test/app/live-preview/_components/Footer/index.tsx b/app/live-preview/_components/Footer/index.tsx similarity index 100% rename from test/app/live-preview/_components/Footer/index.tsx rename to app/live-preview/_components/Footer/index.tsx diff --git a/test/app/live-preview/_components/Gutter/index.module.scss b/app/live-preview/_components/Gutter/index.module.scss similarity index 100% rename from test/app/live-preview/_components/Gutter/index.module.scss rename to app/live-preview/_components/Gutter/index.module.scss diff --git a/test/app/live-preview/_components/Gutter/index.tsx b/app/live-preview/_components/Gutter/index.tsx similarity index 100% rename from test/app/live-preview/_components/Gutter/index.tsx rename to app/live-preview/_components/Gutter/index.tsx diff --git a/test/app/live-preview/_components/Header/Nav/index.module.scss b/app/live-preview/_components/Header/Nav/index.module.scss similarity index 100% rename from test/app/live-preview/_components/Header/Nav/index.module.scss rename to app/live-preview/_components/Header/Nav/index.module.scss diff --git a/test/app/live-preview/_components/Header/Nav/index.tsx b/app/live-preview/_components/Header/Nav/index.tsx similarity index 100% rename from test/app/live-preview/_components/Header/Nav/index.tsx rename to app/live-preview/_components/Header/Nav/index.tsx diff --git a/test/app/live-preview/_components/Header/index.module.scss b/app/live-preview/_components/Header/index.module.scss similarity index 100% rename from test/app/live-preview/_components/Header/index.module.scss rename to app/live-preview/_components/Header/index.module.scss diff --git a/test/app/live-preview/_components/Header/index.tsx b/app/live-preview/_components/Header/index.tsx similarity index 100% rename from test/app/live-preview/_components/Header/index.tsx rename to app/live-preview/_components/Header/index.tsx diff --git a/test/app/live-preview/_components/Hero/index.tsx b/app/live-preview/_components/Hero/index.tsx similarity index 100% rename from test/app/live-preview/_components/Hero/index.tsx rename to app/live-preview/_components/Hero/index.tsx diff --git a/test/app/live-preview/_components/Link/index.tsx b/app/live-preview/_components/Link/index.tsx similarity index 100% rename from test/app/live-preview/_components/Link/index.tsx rename to app/live-preview/_components/Link/index.tsx diff --git a/test/app/live-preview/_components/Media/Image/index.module.scss b/app/live-preview/_components/Media/Image/index.module.scss similarity index 100% rename from test/app/live-preview/_components/Media/Image/index.module.scss rename to app/live-preview/_components/Media/Image/index.module.scss diff --git a/test/app/live-preview/_components/Media/Image/index.tsx b/app/live-preview/_components/Media/Image/index.tsx similarity index 100% rename from test/app/live-preview/_components/Media/Image/index.tsx rename to app/live-preview/_components/Media/Image/index.tsx diff --git a/test/app/live-preview/_components/Media/Video/index.module.scss b/app/live-preview/_components/Media/Video/index.module.scss similarity index 100% rename from test/app/live-preview/_components/Media/Video/index.module.scss rename to app/live-preview/_components/Media/Video/index.module.scss diff --git a/test/app/live-preview/_components/Media/Video/index.tsx b/app/live-preview/_components/Media/Video/index.tsx similarity index 100% rename from test/app/live-preview/_components/Media/Video/index.tsx rename to app/live-preview/_components/Media/Video/index.tsx diff --git a/test/app/live-preview/_components/Media/index.tsx b/app/live-preview/_components/Media/index.tsx similarity index 100% rename from test/app/live-preview/_components/Media/index.tsx rename to app/live-preview/_components/Media/index.tsx diff --git a/test/app/live-preview/_components/Media/types.ts b/app/live-preview/_components/Media/types.ts similarity index 100% rename from test/app/live-preview/_components/Media/types.ts rename to app/live-preview/_components/Media/types.ts diff --git a/test/app/live-preview/_components/PageRange/index.module.scss b/app/live-preview/_components/PageRange/index.module.scss similarity index 100% rename from test/app/live-preview/_components/PageRange/index.module.scss rename to app/live-preview/_components/PageRange/index.module.scss diff --git a/test/app/live-preview/_components/PageRange/index.tsx b/app/live-preview/_components/PageRange/index.tsx similarity index 100% rename from test/app/live-preview/_components/PageRange/index.tsx rename to app/live-preview/_components/PageRange/index.tsx diff --git a/test/app/live-preview/_components/Pagination/index.module.scss b/app/live-preview/_components/Pagination/index.module.scss similarity index 100% rename from test/app/live-preview/_components/Pagination/index.module.scss rename to app/live-preview/_components/Pagination/index.module.scss diff --git a/test/app/live-preview/_components/Pagination/index.tsx b/app/live-preview/_components/Pagination/index.tsx similarity index 100% rename from test/app/live-preview/_components/Pagination/index.tsx rename to app/live-preview/_components/Pagination/index.tsx diff --git a/test/app/live-preview/_components/RichText/index.module.scss b/app/live-preview/_components/RichText/index.module.scss similarity index 100% rename from test/app/live-preview/_components/RichText/index.module.scss rename to app/live-preview/_components/RichText/index.module.scss diff --git a/test/app/live-preview/_components/RichText/index.tsx b/app/live-preview/_components/RichText/index.tsx similarity index 100% rename from test/app/live-preview/_components/RichText/index.tsx rename to app/live-preview/_components/RichText/index.tsx diff --git a/test/app/live-preview/_components/RichText/serializeLexical.tsx b/app/live-preview/_components/RichText/serializeLexical.tsx similarity index 100% rename from test/app/live-preview/_components/RichText/serializeLexical.tsx rename to app/live-preview/_components/RichText/serializeLexical.tsx diff --git a/test/app/live-preview/_components/RichText/serializeSlate.tsx b/app/live-preview/_components/RichText/serializeSlate.tsx similarity index 100% rename from test/app/live-preview/_components/RichText/serializeSlate.tsx rename to app/live-preview/_components/RichText/serializeSlate.tsx diff --git a/test/app/live-preview/_components/VerticalPadding/index.module.scss b/app/live-preview/_components/VerticalPadding/index.module.scss similarity index 100% rename from test/app/live-preview/_components/VerticalPadding/index.module.scss rename to app/live-preview/_components/VerticalPadding/index.module.scss diff --git a/test/app/live-preview/_components/VerticalPadding/index.tsx b/app/live-preview/_components/VerticalPadding/index.tsx similarity index 100% rename from test/app/live-preview/_components/VerticalPadding/index.tsx rename to app/live-preview/_components/VerticalPadding/index.tsx diff --git a/test/app/live-preview/_css/app.scss b/app/live-preview/_css/app.scss similarity index 100% rename from test/app/live-preview/_css/app.scss rename to app/live-preview/_css/app.scss diff --git a/test/app/live-preview/_css/colors.scss b/app/live-preview/_css/colors.scss similarity index 100% rename from test/app/live-preview/_css/colors.scss rename to app/live-preview/_css/colors.scss diff --git a/test/app/live-preview/_css/common.scss b/app/live-preview/_css/common.scss similarity index 100% rename from test/app/live-preview/_css/common.scss rename to app/live-preview/_css/common.scss diff --git a/test/app/live-preview/_css/queries.scss b/app/live-preview/_css/queries.scss similarity index 100% rename from test/app/live-preview/_css/queries.scss rename to app/live-preview/_css/queries.scss diff --git a/test/app/live-preview/_css/type.scss b/app/live-preview/_css/type.scss similarity index 100% rename from test/app/live-preview/_css/type.scss rename to app/live-preview/_css/type.scss diff --git a/test/app/live-preview/_heros/HighImpact/index.module.scss b/app/live-preview/_heros/HighImpact/index.module.scss similarity index 100% rename from test/app/live-preview/_heros/HighImpact/index.module.scss rename to app/live-preview/_heros/HighImpact/index.module.scss diff --git a/test/app/live-preview/_heros/HighImpact/index.tsx b/app/live-preview/_heros/HighImpact/index.tsx similarity index 100% rename from test/app/live-preview/_heros/HighImpact/index.tsx rename to app/live-preview/_heros/HighImpact/index.tsx diff --git a/test/app/live-preview/_heros/LowImpact/index.module.scss b/app/live-preview/_heros/LowImpact/index.module.scss similarity index 100% rename from test/app/live-preview/_heros/LowImpact/index.module.scss rename to app/live-preview/_heros/LowImpact/index.module.scss diff --git a/test/app/live-preview/_heros/LowImpact/index.tsx b/app/live-preview/_heros/LowImpact/index.tsx similarity index 100% rename from test/app/live-preview/_heros/LowImpact/index.tsx rename to app/live-preview/_heros/LowImpact/index.tsx diff --git a/test/app/live-preview/_heros/PostHero/index.module.scss b/app/live-preview/_heros/PostHero/index.module.scss similarity index 100% rename from test/app/live-preview/_heros/PostHero/index.module.scss rename to app/live-preview/_heros/PostHero/index.module.scss diff --git a/test/app/live-preview/_heros/PostHero/index.tsx b/app/live-preview/_heros/PostHero/index.tsx similarity index 100% rename from test/app/live-preview/_heros/PostHero/index.tsx rename to app/live-preview/_heros/PostHero/index.tsx diff --git a/test/app/live-preview/_utilities/formatDateTime.ts b/app/live-preview/_utilities/formatDateTime.ts similarity index 100% rename from test/app/live-preview/_utilities/formatDateTime.ts rename to app/live-preview/_utilities/formatDateTime.ts diff --git a/test/app/live-preview/_utilities/toKebabCase.ts b/app/live-preview/_utilities/toKebabCase.ts similarity index 100% rename from test/app/live-preview/_utilities/toKebabCase.ts rename to app/live-preview/_utilities/toKebabCase.ts diff --git a/test/app/live-preview/cssVariables.js b/app/live-preview/cssVariables.js similarity index 100% rename from test/app/live-preview/cssVariables.js rename to app/live-preview/cssVariables.js diff --git a/test/app/live-preview/layout.tsx b/app/live-preview/layout.tsx similarity index 100% rename from test/app/live-preview/layout.tsx rename to app/live-preview/layout.tsx diff --git a/test/app/live-preview/not-found.tsx b/app/live-preview/not-found.tsx similarity index 100% rename from test/app/live-preview/not-found.tsx rename to app/live-preview/not-found.tsx diff --git a/test/app/live-preview/page.tsx b/app/live-preview/page.tsx similarity index 100% rename from test/app/live-preview/page.tsx rename to app/live-preview/page.tsx diff --git a/test/app/my-route/route.ts b/app/my-route/route.ts similarity index 100% rename from test/app/my-route/route.ts rename to app/my-route/route.ts diff --git a/test/dev.js b/test/dev.js index a87b5aaf1d..808b2c5a3f 100644 --- a/test/dev.js +++ b/test/dev.js @@ -24,7 +24,7 @@ process.env.PAYLOAD_DROP_DATABASE = 'true' const { afterTest, beforeTest } = await createTestHooks(testSuiteArg) await beforeTest() -const rootDir = resolve(_dirname, './') +const rootDir = resolve(_dirname, '../') // @ts-expect-error await nextDev({ port: process.env.PORT || 3000, dirname: rootDir }, 'default', rootDir) diff --git a/test/helpers/initPayloadE2E.ts b/test/helpers/initPayloadE2E.ts index 009da727d6..daa2a6af01 100644 --- a/test/helpers/initPayloadE2E.ts +++ b/test/helpers/initPayloadE2E.ts @@ -44,7 +44,7 @@ export async function initPayloadE2E({ config, dirname }: Args): Promise dev: true, hostname: 'localhost', port, - dir: path.resolve(dirname, '../'), + dir: path.resolve(dirname, '../../'), }) const handle = app.getRequestHandler() diff --git a/test/testHooks.js b/test/testHooks.js index 11a52ca730..1629bcf70b 100644 --- a/test/testHooks.js +++ b/test/testHooks.js @@ -8,7 +8,7 @@ const filename = fileURLToPath(import.meta.url) const dirname = path.dirname(filename) export const createTestHooks = async (testSuiteName = '_community') => { - const tsConfigPath = path.resolve(dirname, 'tsconfig.json') + const tsConfigPath = path.resolve(dirname, '../tsconfig.json') const tsConfig = await json5.parse(await readFile(tsConfigPath, 'utf8')) const originalPayloadConfigTsValue = tsConfig.compilerOptions.paths['@payload-config'] ?? './_community/config.ts' @@ -19,13 +19,13 @@ export const createTestHooks = async (testSuiteName = '_community') => { */ beforeTest: async () => { // Delete next webpack cache - const nextWebpackCache = path.resolve(dirname, '.next/cache/webpack') + const nextWebpackCache = path.resolve(dirname, '../.next/cache/webpack') if (existsSync(nextWebpackCache)) { await rm(nextWebpackCache, { recursive: true }) } // Set '@payload-config' in tsconfig.json - tsConfig.compilerOptions.paths['@payload-config'] = [`./${testSuiteName}/config.ts`] + tsConfig.compilerOptions.paths['@payload-config'] = [`./test/${testSuiteName}/config.ts`] await writeFile(tsConfigPath, JSON.stringify(tsConfig, null, 2)) const PAYLOAD_CONFIG_PATH = path.resolve(testSuiteName, 'config') diff --git a/test/tsconfig.json b/test/tsconfig.json index a5468c988e..05c5ff68ca 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "noEmit": true, - "rootDir": ".", /* Specify the root folder within your source files. */ + "rootDir": ".", "declaration": true, "declarationMap": true, "target": "esnext", @@ -33,11 +33,7 @@ "name": "next" } ], - "paths": { - "@payload-config": [ - "./_community/config.ts" - ] - } + "paths": {} }, "exclude": [ "dist", diff --git a/tsconfig.json b/tsconfig.json index d4c65262ac..6ea0e2c750 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -74,6 +74,12 @@ ], "@payloadcms/ui/scss/app.scss": [ "./packages/ui/src/scss/app.scss" + ], + "@payloadcms/next/*": [ + "./packages/next/src/*" + ], + "@payloadcms/next": [ + "./packages/next/src/exports/*" ] } },