From 2ebfd6cd086d793925c855ef30e3bd2964b0a392 Mon Sep 17 00:00:00 2001 From: Dominic Saadi Date: Fri, 26 Jan 2024 11:05:02 +0000 Subject: [PATCH] chore(v7): Revert RSC and SSR changes This commit reverts all the RSC and SSR PRs to date so that v7.0.0 can go out with clean changes. Revert "chore(deps): update dependency @apollo/experimental-nextjs-app-support to v0.5.2 (#9716)" This reverts commit 9d9d373562ac9c09ff5c202fcfb88f9dfd95b995. Revert "fix(apollo): Enhance error differently for Suspense Cells (#9640)" This reverts commit 7870ce4a407191227a7914dd0609bec9785bd48c. Revert "SSR smoke-test: Use (#9763)" This reverts commit 3d1179a8ea508988d850d1a4ed21b356489c2e49. Revert "Use TS 5.3 import attributes (#9591)" This reverts commit cb4aba6bde79c49174a6b7f01a331669df318c08. Revert "chore(RSC): update RSC test projects to latest canary (#9717)" This reverts commit 209add6538a8c589602f068b6c3de1a157749eba. Revert "RSC: Fix the RSA test project fixture (#9704)" This reverts commit f7c7613ffa0e17bd28bb2eed94375aa8cfbedf6f. Revert "chore(CI): add RSC fixtures to detect changes list (#9703)" This reverts commit b7115dd9d72ca48d75b4232fd86c9cbbab3a0ad9. Revert "RSC: Update rsc test project fixtures (#9666)" This reverts commit cc69243545acd22e9540d1e916df86959166c922. Revert "RSC: Use `pages` directory (#9660)" This reverts commit 809e3ffc1eae045a77146010a975ddf08713b1d7. Revert "RSC: Default entry.server and more standard App.tsx (#9655)" This reverts commit 33a3b0b67cd48814b010426f42477f6a7a8d3f4b. Revert "RSC: Use the default entry.client file (#9654)" This reverts commit 3f6e7c159903fb8dd743b1ced55bdce53cf1a8d4. Revert "RSC: No need to patch Vite anymore (#9636)" This reverts commit 2fdb496e70ba963590a9fbedeb32e1047279634b. Revert "RSC: Remove unused code. Improve code organization (#9631)" This reverts commit 49379294ce7b7332619bda886785435b8c08e400. Revert "chore: Linting and disable some console logs (#9635)" This reverts commit b1adcc7ee8dd7a4fc4974bf822945a01a80c5d2c. Revert "RSC: Use Routes.tsx for (client-side) routing (#9630)" This reverts commit e9f5f015b7184a3aba103863330b6813125ab15c. Revert "RSC: Add RW env var definitions to Vite config and include FatalErrorBoundary (#9622)" This reverts commit 69a17708e868cb49a13d88085e36c1dca34e2940. Revert "RSC: Refactor to share buildRouteManifest function with SSR process (#9618)" This reverts commit 00462e511c772fd03226f576816039a8e62f5ea2. Revert "RSC: Fake server-side routing (#9593)" This reverts commit 2c638c38b97da8179f222d4515e83e7378ecb527. Revert "RSC: Include routing in initial RSC example app (#9611)" This reverts commit a7ea8cdc35772234cbc7ac5e3c36446213ebe61a. Revert "fix(deps): update dependency @whatwg-node/server to v0.9.18 (#9602)" This reverts commit 1e1c8d1a37d665ca5fc3c14649907dee1dec73fa. Revert "RSC: Generate a route manifest (#9592)" This reverts commit 99685ee74a2b9b25f0f4cc668746b8f016efa327. Revert "RSC: Refactor build process (#9588)" This reverts commit 1f66831febefd5ab2c650f905eabce8dde43027b. Revert "fix(streaming-ssr): Fixes running the streaming server using rw serve (#9558)" This reverts commit 645956290e519d3e37432741f047569824330d9b. Revert "fix(streaming): Fix css loading on dev server on Windows (#9557)" This reverts commit 205e0f4cbc41d75ba615cbd70b905d035dc066ee. Revert "RSC: Combine RSC server with StreamingSSR server (#9553)" This reverts commit 4afccbcb6e5947c32add1779fd75c2907e497759. Revert "Prerender smoke-test: await helper function (#9546)" This reverts commit fe70a367370d1070321a23a3f62294239830f379. Revert "fix(deps): update dependency isbot to v3.7.1 (#9506)" This reverts commit e330be7f1681cebeb226ad2c624dc575b51ea8e6. Revert "fix(deps): update dependency @whatwg-node/server to v0.9.16 (#9475)" This reverts commit 886e28ab5ecf88055f320c7c12120ea79eabdaad. Revert "chore(deps): update dependency rollup to v3.29.4 (#9464)" This reverts commit c5eca98932564ffc8845eedba52f2e3f9ac004e3. Revert "RSC: Support client-only package and include @tobbe.dev/rsc-test in smoke test (#9367)" This reverts commit e04e48e6933dd54e5133f8fc2c545aae48a1fa64. Revert "RSC: Check for rw-rsc header (#9410)" This reverts commit cb0b035cced7678df7f7e6bf772cc1feabcfd785. Revert "RSC GH action: Move build to after copy (#9413)" This reverts commit 114a2b0260973b7ad252d43f2e14704284ba4ff7. Revert "RSC: Move loaders to worker thread (#9412)" This reverts commit df885749bdf150c3e536f463256e8cf34a987e78. Revert "RSC: smoke tests: install and build after project:copy (#9411)" This reverts commit e2a90f8c3c905a26c788f40c21a54291c36f5c87. Revert "feat(ssr-streaming): Allow building without index.html during streaming-ssr (#9387)" This reverts commit 76e1672c33a9cb5f65d4a21bb9a9d86341655f6f. Revert "chore(ssr): Move LocationProvider inside framework for SSR (#9383)" This reverts commit c4dedc66ced7259516715033c20372072c4cfd2d. Revert "feat(ssr): Collect CSS links during dev (#9382)" This reverts commit 1e42b43b6201fd55e3e41e4d5a070606f2d385ff. Revert "fix(stream-ssr): Move wait for all ready to fix bot rendering (#9389)" This reverts commit bdf885a0848c0aa97be2d7d16fa7bac60ff64f68. Revert "chore(e2e): Setup e2e test for streaming SSR (#9349)" This reverts commit 656a2c86e28a915a8f8552a44c8b79331873f7f7. Revert "RSC: vite externalConditions (#9333)" This reverts commit c8c8a3b1e3c599a610b3856b71078357e70e44be. Revert "RSC: test-project-rsa: Fix TS type error in onSend (#9332)" This reverts commit 45065da262c1a57d67b0013ea7168c0fca687dc6. Revert "RSC: Implement RSC worker (#9331)" This reverts commit 18c5d961f203820facc8a42eebe2d382ed7ff7dd. Revert "RSC: createRscRequestHandler (#9330)" This reverts commit 433d8ef99b0025cf2a5d6faceef303be6089f155. Revert "fix(stream-ssr): Cancel the timeout when the react stream has finished (#9317)" This reverts commit daaa1998837bdb6eaa42d9160292e781fadb3dc8. Revert "fix(ssr-build): Generate document in ssr build too! (#9310)" This reverts commit e2cf25db2518833ad0b833c5e6b5308557ecc7fd. Revert "feat(streaming-ssr): Various bug fixes and migrate to FetchAPI/Web streams (#9295)" This reverts commit 1ed2b5b477a6b08a0d4731160591bebfaaeac34b. Revert "RSC: Smoke test (#9194)" This reverts commit 18555d0e196cfc69ed322e24cafeb2d228773ae1. Revert "RSC: Handle Windows paths in clientEntries (#9233)" This reverts commit 27d33d3e29276d0d5c61d604034d65b4c6ae5f65. Revert "RSC: Check if index.html has already been updated during setup (#9197)" This reverts commit 83d180fc477b17bf33c7673f010b68e9f7d5e0a2. Revert "RSC: Use react/experimental types (#9196)" This reverts commit e2c14ebf9cb4f62d3d5eed63becd4cbf587485a4. Revert "RSC: Patch vite when running setup command (#9192)" This reverts commit a7bab85513ded97c500399daacf3a39de1fc1378. Revert "RSC: Support 'use client' in 3pp packages (#9191)" This reverts commit a436b1cfe82b0ce53baadc0149a5d2831928135b. Revert "RSC: react-18.3.0-canary-bbc8530ed-20230912 (#9164)" This reverts commit 9d63d080a69f1428bb2b961690ecb09eaee64edd. Revert "RSC: Decode RSF args from request (#9157)" This reverts commit 9257e3944fe1f49a3e9bd39a1f076c02134de28c. Revert "RSC: RSF aka Server Actions (#9155)" This reverts commit c46bb67a75c4f78b4cbd5d744f52937a567f0e43. Revert "RSC: Make code and execution easier to follow. Improve error handling. (#9154)" This reverts commit d3475cd7041b20106bf73968a1d59dcae611afcd. Revert "RSC: Work around an issue in Rollup (#9153)" This reverts commit ee334bcf08f760cdfe26c03e7d65dc7da2f76281. Revert "Streaming: meta charSet=utf-8 (#9142)" This reverts commit 050a16925ab9768374e56f20792bbb2a026488bb. Revert "Streaming SSR: Fix RWJS_EXP_SSR_GRAPHQL_ENDPOINT logic (#9134)" This reverts commit ae11f69df494be05d33e558bfea328b751223f43. Revert "RSC: Don't set the react-server condition for client builds (#9132)" This reverts commit 7ee61534f9131657b920f2d95b3d0e8d7a6e4ab2. Revert "Streaming fe server: bind to 0.0.0.0 in prod (#9115)" This reverts commit 0c23f67708b286d1e923e4d93aaba238edf66bb3. Revert "fix(meta): Remove duplicated title and meta attributes (possible edge cases) (#9113)" This reverts commit 8d0ab16aa1c39f1526e4213211608805735f6974. Revert "chore(deps): update dependency @apollo/experimental-nextjs-app-support to v0.4.2 (#9021)" This reverts commit d7560ec9c1b9b7d6feff3f6a952a49793e6ac8f8. Revert "feat(Cell Suspense): Allow Cells to not Suspend (#9106)" This reverts commit 2b8a5558c6d88f37346346c5f9db2cdd0073f83f. Revert "feat(streaming): Make Cells render on the server with useBackgroundQuery and useReadQuery (#9074)" This reverts commit 069101b7ca1115d021a20f4d9b80e9b10107df24. Revert "feat(streaming): Cleanup/Unify streaming dev and prod server (#9047)" This reverts commit c5ba4888a87e5ea0b11ff5d2768d13f47f672eeb. Revert "exp(streaming): Allow SSR with experimental apollo client (#9038)" This reverts commit c89e1364c7e9af541438f3274ddf1f92401dc2c8. Revert "feat(streaming-ssr): Fix build and server html injection (#8978)" This reverts commit 58a242192174e6bd2e72ccd2269f66d02ad7a401. Revert "RSC: Use experimental node loader (#8979)" This reverts commit 2add568286e6cad3ead50c9edc4d7e4a03771825. Revert "RSC: Fix noExternal rule for server build (#8961)" This reverts commit 9ac5ab271776b42c9e4ceed403345fa00d2feb1b. Revert "Refactor cli serve command (#8958)" This reverts commit f24016a8411d025f6918544ea3683e1a84a13f52. Revert "@rwjs/vite: Pin acorn-loose version (#8944)" This reverts commit 6f33914e06f7fb6d0866495bdbadb09fd3d367cb. Revert "RSC: react-server condition. Poisoned imports (#8948)" This reverts commit e9413654f60f3b40c65bf7c759cd0b8be99978ca. Revert "RSC fix typo in example code (#8949)" This reverts commit 3588ec06a9009cf2ffc864370eec7f3130fff9e1. Revert "fix(ssr): Get experimental ssr setup working properly (#8922)" This reverts commit abf229bc166ea05c0f3e6dca1836fa477192e55d. Revert "RSC fix: setup description (#8906)" This reverts commit b11bd72adf2b946a2652525a20e83b1a4a965d46. Revert "RSC: Add css files to the example (#8905)" This reverts commit fcd7c39304b5d587ac1eb7a68c322e977115b030. Revert "RSC build without user config (#8896)" This reverts commit 37692a4d85eb231c3be4b5459408f0d4480d363d. Revert "RSC: Use rw serve (#8897)" This reverts commit 921c9cb3127b10cb050b3b9ae144d326f4a7f20c. Revert "RSC: Build using rw build (#8893)" This reverts commit f1d0dcb81c6149fa0dbd74ed64e5d2c569b4b205. Revert "RSC: Fix experimental setup (#8894)" This reverts commit c44a260751e344e6c1735aa9704b8903f9d7fa81. Revert "RSC: Include entries.ts in paths (#8888)" This reverts commit db271db22e5bd423c3a88d98938c05aeb373b992. Revert "RSC: Initial css support (#8887)" This reverts commit 8610d58e1207779dfe561b96f7625b20d2a8f400. Revert "RSC: Use exported defineEntries() (#8886)" This reverts commit f5fc2e2e696d791536bd14d386efff99fe121ecd. Revert "Include standard vite config in RSC build (#8882)" This reverts commit c1e62c29d1f706edbabee2abbcf96f8dad744373. Revert "Update entry.client and disable vite legacy mode (#8851)" This reverts commit 8917ad6ab5eaea40f6a79b478e28df4b9c43182f. Revert "experimental feature flag for rsc (#8837)" This reverts commit c7a5b138c43e888b49a20ddddfbf3bbc2ab2c00d. Revert "React Server Components (RSC) (#8451)" This reverts commit f22dfbeda624dfb80ce54fde59329f155f29f2e9. Revert "Use "import type" for all types (#8827)" This reverts commit 7a6aea7fed966bcb5deab8b473cf0dfcc36a6547. Revert "React 18.3.0-canary-035a41c4e-20230704 (#8826)" This reverts commit d261819262158179a22d57c7a3c78695c9ef7d0a. Revert "ViteBuildManifest and note about import-attributes (#8818)" This reverts commit 8b85ad6b3f58855a5b5081cdeef679d7d29f9106. Revert "Streaming SSR: Fix build, serve and dev (#8811)" This reverts commit 4c51caec60fb84c54d5580944ff8fcfb30d9229a. Revert "Add files needed for React Streaming SSR (#8810)" This reverts commit 6da5aaebc614f39374f528daaa27d078ec4c02a2. Revert "entry.server and entry.client (#8808)" This reverts commit 7cc5564e3b08715f3ea08a478265ac478ccec49f. Revert "Use existing rw-vite-build bin for SSR as well (#8806)" This reverts commit 8b2a56601e92eab104505ced96f7c30fd442f7e7. Revert "Disable prerender when streamingSsr is enabled (#8775)" This reverts commit e7d53610bcd0b7e207e4e5ae55e211f57270cf2a. Revert "vite utils.ts: fix source format (#8796)" This reverts commit e19107126d5c9a6ad8995aa0235c161b93b10384. Revert "Server Rendering & Streaming (#8561)" This reverts commit 2557bf8d8d338fb752e145c7c5452a1849c7fcc3. Revert "React Streaming and SSR feature flag (#8764)" This reverts commit 565f62000b327df732b7b7040a1419852225a7d9. --- .github/actions/actionsLib.mjs | 71 +-- .github/actions/detect-changes/cases/rsc.mjs | 34 - .github/actions/detect-changes/cases/ssr.mjs | 27 - .../actions/detect-changes/detectChanges.mjs | 2 - .github/actions/set-up-rsa-project/README.md | 29 - .../actions/set-up-rsa-project/action.yaml | 10 - .../actions/set-up-rsa-project/jsconfig.json | 11 - .../actions/set-up-rsa-project/package.json | 6 - .../setUpRsaProjectGitHub.mjs | 22 - .../setUpRsaProjectLocally.mjs | 111 ---- .../README.md | 29 - .../action.yaml | 10 - .../jsconfig.json | 11 - .../package.json | 6 - .../setUpRscExternalPackagesProjectGitHub.mjs | 22 - ...setUpRscExternalPackagesProjectLocally.mjs | 111 ---- .github/actions/set-up-rsc-project/README.md | 32 - .../actions/set-up-rsc-project/action.yaml | 10 - .../actions/set-up-rsc-project/jsconfig.json | 11 - .../actions/set-up-rsc-project/package.json | 6 - .../set-up-rsc-project/setUpRscProject.mjs | 109 ---- .../setUpRscProjectGitHub.mjs | 17 - .../setUpRscProjectLocally.mjs | 117 ---- .../actions/set-up-test-project/action.yaml | 3 - .../set-up-test-project/setUpTestProject.mjs | 19 +- .github/workflows/ci.yml | 193 ------ __fixtures__/test-project-rsa/.editorconfig | 10 - __fixtures__/test-project-rsa/.env.defaults | 19 - __fixtures__/test-project-rsa/.env.example | 4 - __fixtures__/test-project-rsa/.gitignore | 22 - __fixtures__/test-project-rsa/.gitpod.yml | 25 - .../test-project-rsa/.redwood/README.md | 44 -- .../test-project-rsa/.vscode/extensions.json | 14 - .../test-project-rsa/.vscode/launch.json | 36 -- .../test-project-rsa/.vscode/settings.json | 14 - .../patches/vite-npm-4.4.9-e845c1bbf8.patch | 19 - __fixtures__/test-project-rsa/.yarnrc.yml | 15 - __fixtures__/test-project-rsa/README.md | 3 - .../test-project-rsa/api/db/schema.prisma | 18 - .../test-project-rsa/api/jest.config.js | 8 - .../test-project-rsa/api/package.json | 9 - .../test-project-rsa/api/server.config.js | 52 -- .../requireAuth/requireAuth.test.ts | 18 - .../src/directives/requireAuth/requireAuth.ts | 25 - .../src/directives/skipAuth/skipAuth.test.ts | 10 - .../api/src/directives/skipAuth/skipAuth.ts | 16 - .../api/src/functions/graphql.ts | 19 - .../test-project-rsa/api/src/graphql/.keep | 0 .../test-project-rsa/api/src/lib/auth.ts | 25 - .../test-project-rsa/api/src/lib/db.ts | 21 - .../test-project-rsa/api/src/lib/logger.ts | 17 - .../test-project-rsa/api/src/services/.keep | 0 .../test-project-rsa/api/tsconfig.json | 36 -- .../test-project-rsa/graphql.config.js | 5 - __fixtures__/test-project-rsa/jest.config.js | 8 - __fixtures__/test-project-rsa/package.json | 26 - .../test-project-rsa/prettier.config.js | 18 - __fixtures__/test-project-rsa/redwood.toml | 27 - __fixtures__/test-project-rsa/scripts/.keep | 0 __fixtures__/test-project-rsa/scripts/seed.ts | 63 -- .../test-project-rsa/scripts/tsconfig.json | 42 -- .../test-project-rsa/web/jest.config.js | 8 - .../test-project-rsa/web/package.json | 23 - .../test-project-rsa/web/public/README.md | 35 -- .../test-project-rsa/web/public/favicon.png | Bin 1741 -> 0 bytes .../test-project-rsa/web/public/robots.txt | 2 - __fixtures__/test-project-rsa/web/src/App.tsx | 19 - .../test-project-rsa/web/src/Counter.css | 7 - .../web/src/Counter.module.css | 3 - .../test-project-rsa/web/src/Counter.tsx | 19 - .../test-project-rsa/web/src/Document.tsx | 27 - .../test-project-rsa/web/src/Routes.tsx | 31 - .../test-project-rsa/web/src/components/.keep | 0 .../src/components/Counter/AboutCounter.tsx | 20 - .../web/src/components/Counter/Counter.css | 7 - .../src/components/Counter/Counter.module.css | 3 - .../web/src/components/Counter/Counter.tsx | 21 - .../test-project-rsa/web/src/entries.ts | 15 - .../test-project-rsa/web/src/entry.client.tsx | 23 - .../test-project-rsa/web/src/entry.server.tsx | 15 - .../test-project-rsa/web/src/index.css | 4 - .../test-project-rsa/web/src/index.html | 16 - .../test-project-rsa/web/src/layouts/.keep | 0 .../NavigationLayout/NavigationLayout.css | 32 - .../NavigationLayout.stories.tsx | 13 - .../NavigationLayout.test.tsx | 14 - .../NavigationLayout/NavigationLayout.tsx | 27 - .../web/src/pages/AboutPage/AboutPage.css | 2 - .../web/src/pages/AboutPage/AboutPage.tsx | 27 - .../pages/FatalErrorPage/FatalErrorPage.tsx | 57 -- .../web/src/pages/HomePage/Form.tsx | 49 -- .../web/src/pages/HomePage/HomePage.css | 2 - .../src/pages/HomePage/HomePage.module.css | 3 - .../web/src/pages/HomePage/HomePage.tsx | 29 - .../web/src/pages/HomePage/chat.ts | 23 - .../src/pages/NotFoundPage/NotFoundPage.tsx | 44 -- .../test-project-rsa/web/src/words.ts | 111 ---- .../test-project-rsa/web/tsconfig.json | 53 -- .../test-project-rsa/web/vite.config.ts | 16 - .../.editorconfig | 10 - .../.env.defaults | 19 - .../.env.example | 4 - .../.gitignore | 22 - .../.gitpod.yml | 25 - .../.redwood/README.md | 44 -- .../.vscode/extensions.json | 14 - .../.vscode/launch.json | 36 -- .../.vscode/settings.json | 11 - .../.yarnrc.yml | 15 - .../README.md | 10 - .../api/db/schema.prisma | 18 - .../api/jest.config.js | 8 - .../api/package.json | 9 - .../api/server.config.js | 52 -- .../requireAuth/requireAuth.test.ts | 18 - .../src/directives/requireAuth/requireAuth.ts | 25 - .../src/directives/skipAuth/skipAuth.test.ts | 10 - .../api/src/directives/skipAuth/skipAuth.ts | 16 - .../api/src/functions/graphql.ts | 19 - .../api/src/graphql/.keep | 0 .../api/src/lib/auth.ts | 25 - .../api/src/lib/db.ts | 21 - .../api/src/lib/logger.ts | 17 - .../api/src/services/.keep | 0 .../api/tsconfig.json | 36 -- .../graphql.config.js | 5 - .../jest.config.js | 8 - .../package.json | 23 - .../prettier.config.js | 18 - .../redwood.toml | 27 - .../scripts/.keep | 0 .../scripts/seed.ts | 63 -- .../scripts/tsconfig.json | 42 -- .../web/jest.config.js | 8 - .../web/package.json | 28 - .../web/public/README.md | 35 -- .../web/public/favicon.png | Bin 1741 -> 0 bytes .../web/public/robots.txt | 2 - .../web/src/App.tsx | 19 - .../web/src/Document.tsx | 27 - .../web/src/Routes.tsx | 31 - .../web/src/components/.keep | 0 .../src/components/Counter/AboutCounter.tsx | 20 - .../web/src/components/Counter/Counter.css | 7 - .../src/components/Counter/Counter.module.css | 3 - .../web/src/components/Counter/Counter.tsx | 21 - .../web/src/entries.ts | 15 - .../web/src/entry.client.tsx | 23 - .../web/src/entry.server.tsx | 15 - .../web/src/index.css | 4 - .../web/src/index.html | 16 - .../web/src/layouts/.keep | 0 .../NavigationLayout/NavigationLayout.css | 32 - .../NavigationLayout.stories.tsx | 13 - .../NavigationLayout.test.tsx | 14 - .../NavigationLayout/NavigationLayout.tsx | 27 - .../web/src/pages/AboutPage/AboutPage.css | 2 - .../web/src/pages/AboutPage/AboutPage.tsx | 27 - .../pages/FatalErrorPage/FatalErrorPage.tsx | 57 -- .../web/src/pages/HomePage/HomePage.css | 2 - .../src/pages/HomePage/HomePage.module.css | 3 - .../web/src/pages/HomePage/HomePage.tsx | 32 - .../web/src/pages/HomePage/actions.ts | 16 - .../web/src/pages/HomePage/words.ts | 113 ---- .../src/pages/NotFoundPage/NotFoundPage.tsx | 44 -- .../web/tsconfig.json | 53 -- .../web/vite.config.ts | 16 - __fixtures__/test-project/web/package.json | 4 +- babel.config.js | 1 - docs/docs/router.md | 4 +- docs/static/img/router/cell_req_error.png | Bin 107838 -> 0 bytes .../auth-providers/auth0/web/package.json | 2 +- .../azureActiveDirectory/web/package.json | 2 +- .../auth-providers/clerk/web/package.json | 2 +- .../auth-providers/dbAuth/web/package.json | 2 +- .../auth-providers/firebase/web/package.json | 2 +- .../auth-providers/netlify/web/package.json | 2 +- .../auth-providers/supabase/web/package.json | 2 +- .../supertokens/web/package.json | 2 +- packages/auth/package.json | 2 +- packages/babel-config/dist.test.ts | 1 - packages/babel-config/src/common.ts | 24 - packages/babel-config/src/index.ts | 1 - ...babel-plugin-redwood-routes-auto-loader.ts | 9 - packages/babel-config/src/web.ts | 1 - .../cli/src/commands/__tests__/dev.test.js | 59 -- .../cli/src/commands/__tests__/serve.test.js | 11 +- packages/cli/src/commands/buildHandler.js | 15 +- .../cli/src/commands/deploy/flightcontrol.js | 2 +- packages/cli/src/commands/deploy/render.js | 2 +- packages/cli/src/commands/devHandler.js | 31 +- .../cli/src/commands/experimental/setupRsc.js | 29 - .../commands/experimental/setupRscHandler.js | 363 ----------- .../experimental/setupStreamingSsr.js | 30 - .../experimental/setupStreamingSsrHandler.js | 184 ------ .../templates/rsc/AboutCounter.tsx.template | 20 - .../templates/rsc/AboutPage.css.template | 2 - .../templates/rsc/AboutPage.tsx.template | 27 - .../templates/rsc/App.tsx.template | 19 - .../templates/rsc/Counter.css.template | 7 - .../templates/rsc/Counter.module.css.template | 3 - .../templates/rsc/Counter.tsx.template | 19 - .../templates/rsc/HomePage.css.template | 2 - .../rsc/HomePage.module.css.template | 3 - .../templates/rsc/HomePage.tsx.template | 29 - .../rsc/NavigationLayout.css.template | 32 - .../rsc/NavigationLayout.tsx.template | 27 - .../templates/rsc/Routes.tsx.template | 31 - .../templates/rsc/entries.ts.template | 15 - .../templates/rsc/index.css.template | 4 - .../streamingSsr/Document.tsx.template | 27 - .../streamingSsr/entry.client.tsx.template | 28 - .../streamingSsr/entry.server.tsx.template | 15 - packages/cli/src/commands/prerenderHandler.js | 12 +- packages/cli/src/commands/serve.js | 34 +- packages/cli/src/commands/serveApiHandler.js | 80 --- packages/cli/src/commands/serveBothHandler.js | 160 ----- packages/cli/src/commands/serveHandler.js | 220 +++++++ packages/cli/src/commands/serveWebHandler.js | 46 -- packages/core/config/webpack.common.js | 2 +- packages/core/package.json | 3 - packages/core/src/bins/rw-dev-fe.ts | 10 - packages/core/src/bins/rw-serve-api.ts | 10 - packages/core/src/bins/rw-serve-fe.ts | 10 - .../templates/js/web/package.json | 4 +- .../templates/ts/web/package.json | 4 +- packages/forms/package.json | 6 +- packages/internal/src/files.ts | 7 - .../templates/api-globImports.d.ts.template | 5 - packages/internal/src/routes.ts | 55 +- packages/internal/tsconfig.json | 1 - packages/prerender/package.json | 4 +- ...uild-manifest.json => build-manifest.json} | 0 ...uild-manifest.json => build-manifest.json} | 0 ...-plugin-redwood-prerender-media-imports.ts | 2 +- packages/prerender/src/runPrerender.tsx | 2 +- .../src/__tests__/config.test.ts | 6 - .../src/__tests__/paths.test.ts | 158 +---- packages/project-config/src/config.ts | 12 - packages/project-config/src/paths.ts | 86 --- packages/router/ambient.d.ts | 10 - packages/router/package.json | 8 +- packages/router/src/active-route-loader.tsx | 7 +- packages/structure/src/model/RWRoute.ts | 9 - packages/vite/ambient.d.ts | 30 - packages/vite/bins/rw-vite-build.mjs | 18 +- packages/vite/inject/reactRefresh.js | 7 - packages/vite/modules.d.ts | 5 - packages/vite/package.json | 56 +- packages/vite/src/buildFeServer.ts | 117 ---- packages/vite/src/buildRouteManifest.ts | 76 --- packages/vite/src/buildRscFeServer.ts | 58 -- packages/vite/src/client.ts | 137 ---- packages/vite/src/devFeServer.ts | 118 ---- packages/vite/src/entries.ts | 26 - .../src/fully-react/DevRwRscServerGlobal.ts | 63 -- .../src/fully-react/ProdRwRscServerGlobal.ts | 53 -- .../vite/src/fully-react/RwRscServerGlobal.ts | 20 - packages/vite/src/fully-react/assets.tsx | 82 --- packages/vite/src/fully-react/find-styles.ts | 106 ---- .../src/fully-react/findAssetsInManifest.ts | 47 -- packages/vite/src/fully-react/rwRscGlobal.ts | 10 - packages/vite/src/index.ts | 47 +- packages/vite/src/lib/StatusError.ts | 9 - packages/vite/src/lib/onWarn.ts | 22 - .../__tests__/swap-apollo-provider.test.mts | 14 - .../vite-plugin-swap-apollo-provider.ts | 26 - .../react-server-dom-webpack/node-loader.ts | 583 ------------------ packages/vite/src/rsc/rscBuildAnalyze.ts | 81 --- packages/vite/src/rsc/rscBuildClient.ts | 111 ---- .../vite/src/rsc/rscBuildClientEntriesFile.ts | 49 -- .../vite/src/rsc/rscBuildCopyCssAssets.ts | 31 - packages/vite/src/rsc/rscBuildRwEnvVars.ts | 38 -- packages/vite/src/rsc/rscBuildServer.ts | 183 ------ packages/vite/src/rsc/rscNodeLoader.ts | 36 -- packages/vite/src/rsc/rscRequestHandler.ts | 135 ---- packages/vite/src/rsc/rscVitePlugins.ts | 183 ------ packages/vite/src/rsc/rscWorker.ts | 415 ------------- .../vite/src/rsc/rscWorkerCommunication.ts | 171 ----- packages/vite/src/runFeServer.ts | 169 ----- packages/vite/src/streaming/collectCss.ts | 41 -- .../streaming/createReactStreamingHandler.ts | 157 ----- .../vite/src/streaming/registerGlobals.ts | 80 --- packages/vite/src/streaming/streamHelpers.ts | 202 ------ .../streaming/transforms/bufferedTransform.ts | 44 -- .../transforms/cancelTimeoutTransform.ts | 7 - .../src/streaming/transforms/encode-decode.ts | 9 - .../transforms/serverInjectionTransform.ts | 85 --- .../vite/src/streaming/triggerRouteHooks.ts | 117 ---- packages/vite/src/types.ts | 16 - packages/vite/src/utils.ts | 21 - packages/vite/tsconfig.json | 5 +- packages/web/ambient.d.ts | 13 - packages/web/package.json | 9 +- packages/web/src/apollo/index.tsx | 12 +- packages/web/src/apollo/links.tsx | 133 ---- packages/web/src/apollo/suspense.tsx | 217 ------- packages/web/src/apollo/typeOverride.ts | 12 - .../{cell => }/CellCacheContext.tsx | 0 .../web/src/components/DevFatalErrorPage.tsx | 52 +- .../src/components/GraphQLHooksProvider.tsx | 93 +-- packages/web/src/components/MetaTags.tsx | 13 +- packages/web/src/components/Metadata.test.tsx | 434 ++++++------- packages/web/src/components/Metadata.tsx | 10 +- packages/web/src/components/PortalHead.tsx | 49 -- .../web/src/components/RedwoodProvider.tsx | 3 - packages/web/src/components/ServerInject.tsx | 72 --- .../src/components/cell/CellErrorBoundary.tsx | 61 -- packages/web/src/components/cell/cellTypes.ts | 237 ------- .../web/src/components/cell/createCell.tsx | 181 ------ .../cell/createSuspendingCell.test.tsx | 144 ----- .../components/cell/createSuspendingCell.tsx | 162 ----- .../web/src/components/cell/isCellEmpty.tsx | 48 -- .../components/{cell => }/createCell.test.tsx | 9 +- packages/web/src/components/createCell.tsx | 411 ++++++++++++ packages/web/src/components/htmlTags.tsx | 139 ----- .../web/src/components/portalHead.test.tsx | 44 -- packages/web/src/config.ts | 7 - packages/web/src/global.web-auto-imports.ts | 5 +- packages/web/src/index.ts | 12 +- packages/web/src/routeHooks.types.ts | 17 - .../web/src/streamUtils/useDocumentReady.ts | 27 - .../smoke-tests/auth/tests/authChecks.spec.ts | 2 +- .../smoke-tests/auth/tests/rbacChecks.spec.ts | 2 +- tasks/smoke-tests/basePlaywright.config.ts | 3 - tasks/smoke-tests/{shared => }/common.ts | 0 tasks/smoke-tests/dev/tests/dev.spec.ts | 2 +- .../prerender/tests/prerender.spec.ts | 18 +- tasks/smoke-tests/rsa/playwright.config.ts | 21 - tasks/smoke-tests/rsa/tests/rsa.spec.ts | 29 - .../playwright.config.ts | 21 - .../tests/rsc-external-packages.spec.ts | 42 -- tasks/smoke-tests/rsc/playwright.config.ts | 21 - tasks/smoke-tests/rsc/tests/rsc.spec.ts | 27 - tasks/smoke-tests/serve/tests/serve.spec.ts | 2 +- tasks/smoke-tests/shared/delayedPage.ts | 47 -- tasks/smoke-tests/shared/homePage.ts | 21 - tasks/smoke-tests/smoke-tests.mjs | 2 +- .../streaming-ssr-dev/playwright.config.ts | 21 - .../tests/progressiveRendering.spec.ts | 85 --- .../streaming-ssr-prod/playwright.config.ts | 21 - .../tests/botRendering.spec.ts | 49 -- .../tests/progressiveRendering.spec.ts | 37 -- tasks/test-project/codemods/delayedPage.js | 122 ---- tasks/test-project/convert-to-ssr-fixture | 34 - tasks/test-project/tasks.js | 39 -- tasks/test-project/test-project | 18 +- yarn.lock | 307 +-------- 348 files changed, 1008 insertions(+), 12711 deletions(-) delete mode 100644 .github/actions/detect-changes/cases/rsc.mjs delete mode 100644 .github/actions/detect-changes/cases/ssr.mjs delete mode 100644 .github/actions/set-up-rsa-project/README.md delete mode 100644 .github/actions/set-up-rsa-project/action.yaml delete mode 100644 .github/actions/set-up-rsa-project/jsconfig.json delete mode 100644 .github/actions/set-up-rsa-project/package.json delete mode 100644 .github/actions/set-up-rsa-project/setUpRsaProjectGitHub.mjs delete mode 100644 .github/actions/set-up-rsa-project/setUpRsaProjectLocally.mjs delete mode 100644 .github/actions/set-up-rsc-external-packages-project/README.md delete mode 100644 .github/actions/set-up-rsc-external-packages-project/action.yaml delete mode 100644 .github/actions/set-up-rsc-external-packages-project/jsconfig.json delete mode 100644 .github/actions/set-up-rsc-external-packages-project/package.json delete mode 100644 .github/actions/set-up-rsc-external-packages-project/setUpRscExternalPackagesProjectGitHub.mjs delete mode 100644 .github/actions/set-up-rsc-external-packages-project/setUpRscExternalPackagesProjectLocally.mjs delete mode 100644 .github/actions/set-up-rsc-project/README.md delete mode 100644 .github/actions/set-up-rsc-project/action.yaml delete mode 100644 .github/actions/set-up-rsc-project/jsconfig.json delete mode 100644 .github/actions/set-up-rsc-project/package.json delete mode 100644 .github/actions/set-up-rsc-project/setUpRscProject.mjs delete mode 100644 .github/actions/set-up-rsc-project/setUpRscProjectGitHub.mjs delete mode 100644 .github/actions/set-up-rsc-project/setUpRscProjectLocally.mjs delete mode 100644 __fixtures__/test-project-rsa/.editorconfig delete mode 100644 __fixtures__/test-project-rsa/.env.defaults delete mode 100644 __fixtures__/test-project-rsa/.env.example delete mode 100644 __fixtures__/test-project-rsa/.gitignore delete mode 100644 __fixtures__/test-project-rsa/.gitpod.yml delete mode 100644 __fixtures__/test-project-rsa/.redwood/README.md delete mode 100644 __fixtures__/test-project-rsa/.vscode/extensions.json delete mode 100644 __fixtures__/test-project-rsa/.vscode/launch.json delete mode 100644 __fixtures__/test-project-rsa/.vscode/settings.json delete mode 100644 __fixtures__/test-project-rsa/.yarn/patches/vite-npm-4.4.9-e845c1bbf8.patch delete mode 100644 __fixtures__/test-project-rsa/.yarnrc.yml delete mode 100644 __fixtures__/test-project-rsa/README.md delete mode 100644 __fixtures__/test-project-rsa/api/db/schema.prisma delete mode 100644 __fixtures__/test-project-rsa/api/jest.config.js delete mode 100644 __fixtures__/test-project-rsa/api/package.json delete mode 100644 __fixtures__/test-project-rsa/api/server.config.js delete mode 100644 __fixtures__/test-project-rsa/api/src/directives/requireAuth/requireAuth.test.ts delete mode 100644 __fixtures__/test-project-rsa/api/src/directives/requireAuth/requireAuth.ts delete mode 100644 __fixtures__/test-project-rsa/api/src/directives/skipAuth/skipAuth.test.ts delete mode 100644 __fixtures__/test-project-rsa/api/src/directives/skipAuth/skipAuth.ts delete mode 100644 __fixtures__/test-project-rsa/api/src/functions/graphql.ts delete mode 100644 __fixtures__/test-project-rsa/api/src/graphql/.keep delete mode 100644 __fixtures__/test-project-rsa/api/src/lib/auth.ts delete mode 100644 __fixtures__/test-project-rsa/api/src/lib/db.ts delete mode 100644 __fixtures__/test-project-rsa/api/src/lib/logger.ts delete mode 100644 __fixtures__/test-project-rsa/api/src/services/.keep delete mode 100644 __fixtures__/test-project-rsa/api/tsconfig.json delete mode 100644 __fixtures__/test-project-rsa/graphql.config.js delete mode 100644 __fixtures__/test-project-rsa/jest.config.js delete mode 100644 __fixtures__/test-project-rsa/package.json delete mode 100644 __fixtures__/test-project-rsa/prettier.config.js delete mode 100644 __fixtures__/test-project-rsa/redwood.toml delete mode 100644 __fixtures__/test-project-rsa/scripts/.keep delete mode 100644 __fixtures__/test-project-rsa/scripts/seed.ts delete mode 100644 __fixtures__/test-project-rsa/scripts/tsconfig.json delete mode 100644 __fixtures__/test-project-rsa/web/jest.config.js delete mode 100644 __fixtures__/test-project-rsa/web/package.json delete mode 100644 __fixtures__/test-project-rsa/web/public/README.md delete mode 100644 __fixtures__/test-project-rsa/web/public/favicon.png delete mode 100644 __fixtures__/test-project-rsa/web/public/robots.txt delete mode 100644 __fixtures__/test-project-rsa/web/src/App.tsx delete mode 100644 __fixtures__/test-project-rsa/web/src/Counter.css delete mode 100644 __fixtures__/test-project-rsa/web/src/Counter.module.css delete mode 100644 __fixtures__/test-project-rsa/web/src/Counter.tsx delete mode 100644 __fixtures__/test-project-rsa/web/src/Document.tsx delete mode 100644 __fixtures__/test-project-rsa/web/src/Routes.tsx delete mode 100644 __fixtures__/test-project-rsa/web/src/components/.keep delete mode 100644 __fixtures__/test-project-rsa/web/src/components/Counter/AboutCounter.tsx delete mode 100644 __fixtures__/test-project-rsa/web/src/components/Counter/Counter.css delete mode 100644 __fixtures__/test-project-rsa/web/src/components/Counter/Counter.module.css delete mode 100644 __fixtures__/test-project-rsa/web/src/components/Counter/Counter.tsx delete mode 100644 __fixtures__/test-project-rsa/web/src/entries.ts delete mode 100644 __fixtures__/test-project-rsa/web/src/entry.client.tsx delete mode 100644 __fixtures__/test-project-rsa/web/src/entry.server.tsx delete mode 100644 __fixtures__/test-project-rsa/web/src/index.css delete mode 100644 __fixtures__/test-project-rsa/web/src/index.html delete mode 100644 __fixtures__/test-project-rsa/web/src/layouts/.keep delete mode 100644 __fixtures__/test-project-rsa/web/src/layouts/NavigationLayout/NavigationLayout.css delete mode 100644 __fixtures__/test-project-rsa/web/src/layouts/NavigationLayout/NavigationLayout.stories.tsx delete mode 100644 __fixtures__/test-project-rsa/web/src/layouts/NavigationLayout/NavigationLayout.test.tsx delete mode 100644 __fixtures__/test-project-rsa/web/src/layouts/NavigationLayout/NavigationLayout.tsx delete mode 100644 __fixtures__/test-project-rsa/web/src/pages/AboutPage/AboutPage.css delete mode 100644 __fixtures__/test-project-rsa/web/src/pages/AboutPage/AboutPage.tsx delete mode 100644 __fixtures__/test-project-rsa/web/src/pages/FatalErrorPage/FatalErrorPage.tsx delete mode 100644 __fixtures__/test-project-rsa/web/src/pages/HomePage/Form.tsx delete mode 100644 __fixtures__/test-project-rsa/web/src/pages/HomePage/HomePage.css delete mode 100644 __fixtures__/test-project-rsa/web/src/pages/HomePage/HomePage.module.css delete mode 100644 __fixtures__/test-project-rsa/web/src/pages/HomePage/HomePage.tsx delete mode 100644 __fixtures__/test-project-rsa/web/src/pages/HomePage/chat.ts delete mode 100644 __fixtures__/test-project-rsa/web/src/pages/NotFoundPage/NotFoundPage.tsx delete mode 100644 __fixtures__/test-project-rsa/web/src/words.ts delete mode 100644 __fixtures__/test-project-rsa/web/tsconfig.json delete mode 100644 __fixtures__/test-project-rsa/web/vite.config.ts delete mode 100644 __fixtures__/test-project-rsc-external-packages/.editorconfig delete mode 100644 __fixtures__/test-project-rsc-external-packages/.env.defaults delete mode 100644 __fixtures__/test-project-rsc-external-packages/.env.example delete mode 100644 __fixtures__/test-project-rsc-external-packages/.gitignore delete mode 100644 __fixtures__/test-project-rsc-external-packages/.gitpod.yml delete mode 100644 __fixtures__/test-project-rsc-external-packages/.redwood/README.md delete mode 100644 __fixtures__/test-project-rsc-external-packages/.vscode/extensions.json delete mode 100644 __fixtures__/test-project-rsc-external-packages/.vscode/launch.json delete mode 100644 __fixtures__/test-project-rsc-external-packages/.vscode/settings.json delete mode 100644 __fixtures__/test-project-rsc-external-packages/.yarnrc.yml delete mode 100644 __fixtures__/test-project-rsc-external-packages/README.md delete mode 100644 __fixtures__/test-project-rsc-external-packages/api/db/schema.prisma delete mode 100644 __fixtures__/test-project-rsc-external-packages/api/jest.config.js delete mode 100644 __fixtures__/test-project-rsc-external-packages/api/package.json delete mode 100644 __fixtures__/test-project-rsc-external-packages/api/server.config.js delete mode 100644 __fixtures__/test-project-rsc-external-packages/api/src/directives/requireAuth/requireAuth.test.ts delete mode 100644 __fixtures__/test-project-rsc-external-packages/api/src/directives/requireAuth/requireAuth.ts delete mode 100644 __fixtures__/test-project-rsc-external-packages/api/src/directives/skipAuth/skipAuth.test.ts delete mode 100644 __fixtures__/test-project-rsc-external-packages/api/src/directives/skipAuth/skipAuth.ts delete mode 100644 __fixtures__/test-project-rsc-external-packages/api/src/functions/graphql.ts delete mode 100644 __fixtures__/test-project-rsc-external-packages/api/src/graphql/.keep delete mode 100644 __fixtures__/test-project-rsc-external-packages/api/src/lib/auth.ts delete mode 100644 __fixtures__/test-project-rsc-external-packages/api/src/lib/db.ts delete mode 100644 __fixtures__/test-project-rsc-external-packages/api/src/lib/logger.ts delete mode 100644 __fixtures__/test-project-rsc-external-packages/api/src/services/.keep delete mode 100644 __fixtures__/test-project-rsc-external-packages/api/tsconfig.json delete mode 100644 __fixtures__/test-project-rsc-external-packages/graphql.config.js delete mode 100644 __fixtures__/test-project-rsc-external-packages/jest.config.js delete mode 100644 __fixtures__/test-project-rsc-external-packages/package.json delete mode 100644 __fixtures__/test-project-rsc-external-packages/prettier.config.js delete mode 100644 __fixtures__/test-project-rsc-external-packages/redwood.toml delete mode 100644 __fixtures__/test-project-rsc-external-packages/scripts/.keep delete mode 100644 __fixtures__/test-project-rsc-external-packages/scripts/seed.ts delete mode 100644 __fixtures__/test-project-rsc-external-packages/scripts/tsconfig.json delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/jest.config.js delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/package.json delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/public/README.md delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/public/favicon.png delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/public/robots.txt delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/App.tsx delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/Document.tsx delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/Routes.tsx delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/components/.keep delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/components/Counter/AboutCounter.tsx delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/components/Counter/Counter.css delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/components/Counter/Counter.module.css delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/components/Counter/Counter.tsx delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/entries.ts delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/entry.client.tsx delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/entry.server.tsx delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/index.css delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/index.html delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/layouts/.keep delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/layouts/NavigationLayout/NavigationLayout.css delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/layouts/NavigationLayout/NavigationLayout.stories.tsx delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/layouts/NavigationLayout/NavigationLayout.test.tsx delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/layouts/NavigationLayout/NavigationLayout.tsx delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/pages/AboutPage/AboutPage.css delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/pages/AboutPage/AboutPage.tsx delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/pages/FatalErrorPage/FatalErrorPage.tsx delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/pages/HomePage/HomePage.css delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/pages/HomePage/HomePage.module.css delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/pages/HomePage/HomePage.tsx delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/pages/HomePage/actions.ts delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/pages/HomePage/words.ts delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/src/pages/NotFoundPage/NotFoundPage.tsx delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/tsconfig.json delete mode 100644 __fixtures__/test-project-rsc-external-packages/web/vite.config.ts delete mode 100644 docs/static/img/router/cell_req_error.png delete mode 100644 packages/cli/src/commands/experimental/setupRsc.js delete mode 100644 packages/cli/src/commands/experimental/setupRscHandler.js delete mode 100644 packages/cli/src/commands/experimental/setupStreamingSsr.js delete mode 100644 packages/cli/src/commands/experimental/setupStreamingSsrHandler.js delete mode 100644 packages/cli/src/commands/experimental/templates/rsc/AboutCounter.tsx.template delete mode 100644 packages/cli/src/commands/experimental/templates/rsc/AboutPage.css.template delete mode 100644 packages/cli/src/commands/experimental/templates/rsc/AboutPage.tsx.template delete mode 100644 packages/cli/src/commands/experimental/templates/rsc/App.tsx.template delete mode 100644 packages/cli/src/commands/experimental/templates/rsc/Counter.css.template delete mode 100644 packages/cli/src/commands/experimental/templates/rsc/Counter.module.css.template delete mode 100644 packages/cli/src/commands/experimental/templates/rsc/Counter.tsx.template delete mode 100644 packages/cli/src/commands/experimental/templates/rsc/HomePage.css.template delete mode 100644 packages/cli/src/commands/experimental/templates/rsc/HomePage.module.css.template delete mode 100644 packages/cli/src/commands/experimental/templates/rsc/HomePage.tsx.template delete mode 100644 packages/cli/src/commands/experimental/templates/rsc/NavigationLayout.css.template delete mode 100644 packages/cli/src/commands/experimental/templates/rsc/NavigationLayout.tsx.template delete mode 100644 packages/cli/src/commands/experimental/templates/rsc/Routes.tsx.template delete mode 100644 packages/cli/src/commands/experimental/templates/rsc/entries.ts.template delete mode 100644 packages/cli/src/commands/experimental/templates/rsc/index.css.template delete mode 100644 packages/cli/src/commands/experimental/templates/streamingSsr/Document.tsx.template delete mode 100644 packages/cli/src/commands/experimental/templates/streamingSsr/entry.client.tsx.template delete mode 100644 packages/cli/src/commands/experimental/templates/streamingSsr/entry.server.tsx.template delete mode 100644 packages/cli/src/commands/serveApiHandler.js delete mode 100644 packages/cli/src/commands/serveBothHandler.js create mode 100644 packages/cli/src/commands/serveHandler.js delete mode 100644 packages/cli/src/commands/serveWebHandler.js delete mode 100644 packages/core/src/bins/rw-dev-fe.ts delete mode 100644 packages/core/src/bins/rw-serve-api.ts delete mode 100644 packages/core/src/bins/rw-serve-fe.ts rename packages/prerender/src/babelPlugins/__tests__/__fixtures__/viteDistDir/{client-build-manifest.json => build-manifest.json} (100%) rename packages/prerender/src/babelPlugins/__tests__/__fixtures__/webpackDistDir/{client-build-manifest.json => build-manifest.json} (100%) delete mode 100644 packages/vite/ambient.d.ts delete mode 100644 packages/vite/inject/reactRefresh.js delete mode 100644 packages/vite/modules.d.ts delete mode 100644 packages/vite/src/buildFeServer.ts delete mode 100644 packages/vite/src/buildRouteManifest.ts delete mode 100644 packages/vite/src/buildRscFeServer.ts delete mode 100644 packages/vite/src/client.ts delete mode 100644 packages/vite/src/devFeServer.ts delete mode 100644 packages/vite/src/entries.ts delete mode 100644 packages/vite/src/fully-react/DevRwRscServerGlobal.ts delete mode 100644 packages/vite/src/fully-react/ProdRwRscServerGlobal.ts delete mode 100644 packages/vite/src/fully-react/RwRscServerGlobal.ts delete mode 100644 packages/vite/src/fully-react/assets.tsx delete mode 100644 packages/vite/src/fully-react/find-styles.ts delete mode 100644 packages/vite/src/fully-react/findAssetsInManifest.ts delete mode 100644 packages/vite/src/fully-react/rwRscGlobal.ts delete mode 100644 packages/vite/src/lib/StatusError.ts delete mode 100644 packages/vite/src/lib/onWarn.ts delete mode 100644 packages/vite/src/plugins/__tests__/swap-apollo-provider.test.mts delete mode 100644 packages/vite/src/plugins/vite-plugin-swap-apollo-provider.ts delete mode 100644 packages/vite/src/react-server-dom-webpack/node-loader.ts delete mode 100644 packages/vite/src/rsc/rscBuildAnalyze.ts delete mode 100644 packages/vite/src/rsc/rscBuildClient.ts delete mode 100644 packages/vite/src/rsc/rscBuildClientEntriesFile.ts delete mode 100644 packages/vite/src/rsc/rscBuildCopyCssAssets.ts delete mode 100644 packages/vite/src/rsc/rscBuildRwEnvVars.ts delete mode 100644 packages/vite/src/rsc/rscBuildServer.ts delete mode 100644 packages/vite/src/rsc/rscNodeLoader.ts delete mode 100644 packages/vite/src/rsc/rscRequestHandler.ts delete mode 100644 packages/vite/src/rsc/rscVitePlugins.ts delete mode 100644 packages/vite/src/rsc/rscWorker.ts delete mode 100644 packages/vite/src/rsc/rscWorkerCommunication.ts delete mode 100644 packages/vite/src/runFeServer.ts delete mode 100644 packages/vite/src/streaming/collectCss.ts delete mode 100644 packages/vite/src/streaming/createReactStreamingHandler.ts delete mode 100644 packages/vite/src/streaming/registerGlobals.ts delete mode 100644 packages/vite/src/streaming/streamHelpers.ts delete mode 100644 packages/vite/src/streaming/transforms/bufferedTransform.ts delete mode 100644 packages/vite/src/streaming/transforms/cancelTimeoutTransform.ts delete mode 100644 packages/vite/src/streaming/transforms/encode-decode.ts delete mode 100644 packages/vite/src/streaming/transforms/serverInjectionTransform.ts delete mode 100644 packages/vite/src/streaming/triggerRouteHooks.ts delete mode 100644 packages/vite/src/types.ts delete mode 100644 packages/vite/src/utils.ts delete mode 100644 packages/web/src/apollo/links.tsx delete mode 100644 packages/web/src/apollo/suspense.tsx rename packages/web/src/components/{cell => }/CellCacheContext.tsx (100%) delete mode 100644 packages/web/src/components/PortalHead.tsx delete mode 100644 packages/web/src/components/ServerInject.tsx delete mode 100644 packages/web/src/components/cell/CellErrorBoundary.tsx delete mode 100644 packages/web/src/components/cell/cellTypes.ts delete mode 100644 packages/web/src/components/cell/createCell.tsx delete mode 100644 packages/web/src/components/cell/createSuspendingCell.test.tsx delete mode 100644 packages/web/src/components/cell/createSuspendingCell.tsx delete mode 100644 packages/web/src/components/cell/isCellEmpty.tsx rename packages/web/src/components/{cell => }/createCell.test.tsx (98%) create mode 100644 packages/web/src/components/createCell.tsx delete mode 100644 packages/web/src/components/htmlTags.tsx delete mode 100644 packages/web/src/components/portalHead.test.tsx delete mode 100644 packages/web/src/routeHooks.types.ts delete mode 100644 packages/web/src/streamUtils/useDocumentReady.ts rename tasks/smoke-tests/{shared => }/common.ts (100%) delete mode 100644 tasks/smoke-tests/rsa/playwright.config.ts delete mode 100644 tasks/smoke-tests/rsa/tests/rsa.spec.ts delete mode 100644 tasks/smoke-tests/rsc-external-packages/playwright.config.ts delete mode 100644 tasks/smoke-tests/rsc-external-packages/tests/rsc-external-packages.spec.ts delete mode 100644 tasks/smoke-tests/rsc/playwright.config.ts delete mode 100644 tasks/smoke-tests/rsc/tests/rsc.spec.ts delete mode 100644 tasks/smoke-tests/shared/delayedPage.ts delete mode 100644 tasks/smoke-tests/shared/homePage.ts delete mode 100644 tasks/smoke-tests/streaming-ssr-dev/playwright.config.ts delete mode 100644 tasks/smoke-tests/streaming-ssr-dev/tests/progressiveRendering.spec.ts delete mode 100644 tasks/smoke-tests/streaming-ssr-prod/playwright.config.ts delete mode 100644 tasks/smoke-tests/streaming-ssr-prod/tests/botRendering.spec.ts delete mode 100644 tasks/smoke-tests/streaming-ssr-prod/tests/progressiveRendering.spec.ts delete mode 100644 tasks/test-project/codemods/delayedPage.js delete mode 100755 tasks/test-project/convert-to-ssr-fixture diff --git a/.github/actions/actionsLib.mjs b/.github/actions/actionsLib.mjs index 8aaf223dcfff..8702ffde13d9 100644 --- a/.github/actions/actionsLib.mjs +++ b/.github/actions/actionsLib.mjs @@ -1,7 +1,6 @@ /* eslint-env node */ // @ts-check -import fs from 'node:fs' import path from 'node:path' import { fileURLToPath } from 'node:url' @@ -62,9 +61,9 @@ export function projectCopy(redwoodProjectCwd) { } /** - * @param {{ baseKeyPrefix: string, distKeyPrefix: string, canary: boolean }} options + * @param {{ baseKeyPrefix: string, distKeyPrefix: string }} options */ -export async function createCacheKeys({ baseKeyPrefix, distKeyPrefix, canary }) { +export async function createCacheKeys({ baseKeyPrefix, distKeyPrefix }) { const baseKey = [ baseKeyPrefix, process.env.RUNNER_OS, @@ -76,7 +75,7 @@ export async function createCacheKeys({ baseKeyPrefix, distKeyPrefix, canary }) baseKey, 'dependencies', await hashFiles(['yarn.lock', '.yarnrc.yml'].join('\n')), - ].join('-') + (canary ? '-canary' : '') + ].join('-') const distKey = [ dependenciesKey, @@ -91,7 +90,7 @@ export async function createCacheKeys({ baseKeyPrefix, distKeyPrefix, canary }) 'lerna.json', 'packages', ].join('\n')) - ].join('-') + (canary ? '-canary' : '') + ].join('-') return { baseKey, @@ -99,65 +98,3 @@ export async function createCacheKeys({ baseKeyPrefix, distKeyPrefix, canary }) distKey } } - -/** - * @callback ExecInProject - * @param {string} commandLine command to execute (can include additional args). Must be correctly escaped. - * @param {Omit=} options exec options. See ExecOptions - * @returns {Promise} exit code - */ - -/** - * @param {string} testProjectPath - * @param {string} fixtureName - * @param {Object} core - * @param {(key: string, value: string) => void} core.setOutput - * @param {ExecInProject} execInProject - * @returns {Promise} - */ -export async function setUpRscTestProject( - testProjectPath, - fixtureName, - core, - execInProject -) { - core.setOutput('test-project-path', testProjectPath) - - console.log('rwPath', REDWOOD_FRAMEWORK_PATH) - console.log('testProjectPath', testProjectPath) - - const fixturePath = path.join( - REDWOOD_FRAMEWORK_PATH, - '__fixtures__', - fixtureName - ) - const rwBinPath = path.join( - REDWOOD_FRAMEWORK_PATH, - 'packages/cli/dist/index.js' - ) - const rwfwBinPath = path.join( - REDWOOD_FRAMEWORK_PATH, - 'packages/cli/dist/rwfw.js' - ) - - console.log(`Creating project at ${testProjectPath}`) - console.log() - fs.cpSync(fixturePath, testProjectPath, { recursive: true }) - - console.log(`Adding framework dependencies to ${testProjectPath}`) - await projectDeps(testProjectPath) - console.log() - - console.log(`Installing node_modules in ${testProjectPath}`) - await execInProject('yarn install') - - console.log(`Copying over framework files to ${testProjectPath}`) - await execInProject(`node ${rwfwBinPath} project:copy`, { - env: { RWFW_PATH: REDWOOD_FRAMEWORK_PATH }, - }) - console.log() - - console.log(`Building project in ${testProjectPath}`) - await execInProject(`node ${rwBinPath} build -v`) - console.log() -} diff --git a/.github/actions/detect-changes/cases/rsc.mjs b/.github/actions/detect-changes/cases/rsc.mjs deleted file mode 100644 index e2e31da48e8a..000000000000 --- a/.github/actions/detect-changes/cases/rsc.mjs +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Detects if there are RSC changes - * - * @param {string[]} changedFiles The list of files which git has listed as changed - * @returns {boolean} True if there are changes, false if not - */ -export function rscChanged(changedFiles){ - for (const changedFile of changedFiles) { - // As the RSC implementation changes, this list will need to be updated. - // Also, I could be much more specific here, but then I'd also have to - // update this list much more often. So this'll serve as a good enough - // starting point. - if ( - changedFile.startsWith('tasks/smoke-tests/rsc/') || - changedFile.startsWith('tasks/smoke-tests/rsa/') || - changedFile.startsWith('tasks/smoke-tests/basePlaywright.config.ts') || - changedFile.startsWith('.github/actions/set-up-rsa-project/') || - changedFile.startsWith('.github/actions/set-up-rsc-external-packages-project/') || - changedFile.startsWith('.github/actions/set-up-rsc-project/') || - changedFile.startsWith('packages/internal/') || - changedFile.startsWith('packages/project-config/') || - changedFile.startsWith('packages/web/') || - changedFile.startsWith('packages/vite/') || - changedFile.startsWith('__fixtures__/test-project-rsa') || - changedFile.startsWith('__fixtures__/test-project-rsc-external-packages') - ) { - console.log('RSC change detected:', changedFile) - return true - } - } - - console.log('No RSC changes') - return false -} diff --git a/.github/actions/detect-changes/cases/ssr.mjs b/.github/actions/detect-changes/cases/ssr.mjs deleted file mode 100644 index c3d05e7296cb..000000000000 --- a/.github/actions/detect-changes/cases/ssr.mjs +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Detects if there are SSR changes - * - * @param {string[]} changedFiles The list of files which git has listed as changed - * @returns {boolean} True if there are changes, false if not - */ -export function ssrChanged(changedFiles){ - for (const changedFile of changedFiles) { - if ( - changedFile.startsWith('tasks/smoke-tests/streaming-ssr') || - changedFile === 'tasks/smoke-tests/basePlaywright.config.ts' || - changedFile === 'tasks/test-project/codemods/delayedPage.js' || - changedFile.startsWith('packages/internal/') || - changedFile.startsWith('packages/project-config/') || - changedFile.startsWith('packages/web/') || - changedFile.startsWith('packages/router/') || - changedFile.startsWith('packages/web-server/') || - changedFile.startsWith('packages/vite/') - ) { - console.log('SSR change detected:', changedFile) - return true - } - } - - console.log('No SSR changes') - return false -} diff --git a/.github/actions/detect-changes/detectChanges.mjs b/.github/actions/detect-changes/detectChanges.mjs index a7119100199d..285e410dc654 100644 --- a/.github/actions/detect-changes/detectChanges.mjs +++ b/.github/actions/detect-changes/detectChanges.mjs @@ -2,8 +2,6 @@ import fs from 'node:fs' import core from '@actions/core' import { hasCodeChanges } from './cases/code_changes.mjs' -import { rscChanged } from './cases/rsc.mjs' -import { ssrChanged } from './cases/ssr.mjs' const getPrNumber = () => { // Example GITHUB_REF refs/pull/9544/merge diff --git a/.github/actions/set-up-rsa-project/README.md b/.github/actions/set-up-rsa-project/README.md deleted file mode 100644 index 0bf518131d44..000000000000 --- a/.github/actions/set-up-rsa-project/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# GitHub action to copy a template RSA project to use for testing - -This action copies a RW project with Streaming SSR and RSC support already set -up. It's used for RSA smoke tests. - -It copies the `__fixtures__/test-project-rsa` project, runs `yarn install` and -`project:copy`. Finally it builds the rw app. - -## Testing/running locally - -Go into the github actions folder -`cd .github/actions` - -Then run the following command to execute the action -`node set-up-rsa-project/setUpRsaProjectLocally.mjs` - -## Design - -The main logic of the action is in the `../actionsLib.mjs` file. To be able to -run that code both on GitHub and locally it uses dependency injection. The -injection is done by `setupRsaProjectLocally.mjs` for when you want to run the -action on your own machine and by `setupRsaProjectGitHib.mjs` when it's -triggered by GitHub CI. - -When doing further changes to the code here it's very important to keep the -DI scripts as light on logic as possible. Ideally all logic is kept to -`../actionsLib.mjs` so that the same logic is used both locally and on GitHub. -Do note though that more actions share that code, so make sure not to break -the other actions when making changes there. diff --git a/.github/actions/set-up-rsa-project/action.yaml b/.github/actions/set-up-rsa-project/action.yaml deleted file mode 100644 index 066eb600010a..000000000000 --- a/.github/actions/set-up-rsa-project/action.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: Set up RSA test project from fixture -description: Sets up an RSA project for smoke-tests - -runs: - using: node20 - main: 'setUpRsaProjectGitHub.mjs' - -outputs: - test-project-path: - description: Path to the test project diff --git a/.github/actions/set-up-rsa-project/jsconfig.json b/.github/actions/set-up-rsa-project/jsconfig.json deleted file mode 100644 index 8effcfaa09ef..000000000000 --- a/.github/actions/set-up-rsa-project/jsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "noEmit": true, - "esModuleInterop": true, - "target": "esnext", - "module": "esnext", - "moduleResolution": "node", - "skipLibCheck": false, - "jsx": "react-jsx" - }, -} diff --git a/.github/actions/set-up-rsa-project/package.json b/.github/actions/set-up-rsa-project/package.json deleted file mode 100644 index 196dba219d44..000000000000 --- a/.github/actions/set-up-rsa-project/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "set-up-rsa-project", - "version": "0.0.0", - "private": true, - "type": "module" -} diff --git a/.github/actions/set-up-rsa-project/setUpRsaProjectGitHub.mjs b/.github/actions/set-up-rsa-project/setUpRsaProjectGitHub.mjs deleted file mode 100644 index 497d82e4c9bf..000000000000 --- a/.github/actions/set-up-rsa-project/setUpRsaProjectGitHub.mjs +++ /dev/null @@ -1,22 +0,0 @@ -/* eslint-env node */ -// @ts-check - -import path from 'node:path' - -import core from '@actions/core' - -import { createExecWithEnvInCwd, setUpRscTestProject } from '../actionsLib.mjs' - -const testProjectAndFixtureName = 'test-project-rsa' -const testProjectPath = path.join( - path.dirname(process.cwd()), - testProjectAndFixtureName -) -const execInProject = createExecWithEnvInCwd(testProjectPath) - -setUpRscTestProject( - testProjectPath, - testProjectAndFixtureName, - core, - execInProject -) diff --git a/.github/actions/set-up-rsa-project/setUpRsaProjectLocally.mjs b/.github/actions/set-up-rsa-project/setUpRsaProjectLocally.mjs deleted file mode 100644 index 8e9baa044594..000000000000 --- a/.github/actions/set-up-rsa-project/setUpRsaProjectLocally.mjs +++ /dev/null @@ -1,111 +0,0 @@ -/* eslint-env node */ -// @ts-check - -import os from 'node:os' -import path from 'node:path' - -import execa from 'execa' - -import { setUpRscTestProject } from '../actionsLib.mjs' - -class ExecaError extends Error { - stdout - stderr - exitCode - - constructor({ stdout, stderr, exitCode }) { - super(`execa failed with exit code ${exitCode}`) - this.stdout = stdout - this.stderr = stderr - this.exitCode = exitCode - } -} - -/** - * @template [EncodingType=string] - * @typedef {import('execa').Options} ExecaOptions - */ - -/** - * @typedef {{ - * env?: Record - * }} ExecOptions - */ - -/** - * @param {string} commandLine command to execute (can include additional args). Must be correctly escaped. - * @param {string[]=} args arguments for tool. Escaping is handled by the lib. - * @param {ExecOptions=} options exec options. See ExecOptions - */ -async function exec(commandLine, args, options) { - return execa(commandLine, args, options) - .then(({ stdout, stderr, exitCode }) => { - if (exitCode !== 0) { - throw new ExecaError({ stdout, stderr, exitCode }) - } - }) - .catch((error) => { - if (error instanceof ExecaError) { - // Rethrow ExecaError - throw error - } else { - const { stdout, stderr, exitCode } = error - console.log('error', error) - throw new ExecaError({ stdout, stderr, exitCode }) - } - }) -} - -/** - * @param {string} cwd - * @param {Record=} env - * @returns {ExecaOptions} - */ -function getExecaOptions(cwd, env = {}) { - return { - shell: true, - stdio: 'inherit', - cleanup: true, - cwd, - env, - } -} - -const testProjectAndFixtureName = 'test-project-rsa' - -const testProjectPath = path.join( - os.tmpdir(), - 'redwood', - testProjectAndFixtureName, - // ":" is problematic with paths - new Date().toISOString().split(':').join('-') -) - -// Mock for @actions/core -const core = { - setOutput: () => {}, -} - -/** - * Exec a command. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param {string} commandLine command to execute (can include additional args). Must be correctly escaped. - * @param {ExecOptions=} options exec options. See ExecOptions - * @returns {Promise} exit code - */ -function execInProject(commandLine, options) { - return exec( - commandLine, - undefined, - getExecaOptions(testProjectPath, options?.env) - ) -} - -setUpRscTestProject( - testProjectPath, - testProjectAndFixtureName, - core, - execInProject -) diff --git a/.github/actions/set-up-rsc-external-packages-project/README.md b/.github/actions/set-up-rsc-external-packages-project/README.md deleted file mode 100644 index 8c47dc603dd5..000000000000 --- a/.github/actions/set-up-rsc-external-packages-project/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# GitHub action to copy a template RSC project to use for testing - -This action copies a RW project with Streaming SSR and RSC support already set -up. It's used for RSC smoke tests. - -It copies the `__fixtures__/test-project-rsc-external-packages` project, runs -`yarn install` and `project:copy`. Finally it builds the rw app. - -## Testing/running locally - -Go into the github actions folder -`cd .github/actions` - -Then run the following command to execute the action -`node set-up-rsc-external-packages-project/setUpRscExternalPackagesProjectLocally.mjs` - -## Design - -The main logic of the action is in the `../actionsLib.mjs` file. To be able to -run that code both on GitHub and locally it uses dependency injection. The -injection is done by `setupRscExternalPackagesProjectLocally.mjs` for when you -want to run the action on your own machine and by -`setupRscExternalPackagesProjectGitHib.mjs` when it's triggered by GitHub CI. - -When doing further changes to the code here it's very important to keep the -DI scripts as light on logic as possible. Ideally all logic is kept to -`../actionsLib.mjs` so that the same logic is used both locally and on GitHub. -Do note though that more actions share that code, so make sure not to break -the other actions when making changes there. diff --git a/.github/actions/set-up-rsc-external-packages-project/action.yaml b/.github/actions/set-up-rsc-external-packages-project/action.yaml deleted file mode 100644 index cdac1d7c9fbc..000000000000 --- a/.github/actions/set-up-rsc-external-packages-project/action.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: Set up RSC test project with external packages from fixture -description: Sets up an RSC project that imports external packages for smoke-tests - -runs: - using: node20 - main: 'setUpRscExternalPackagesProjectGitHub.mjs' - -outputs: - test-project-path: - description: Path to the test project diff --git a/.github/actions/set-up-rsc-external-packages-project/jsconfig.json b/.github/actions/set-up-rsc-external-packages-project/jsconfig.json deleted file mode 100644 index 8effcfaa09ef..000000000000 --- a/.github/actions/set-up-rsc-external-packages-project/jsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "noEmit": true, - "esModuleInterop": true, - "target": "esnext", - "module": "esnext", - "moduleResolution": "node", - "skipLibCheck": false, - "jsx": "react-jsx" - }, -} diff --git a/.github/actions/set-up-rsc-external-packages-project/package.json b/.github/actions/set-up-rsc-external-packages-project/package.json deleted file mode 100644 index 8dd1f5abbe06..000000000000 --- a/.github/actions/set-up-rsc-external-packages-project/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "set-up-rsc-external-packages-project", - "version": "0.0.0", - "private": true, - "type": "module" -} diff --git a/.github/actions/set-up-rsc-external-packages-project/setUpRscExternalPackagesProjectGitHub.mjs b/.github/actions/set-up-rsc-external-packages-project/setUpRscExternalPackagesProjectGitHub.mjs deleted file mode 100644 index e09f3f597d5f..000000000000 --- a/.github/actions/set-up-rsc-external-packages-project/setUpRscExternalPackagesProjectGitHub.mjs +++ /dev/null @@ -1,22 +0,0 @@ -/* eslint-env node */ -// @ts-check - -import path from 'node:path' - -import core from '@actions/core' - -import { createExecWithEnvInCwd, setUpRscTestProject } from '../actionsLib.mjs' - -const testProjectAndFixtureName = 'test-project-rsc-external-packages' -const testProjectPath = path.join( - path.dirname(process.cwd()), - testProjectAndFixtureName -) -const execInProject = createExecWithEnvInCwd(testProjectPath) - -setUpRscTestProject( - testProjectPath, - testProjectAndFixtureName, - core, - execInProject -) diff --git a/.github/actions/set-up-rsc-external-packages-project/setUpRscExternalPackagesProjectLocally.mjs b/.github/actions/set-up-rsc-external-packages-project/setUpRscExternalPackagesProjectLocally.mjs deleted file mode 100644 index 2f2af2c87d85..000000000000 --- a/.github/actions/set-up-rsc-external-packages-project/setUpRscExternalPackagesProjectLocally.mjs +++ /dev/null @@ -1,111 +0,0 @@ -/* eslint-env node */ -// @ts-check - -import os from 'node:os' -import path from 'node:path' - -import execa from 'execa' - -import { setUpRscTestProject } from '../actionsLib.mjs' - -class ExecaError extends Error { - stdout - stderr - exitCode - - constructor({ stdout, stderr, exitCode }) { - super(`execa failed with exit code ${exitCode}`) - this.stdout = stdout - this.stderr = stderr - this.exitCode = exitCode - } -} - -/** - * @template [EncodingType=string] - * @typedef {import('execa').Options} ExecaOptions - */ - -/** - * @typedef {{ - * env?: Record - * }} ExecOptions - */ - -/** - * @param {string} commandLine command to execute (can include additional args). Must be correctly escaped. - * @param {string[]=} args arguments for tool. Escaping is handled by the lib. - * @param {ExecOptions=} options exec options. See ExecOptions - */ -async function exec(commandLine, args, options) { - return execa(commandLine, args, options) - .then(({ stdout, stderr, exitCode }) => { - if (exitCode !== 0) { - throw new ExecaError({ stdout, stderr, exitCode }) - } - }) - .catch((error) => { - if (error instanceof ExecaError) { - // Rethrow ExecaError - throw error - } else { - const { stdout, stderr, exitCode } = error - console.log('error', error) - throw new ExecaError({ stdout, stderr, exitCode }) - } - }) -} - -/** - * @param {string} cwd - * @param {Record=} env - * @returns {ExecaOptions} - */ -function getExecaOptions(cwd, env = {}) { - return { - shell: true, - stdio: 'inherit', - cleanup: true, - cwd, - env, - } -} - -const testProjectAndFixtureName = 'test-project-rsc-external-packages' - -const testProjectPath = path.join( - os.tmpdir(), - 'redwood', - testProjectAndFixtureName, - // ":" is problematic with paths - new Date().toISOString().split(':').join('-') -) - -// Mock for @actions/core -const core = { - setOutput: () => {}, -} - -/** - * Exec a command. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param {string} commandLine command to execute (can include additional args). Must be correctly escaped. - * @param {ExecOptions=} options exec options. See ExecOptions - * @returns {Promise} exit code - */ -function execInProject(commandLine, options) { - return exec( - commandLine, - undefined, - getExecaOptions(testProjectPath, options?.env) - ) -} - -setUpRscTestProject( - testProjectPath, - testProjectAndFixtureName, - core, - execInProject -) diff --git a/.github/actions/set-up-rsc-project/README.md b/.github/actions/set-up-rsc-project/README.md deleted file mode 100644 index 4b01027d9cee..000000000000 --- a/.github/actions/set-up-rsc-project/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# GitHub action to create a RW project with RSCs set up - -This action creates a RW project with Streaming SSR and RSC support set up. -It's used for RSC smoke tests. - -It runs `npx -y create-redwood-app@canary ...` to set the project up with the -latest canary release of Redwood. It then runs -`experimental setup-streaming-ssr` and `experimental setup-rsc` followed by -a build of the rw app. Finally it runs `project:copy` to get the latest -changes to the framework (i.e. the changes introduced by the PR triggering this -action) into the project. - -## Testing/running locally - -Go into the github actions folder -`cd .github/actions` - -Then run the following command to execute the action -`node set-up-rsc-project/setUpRscProjectLocally.mjs` - -## Design - -The main logic of the action is in the `setUpRscProject.mjs` file. To be able -to run that code both on GitHub and locally it uses dependency injection. The -injection is done by `setupRscProjectLocally.mjs` for when you want to run -the action on your own machine and by `setupRscProjectGitHib.mjs` when it's -triggered by GitHub CI. - -When doing further changes to the code here it's very important to keep the -DI scripts as light on logic as possible. Ideally all logic is kept to -`setUpRscProject.mjs` so that the same logic is used both locally and on -GitHub. diff --git a/.github/actions/set-up-rsc-project/action.yaml b/.github/actions/set-up-rsc-project/action.yaml deleted file mode 100644 index 858e5937be56..000000000000 --- a/.github/actions/set-up-rsc-project/action.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: Set up RSC test project -description: Sets up an RSC project for smoke-tests - -runs: - using: node20 - main: 'setUpRscProjectGitHub.mjs' - -outputs: - test-project-path: - description: Path to the test project diff --git a/.github/actions/set-up-rsc-project/jsconfig.json b/.github/actions/set-up-rsc-project/jsconfig.json deleted file mode 100644 index 8effcfaa09ef..000000000000 --- a/.github/actions/set-up-rsc-project/jsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "noEmit": true, - "esModuleInterop": true, - "target": "esnext", - "module": "esnext", - "moduleResolution": "node", - "skipLibCheck": false, - "jsx": "react-jsx" - }, -} diff --git a/.github/actions/set-up-rsc-project/package.json b/.github/actions/set-up-rsc-project/package.json deleted file mode 100644 index 90aa7b8a79bd..000000000000 --- a/.github/actions/set-up-rsc-project/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "set-up-rsc-project", - "version": "0.0.0", - "private": true, - "type": "module" -} diff --git a/.github/actions/set-up-rsc-project/setUpRscProject.mjs b/.github/actions/set-up-rsc-project/setUpRscProject.mjs deleted file mode 100644 index 928926f38355..000000000000 --- a/.github/actions/set-up-rsc-project/setUpRscProject.mjs +++ /dev/null @@ -1,109 +0,0 @@ -/* eslint-env node */ -// @ts-check - -import path from 'node:path' - -import { REDWOOD_FRAMEWORK_PATH } from '../actionsLib.mjs' - -/** - * @typedef {import('@actions/exec').ExecOptions} ExecOptions - */ - -/** - * Exec a command. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @callback Exec - * @param {string} commandLine command to execute (can include additional args). Must be correctly escaped. - * @param {string[]=} args arguments for tool. Escaping is handled by the lib. - * @param {ExecOptions=} options exec options. See ExecOptions - * @returns {Promise} exit code - */ - -/** - * @callback ExecInProject - * @param {string} commandLine command to execute (can include additional args). Must be correctly escaped. - * @param {Omit=} options exec options. See ExecOptions - * @returns {Promise} exit code - */ - -/** - * @param {string} rscProjectPath - * @param {Object} core - * @param {(key: string, value: string) => void} core.setOutput - * @param {Exec} exec - * @param {ExecInProject} execInProject - * @returns {Promise} - */ -export async function main( - rscProjectPath, - core, - exec, - execInProject -) { - core.setOutput('rsc-project-path', rscProjectPath) - - console.log('rwPath', REDWOOD_FRAMEWORK_PATH) - console.log('rscProjectPath', rscProjectPath) - - await setUpRscProject( - rscProjectPath, - exec, - execInProject, - ) -} - -/** - * @param {string} rscProjectPath - * @param {Exec} exec - * @param {ExecInProject} execInProject - * @returns {Promise} - */ -async function setUpRscProject( - rscProjectPath, - exec, - execInProject, -) { - const rwBinPath = path.join( - REDWOOD_FRAMEWORK_PATH, - 'packages/cli/dist/index.js' - ) - const rwfwBinPath = path.join( - REDWOOD_FRAMEWORK_PATH, - 'packages/cli/dist/rwfw.js' - ) - - console.log(`Creating project at ${rscProjectPath}`) - console.log() - await exec('npx', [ - '-y', - 'create-redwood-app@canary', - '-y', - '--no-git', - rscProjectPath, - ]) - - console.log(`Setting up Streaming/SSR in ${rscProjectPath}`) - const cmdSetupStreamingSSR = `node ${rwBinPath} experimental setup-streaming-ssr -f` - await execInProject(cmdSetupStreamingSSR) - console.log() - - console.log(`Setting up RSC in ${rscProjectPath}`) - await execInProject(`node ${rwBinPath} experimental setup-rsc`) - console.log() - - console.log(`Copying over framework files to ${rscProjectPath}`) - await execInProject(`node ${rwfwBinPath} project:copy`, { - env: { RWFW_PATH: REDWOOD_FRAMEWORK_PATH }, - }) - console.log() - - console.log('Installing dependencies') - await execInProject('yarn install') - console.log() - - console.log(`Building project in ${rscProjectPath}`) - await execInProject(`node ${rwBinPath} build -v`) - console.log() -} diff --git a/.github/actions/set-up-rsc-project/setUpRscProjectGitHub.mjs b/.github/actions/set-up-rsc-project/setUpRscProjectGitHub.mjs deleted file mode 100644 index 1ba4dd3ac6fb..000000000000 --- a/.github/actions/set-up-rsc-project/setUpRscProjectGitHub.mjs +++ /dev/null @@ -1,17 +0,0 @@ -/* eslint-env node */ -// @ts-check - -import path from 'node:path' - -import core from '@actions/core' -import { exec } from '@actions/exec' - -import { createExecWithEnvInCwd } from '../actionsLib.mjs' - -import { main } from './setUpRscProject.mjs' - -const rscProjectPath = path.join(path.dirname(process.cwd()), 'rsc-project') - -const execInProject = createExecWithEnvInCwd(rscProjectPath) - -main(rscProjectPath, core, exec, execInProject) diff --git a/.github/actions/set-up-rsc-project/setUpRscProjectLocally.mjs b/.github/actions/set-up-rsc-project/setUpRscProjectLocally.mjs deleted file mode 100644 index c5c57ab2b31f..000000000000 --- a/.github/actions/set-up-rsc-project/setUpRscProjectLocally.mjs +++ /dev/null @@ -1,117 +0,0 @@ -/* eslint-env node */ -// @ts-check - -import os from 'node:os' -import path from 'node:path' - -import execa from 'execa' - -import { main } from './setUpRscProject.mjs' - -class ExecaError extends Error { - stdout - stderr - exitCode - - constructor({ stdout, stderr, exitCode }) { - super(`execa failed with exit code ${exitCode}`) - this.stdout = stdout - this.stderr = stderr - this.exitCode = exitCode - } -} - -/** - * @template [EncodingType=string] - * @typedef {import('execa').Options} ExecaOptions - */ - -/** - * @typedef {{ - * env?: Record - * }} ExecOptions - */ - -/** - * @param {string} commandLine command to execute (can include additional args). Must be correctly escaped. - * @param {string[]=} args arguments for tool. Escaping is handled by the lib. - * @param {ExecOptions=} options exec options. See ExecOptions - */ -async function exec(commandLine, args, options) { - return execa(commandLine, args, options) - .then(({ stdout, stderr, exitCode }) => { - if (exitCode !== 0) { - throw new ExecaError({ stdout, stderr, exitCode }) - } - }) - .catch((error) => { - if (error instanceof ExecaError) { - // Rethrow ExecaError - throw error - } else { - const { stdout, stderr, exitCode } = error - console.log('error', error) - throw new ExecaError({ stdout, stderr, exitCode }) - } - }) -} - -/** - * @param {string} cwd - * @param {Record=} env - * @returns {ExecaOptions} - */ -function getExecaOptions(cwd, env = {}) { - return { - shell: true, - stdio: 'inherit', - cleanup: true, - cwd, - env, - } -} - -const rscProjectPath = path.join( - os.tmpdir(), - 'redwood-rsc-project', - // ":" is problematic with paths - new Date().toISOString().split(':').join('-') -) - -// Mock for @actions/core -const core = { - setOutput: () => {}, -} - -/** - * Exec a command. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param {string} commandLine command to execute (can include additional args). Must be correctly escaped. - * @param {ExecOptions=} options exec options. See ExecOptions - * @returns {Promise} exit code - */ -function execInProject(commandLine, options) { - return exec( - commandLine, - undefined, - getExecaOptions(rscProjectPath, options?.env) - ) -} - -/** - * Exec a command. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param {string} commandLine command to execute (can include additional args). Must be correctly escaped. - * @param {string[]=} args arguments for tool. Escaping is handled by the lib. - * @param {ExecOptions=} options exec options. See ExecOptions - * @returns {Promise} exit code - */ -function execInRoot(commandLine, args, options) { - return exec(commandLine, args, getExecaOptions('/', options?.env)) -} - -main(rscProjectPath, core, execInRoot, execInProject) diff --git a/.github/actions/set-up-test-project/action.yaml b/.github/actions/set-up-test-project/action.yaml index 0c0e623056a5..9866507ab1db 100644 --- a/.github/actions/set-up-test-project/action.yaml +++ b/.github/actions/set-up-test-project/action.yaml @@ -9,9 +9,6 @@ inputs: bundler: description: The bundler to use (vite or webpack) default: vite - canary: - description: Upgrade the project to canary? - default: "false" outputs: test-project-path: diff --git a/.github/actions/set-up-test-project/setUpTestProject.mjs b/.github/actions/set-up-test-project/setUpTestProject.mjs index e8eb2da6a80b..a06c43f3c393 100644 --- a/.github/actions/set-up-test-project/setUpTestProject.mjs +++ b/.github/actions/set-up-test-project/setUpTestProject.mjs @@ -25,12 +25,8 @@ core.setOutput('test-project-path', TEST_PROJECT_PATH) const bundler = core.getInput('bundler') -const canary = core.getInput('canary') === 'true' - - console.log({ bundler, - canary }) console.log() @@ -38,7 +34,7 @@ console.log() const { dependenciesKey, distKey -} = await createCacheKeys({ baseKeyPrefix: 'test-project', distKeyPrefix: bundler, canary }) +} = await createCacheKeys({ baseKeyPrefix: 'test-project', distKeyPrefix: bundler }) /** * @returns {Promise} @@ -58,9 +54,7 @@ async function main() { await sharedTasks() } else { console.log(`Cache not found for input keys: ${distKey}, ${dependenciesKey}`) - await setUpTestProject({ - canary: true - }) + await setUpTestProject() } await cache.saveCache([TEST_PROJECT_PATH], distKey) @@ -68,10 +62,9 @@ async function main() { } /** - * *@param {{canary: boolean}} options * @returns {Promise} */ -async function setUpTestProject({ canary }) { +async function setUpTestProject() { const TEST_PROJECT_FIXTURE_PATH = path.join( REDWOOD_FRAMEWORK_PATH, '__fixtures__', @@ -90,12 +83,6 @@ async function setUpTestProject({ canary }) { await execInProject('yarn install') console.log() - if (canary) { - console.log(`Upgrading project to canary`) - await execInProject('yarn rw upgrade -t canary') - console.log() - } - await cache.saveCache([TEST_PROJECT_PATH], dependenciesKey) console.log(`Cache saved with key: ${dependenciesKey}`) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 973cc187823f..d779a30040c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,8 +22,6 @@ jobs: outputs: onlydocs: ${{ steps.detect-changes.outputs.onlydocs }} - rsc: ${{ steps.detect-changes.outputs.rsc }} - ssr: ${{ steps.detect-changes.outputs.ssr }} steps: - uses: actions/checkout@v4 @@ -513,196 +511,6 @@ jobs: steps: - run: echo "Skipped" - rsc-smoke-tests: - needs: [check, detect-changes] - if: needs.detect-changes.outputs.rsc == 'true' - - strategy: - matrix: - os: [ubuntu-latest, windows-latest] - - name: 🔄🐘 RSC Smoke tests / ${{ matrix.os }} - runs-on: ${{ matrix.os }} - - env: - REDWOOD_CI: 1 - REDWOOD_VERBOSE_TELEMETRY: 1 - - steps: - - uses: actions/checkout@v4 - - - name: Enable Corepack - run: corepack enable - - - name: ⬢ Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Enable Corepack - run: corepack enable - - - name: 🐈 Set up yarn cache - uses: ./.github/actions/set-up-yarn-cache - - - name: 🐈 Yarn install - run: yarn install --inline-builds - env: - GITHUB_TOKEN: ${{ github.token }} - - - name: 🔨 Build - run: yarn build - - - name: 🌲 Set up RSC project - id: set-up-rsc-project - uses: ./.github/actions/set-up-rsc-project - env: - REDWOOD_DISABLE_TELEMETRY: 1 - YARN_ENABLE_IMMUTABLE_INSTALLS: false - - - name: 🎭 Install playwright dependencies - run: npx playwright install --with-deps chromium - - - name: 🐘 Run RSC smoke tests - working-directory: tasks/smoke-tests/rsc - run: npx playwright test - env: - REDWOOD_TEST_PROJECT_PATH: ${{ steps.set-up-rsc-project.outputs.rsc-project-path }} - REDWOOD_DISABLE_TELEMETRY: 1 - - - name: 🌲 Set up RSA smoke test - id: set-up-rsa-project - uses: ./.github/actions/set-up-rsa-project - env: - REDWOOD_DISABLE_TELEMETRY: 1 - YARN_ENABLE_IMMUTABLE_INSTALLS: false - - - name: 🐘 Run RSA smoke tests - working-directory: tasks/smoke-tests/rsa - run: npx playwright test - env: - REDWOOD_TEST_PROJECT_PATH: ${{ steps.set-up-rsa-project.outputs.test-project-path }} - REDWOOD_DISABLE_TELEMETRY: 1 - - - name: 🌲 Set up RSC external packages smoke test - id: set-up-rsc-external-packages-project - uses: ./.github/actions/set-up-rsc-external-packages-project - env: - REDWOOD_DISABLE_TELEMETRY: 1 - YARN_ENABLE_IMMUTABLE_INSTALLS: false - - - name: 🐘 Run RSC external packages smoke tests - working-directory: tasks/smoke-tests/rsc-external-packages - run: npx playwright test - env: - REDWOOD_TEST_PROJECT_PATH: ${{ steps.set-up-rsc-external-packages-project.outputs.test-project-path }} - REDWOOD_DISABLE_TELEMETRY: 1 - - rsc-smoke-tests-skip: - needs: detect-changes - if: needs.detect-changes.outputs.rsc == 'false' - - strategy: - matrix: - os: [ubuntu-latest, windows-latest] - - name: 🔄🐘 RSC Smoke tests / ${{ matrix.os }} - runs-on: ${{ matrix.os }} - - steps: - - run: echo "Skipped" - - ssr-smoke-tests: - needs: [check, detect-changes] - if: needs.detect-changes.outputs.ssr == 'true' - - strategy: - matrix: - # TODO: add `windows-latest`. - os: [ubuntu-latest] - - name: 🔁 SSR Smoke tests / ${{ matrix.os }} - runs-on: ${{ matrix.os }} - - env: - REDWOOD_CI: 1 - REDWOOD_VERBOSE_TELEMETRY: 1 - - steps: - - uses: actions/checkout@v4 - - - name: Enable Corepack - run: corepack enable - - - name: ⬢ Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: 🐈 Set up yarn cache - uses: ./.github/actions/set-up-yarn-cache - - - name: 🐈 Yarn install - run: yarn install --inline-builds - env: - GITHUB_TOKEN: ${{ github.token }} - - - name: 🔨 Build - run: yarn build - - - name: 🌲 Set up test project - id: set-up-test-project - uses: ./.github/actions/set-up-test-project - with: - bundler: vite - canary: true - env: - REDWOOD_DISABLE_TELEMETRY: 1 - YARN_ENABLE_IMMUTABLE_INSTALLS: false - - - name: Run SSR codemods on test project - run: ./tasks/test-project/convert-to-ssr-fixture ${{ steps.set-up-test-project.outputs.test-project-path }} - env: - REDWOOD_DISABLE_TELEMETRY: 1 - - - name: 🎭 Install playwright dependencies - run: npx playwright install --with-deps chromium - - - name: Run SSR [DEV] smoke tests - working-directory: ./tasks/smoke-tests/streaming-ssr-dev - run: npx playwright test - env: - REDWOOD_TEST_PROJECT_PATH: '${{ steps.set-up-test-project.outputs.test-project-path }}' - REDWOOD_DISABLE_TELEMETRY: 1 - - - name: Build for production - working-directory: ${{ steps.set-up-test-project.outputs.test-project-path }} - run: yarn rw build --no-prerender - env: - REDWOOD_DISABLE_TELEMETRY: 1 - - - name: Run SSR [PROD] smoke tests - working-directory: ./tasks/smoke-tests/streaming-ssr-prod - run: npx playwright test - env: - REDWOOD_TEST_PROJECT_PATH: '${{ steps.set-up-test-project.outputs.test-project-path }}' - REDWOOD_DISABLE_TELEMETRY: 1 - - ssr-smoke-tests-skip: - needs: detect-changes - if: needs.detect-changes.outputs.ssr == 'false' - - strategy: - matrix: - # TODO: add `windows-latest`. - os: [ubuntu-latest] - - name: 🔁 SSR Smoke tests / ${{ matrix.os }} - runs-on: ${{ matrix.os }} - - steps: - - run: echo "Skipped" - fragments-smoke-tests: needs: check @@ -747,7 +555,6 @@ jobs: uses: ./.github/actions/set-up-test-project with: bundler: vite - canary: true env: REDWOOD_DISABLE_TELEMETRY: 1 YARN_ENABLE_IMMUTABLE_INSTALLS: false diff --git a/__fixtures__/test-project-rsa/.editorconfig b/__fixtures__/test-project-rsa/.editorconfig deleted file mode 100644 index ae10a5cce3b2..000000000000 --- a/__fixtures__/test-project-rsa/.editorconfig +++ /dev/null @@ -1,10 +0,0 @@ -# editorconfig.org -root = true - -[*] -charset = utf-8 -end_of_line = lf -indent_size = 2 -indent_style = space -insert_final_newline = true -trim_trailing_whitespace = true diff --git a/__fixtures__/test-project-rsa/.env.defaults b/__fixtures__/test-project-rsa/.env.defaults deleted file mode 100644 index fb88fb33b334..000000000000 --- a/__fixtures__/test-project-rsa/.env.defaults +++ /dev/null @@ -1,19 +0,0 @@ -# These environment variables will be used by default if you do not create any -# yourself in .env. This file should be safe to check into your version control -# system. Any custom values should go in .env and .env should *not* be checked -# into version control. - -# schema.prisma defaults -DATABASE_URL=file:./dev.db - -# location of the test database for api service scenarios (defaults to ./.redwood/test.db if not set) -# TEST_DATABASE_URL=file:./.redwood/test.db - -# disables Prisma CLI update notifier -PRISMA_HIDE_UPDATE_MESSAGE=true - -# Option to override the current environment's default api-side log level -# See: https://redwoodjs.com/docs/logger for level options, defaults to "trace" otherwise. -# Most applications want "debug" or "info" during dev, "trace" when you have issues and "warn" in production. -# Ordered by how verbose they are: trace | debug | info | warn | error | silent -# LOG_LEVEL=debug diff --git a/__fixtures__/test-project-rsa/.env.example b/__fixtures__/test-project-rsa/.env.example deleted file mode 100644 index 2a2de6c026ca..000000000000 --- a/__fixtures__/test-project-rsa/.env.example +++ /dev/null @@ -1,4 +0,0 @@ -# DATABASE_URL=file:./dev.db -# TEST_DATABASE_URL=file:./.redwood/test.db -# PRISMA_HIDE_UPDATE_MESSAGE=true -# LOG_LEVEL=trace diff --git a/__fixtures__/test-project-rsa/.gitignore b/__fixtures__/test-project-rsa/.gitignore deleted file mode 100644 index 9b8149560d9b..000000000000 --- a/__fixtures__/test-project-rsa/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -.idea -.DS_Store -.env -.netlify -.redwood/* -!.redwood/README.md -dev.db* -dist -dist-babel -node_modules -yarn-error.log -web/public/mockServiceWorker.js -web/types/graphql.d.ts -api/types/graphql.d.ts -api/src/lib/generateGraphiQLHeader.* -.pnp.* -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/sdks -!.yarn/versions diff --git a/__fixtures__/test-project-rsa/.gitpod.yml b/__fixtures__/test-project-rsa/.gitpod.yml deleted file mode 100644 index a357a6e8c9a9..000000000000 --- a/__fixtures__/test-project-rsa/.gitpod.yml +++ /dev/null @@ -1,25 +0,0 @@ -# To learn about this file, please see https://www.gitpod.io/docs/references/gitpod-yml - -image: gitpod/workspace-node-lts - -tasks: - - init: | - # Cleanup terminal - printf "\033[3J\033c\033[3J" - - yarn install - - command: yarn rw build -v && yarn rw serve -ports: - - port: 8910 - name: RedwoodJS web application - onOpen: notify # because we already have [browser].open = true in redwood.toml - - port: 8911 - name: Serverless functions - onOpen: ignore - -vscode: - extensions: - - "dbaeumer.vscode-eslint" - - "mgmcdermott.vscode-language-babel" - - "editorconfig.editorconfig" diff --git a/__fixtures__/test-project-rsa/.redwood/README.md b/__fixtures__/test-project-rsa/.redwood/README.md deleted file mode 100644 index f22b586a47cc..000000000000 --- a/__fixtures__/test-project-rsa/.redwood/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# .redwood - -## What is this directory? - -Redwood uses this `.redwood` directory to store transitory data that aids in the smooth and convenient operation of your Redwood project. - -## Do I need to do anything with this directory? - -No. You shouldn't have to create, edit or delete anything in this directory in your day-to-day work with Redwood. - -You don't need to commit any other contents of this directory to your version control system. It's ignored by default. - -## What's in this directory? - -### Files - -| Name | Description | -| :---------------- | :------- | -| commandCache.json | This file contains mappings to assist the Redwood CLI in efficiently executing commands. | -| schema.graphql | This is the GraphQL schema which has been automatically generated from your Redwood project. | -| studio.db | The sqlite database used by the experimental `rw exp studio` feature. | -| telemetry.txt | Contains a unique ID used for telemetry. This value is rotated every 24 hours to protect your project's anonymity. | -| test.db | The sqlite database used when running tests. | - -### Directories - -| Name | Description | -| :---------- | :------- | -| locks | Stores temporary files that Redwood uses to keep track of the execution of async/background tasks between processes. | -| logs | Stores log files for background tasks such as update checking. | -| prebuild | Stores transpiled JavaScript that is generated as part of Redwood's build process. | -| telemetry | Stores the recent telemetry that the Redwood CLI has generated. You may inspect these files to see everything Redwood is anonymously collecting. | -| types | Stores the results of type generation. | -| updateCheck | Stores a file which contains the results of checking for Redwood updates. | - -We try to keep this README up to date but you may, from time to time, find other files or directories in this `.redwood` directory that have not yet been documented here. This is likely nothing to worry about but feel free to let us know and we'll update this list. - -### Telemetry - -RedwoodJS collects completely anonymous telemetry data about general usage. For transparency, that data is viewable in the respective directories and files. To learn more and manage your project's settings, visit [telemetry.redwoodjs.com](https://telemetry.redwoodjs.com). - -### Have any questions? - -Feel free to reach out to us in the [RedwoodJS Community](https://community.redwoodjs.com/) forum if you have any questions. diff --git a/__fixtures__/test-project-rsa/.vscode/extensions.json b/__fixtures__/test-project-rsa/.vscode/extensions.json deleted file mode 100644 index 7fc50a119fc6..000000000000 --- a/__fixtures__/test-project-rsa/.vscode/extensions.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "recommendations": [ - "dbaeumer.vscode-eslint", - "eamodio.gitlens", - "ofhumanbondage.react-proptypes-intellisense", - "mgmcdermott.vscode-language-babel", - "wix.vscode-import-cost", - "pflannery.vscode-versionlens", - "editorconfig.editorconfig", - "prisma.prisma", - "graphql.vscode-graphql" - ], - "unwantedRecommendations": [] -} diff --git a/__fixtures__/test-project-rsa/.vscode/launch.json b/__fixtures__/test-project-rsa/.vscode/launch.json deleted file mode 100644 index ea5956966fff..000000000000 --- a/__fixtures__/test-project-rsa/.vscode/launch.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "version": "0.3.0", - "configurations": [ - { - "command": "yarn redwood dev --apiDebugPort 18911", - "name": "Run Dev Server", - "request": "launch", - "type": "node-terminal" - }, - { - "name": "Attach API debugger", - "port": 18911, // you can change this port, see https://redwoodjs.com/docs/project-configuration-dev-test-build#debugger-configuration - "request": "attach", - "skipFiles": [ - "/**" - ], - "type": "node", - "localRoot": "${workspaceFolder}/node_modules/@redwoodjs/api-server/dist", - "remoteRoot": "${workspaceFolder}/node_modules/@redwoodjs/api-server/dist", - "sourceMaps": true, - "restart": true - }, - { - "command": "yarn redwood test api", - "name": "Test api", - "request": "launch", - "type": "node-terminal" - }, - { - "command": "yarn redwood test web", - "name": "Test web", - "request": "launch", - "type": "node-terminal" - }, - ] -} diff --git a/__fixtures__/test-project-rsa/.vscode/settings.json b/__fixtures__/test-project-rsa/.vscode/settings.json deleted file mode 100644 index de8f4d2f7169..000000000000 --- a/__fixtures__/test-project-rsa/.vscode/settings.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "editor.tabSize": 2, - "files.trimTrailingWhitespace": true, - "editor.formatOnSave": false, - "editor.codeActionsOnSave": { - "source.fixAll.eslint": true - }, - "[markdown][html][mjml]": { - "files.trimTrailingWhitespace": false - }, - "[prisma]": { - "editor.formatOnSave": true - } -} diff --git a/__fixtures__/test-project-rsa/.yarn/patches/vite-npm-4.4.9-e845c1bbf8.patch b/__fixtures__/test-project-rsa/.yarn/patches/vite-npm-4.4.9-e845c1bbf8.patch deleted file mode 100644 index eb67d7906284..000000000000 --- a/__fixtures__/test-project-rsa/.yarn/patches/vite-npm-4.4.9-e845c1bbf8.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/dist/node/chunks/dep-df561101.js b/dist/node/chunks/dep-df561101.js -index 1bc8674177fe73120171b22436e6104713c5d764..f0fee7b385868cb01c6d47b80d7f64a7368c0412 100644 ---- a/dist/node/chunks/dep-df561101.js -+++ b/dist/node/chunks/dep-df561101.js -@@ -55890,12 +55890,12 @@ async function instantiateModule(url, server, context = { global }, urlStack = [ - }; - urlStack = urlStack.concat(url); - const isCircular = (url) => urlStack.includes(url); -- const { isProduction, resolve: { dedupe, preserveSymlinks }, root, } = server.config; -+ const { isProduction, resolve: { dedupe, preserveSymlinks, conditions }, root, } = server.config; - const resolveOptions = { - mainFields: ['main'], - browserField: true, - conditions: [], -- overrideConditions: ['production', 'development'], -+ overrideConditions: [...conditions, 'production', 'development'], - extensions: ['.js', '.cjs', '.json'], - dedupe, - preserveSymlinks, diff --git a/__fixtures__/test-project-rsa/.yarnrc.yml b/__fixtures__/test-project-rsa/.yarnrc.yml deleted file mode 100644 index e8c5d50aa786..000000000000 --- a/__fixtures__/test-project-rsa/.yarnrc.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Yarn's manifest file. You can configure yarn here. -# See https://yarnpkg.com/configuration/yarnrc. - -# For `node_modules` (see `nodeLinker` below), this is almost always the preferred option. -compressionLevel: 0 - -enableGlobalCache: true - -# Lets yarn use hardlinks inside `node_modules` to dedupe packages. -# For a more pnpm-like experience, consider `hardlinks-global` where hardlinks point to a global store. -nmMode: hardlinks-local - -# How to install Node packages. -# Heads up: right now, Redwood expects this to be `node-modules`. -nodeLinker: node-modules diff --git a/__fixtures__/test-project-rsa/README.md b/__fixtures__/test-project-rsa/README.md deleted file mode 100644 index 5c8b137a2126..000000000000 --- a/__fixtures__/test-project-rsa/README.md +++ /dev/null @@ -1,3 +0,0 @@ -RW smoke-test fixture project for RSAs with Forms - -Used by `.github/actions/set-up-rsc-from-fixture` diff --git a/__fixtures__/test-project-rsa/api/db/schema.prisma b/__fixtures__/test-project-rsa/api/db/schema.prisma deleted file mode 100644 index 3dea71a68f23..000000000000 --- a/__fixtures__/test-project-rsa/api/db/schema.prisma +++ /dev/null @@ -1,18 +0,0 @@ -datasource db { - provider = "sqlite" - url = env("DATABASE_URL") -} - -generator client { - provider = "prisma-client-js" - binaryTargets = "native" -} - -// Define your own datamodels here and run `yarn redwood prisma migrate dev` -// to create migrations for them and apply to your dev DB. -// TODO: Please remove the following example: -model UserExample { - id Int @id @default(autoincrement()) - email String @unique - name String? -} diff --git a/__fixtures__/test-project-rsa/api/jest.config.js b/__fixtures__/test-project-rsa/api/jest.config.js deleted file mode 100644 index 932fc82dce93..000000000000 --- a/__fixtures__/test-project-rsa/api/jest.config.js +++ /dev/null @@ -1,8 +0,0 @@ -// More info at https://redwoodjs.com/docs/project-configuration-dev-test-build - -const config = { - rootDir: '../', - preset: '@redwoodjs/testing/config/jest/api', -} - -module.exports = config diff --git a/__fixtures__/test-project-rsa/api/package.json b/__fixtures__/test-project-rsa/api/package.json deleted file mode 100644 index 7a73e956fa1a..000000000000 --- a/__fixtures__/test-project-rsa/api/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "api", - "version": "0.0.0", - "private": true, - "dependencies": { - "@redwoodjs/api": "7.0.0-canary.717", - "@redwoodjs/graphql-server": "7.0.0-canary.717" - } -} diff --git a/__fixtures__/test-project-rsa/api/server.config.js b/__fixtures__/test-project-rsa/api/server.config.js deleted file mode 100644 index 73dca9225a3e..000000000000 --- a/__fixtures__/test-project-rsa/api/server.config.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * This file allows you to configure the Fastify Server settings - * used by the RedwoodJS dev server. - * - * It also applies when running RedwoodJS with `yarn rw serve`. - * - * For the Fastify server options that you can set, see: - * https://www.fastify.io/docs/latest/Reference/Server/#factory - * - * Examples include: logger settings, timeouts, maximum payload limits, and more. - * - * Note: This configuration does not apply in a serverless deploy. - */ - -/** @type {import('fastify').FastifyServerOptions} */ -const config = { - requestTimeout: 15_000, - logger: { - // Note: If running locally using `yarn rw serve` you may want to adjust - // the default non-development level to `info` - level: process.env.NODE_ENV === 'development' ? 'debug' : 'warn', - }, -} - -/** - * You can also register Fastify plugins and additional routes for the API and Web sides - * in the configureFastify function. - * - * This function has access to the Fastify instance and options, such as the side - * (web, api, or proxy) that is being configured and other settings like the apiRootPath - * of the functions endpoint. - * - * Note: This configuration does not apply in a serverless deploy. - */ - -/** @type {import('@redwoodjs/api-server/dist/types').FastifySideConfigFn} */ -const configureFastify = async (fastify, options) => { - if (options.side === 'api') { - fastify.log.trace({ custom: { options } }, 'Configuring api side') - } - - if (options.side === 'web') { - fastify.log.trace({ custom: { options } }, 'Configuring web side') - } - - return fastify -} - -module.exports = { - config, - configureFastify, -} diff --git a/__fixtures__/test-project-rsa/api/src/directives/requireAuth/requireAuth.test.ts b/__fixtures__/test-project-rsa/api/src/directives/requireAuth/requireAuth.test.ts deleted file mode 100644 index 0f01aa367a85..000000000000 --- a/__fixtures__/test-project-rsa/api/src/directives/requireAuth/requireAuth.test.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { mockRedwoodDirective, getDirectiveName } from '@redwoodjs/testing/api' - -import requireAuth from './requireAuth' - -describe('requireAuth directive', () => { - it('declares the directive sdl as schema, with the correct name', () => { - expect(requireAuth.schema).toBeTruthy() - expect(getDirectiveName(requireAuth.schema)).toBe('requireAuth') - }) - - it('requireAuth has stub implementation. Should not throw when current user', () => { - // If you want to set values in context, pass it through e.g. - // mockRedwoodDirective(requireAuth, { context: { currentUser: { id: 1, name: 'Lebron McGretzky' } }}) - const mockExecution = mockRedwoodDirective(requireAuth, { context: {} }) - - expect(mockExecution).not.toThrowError() - }) -}) diff --git a/__fixtures__/test-project-rsa/api/src/directives/requireAuth/requireAuth.ts b/__fixtures__/test-project-rsa/api/src/directives/requireAuth/requireAuth.ts deleted file mode 100644 index 77b31a70ae07..000000000000 --- a/__fixtures__/test-project-rsa/api/src/directives/requireAuth/requireAuth.ts +++ /dev/null @@ -1,25 +0,0 @@ -import gql from 'graphql-tag' - -import type { ValidatorDirectiveFunc } from '@redwoodjs/graphql-server' -import { createValidatorDirective } from '@redwoodjs/graphql-server' - -import { requireAuth as applicationRequireAuth } from 'src/lib/auth' - -export const schema = gql` - """ - Use to check whether or not a user is authenticated and is associated - with an optional set of roles. - """ - directive @requireAuth(roles: [String]) on FIELD_DEFINITION -` - -type RequireAuthValidate = ValidatorDirectiveFunc<{ roles?: string[] }> - -const validate: RequireAuthValidate = ({ directiveArgs }) => { - const { roles } = directiveArgs - applicationRequireAuth({ roles }) -} - -const requireAuth = createValidatorDirective(schema, validate) - -export default requireAuth diff --git a/__fixtures__/test-project-rsa/api/src/directives/skipAuth/skipAuth.test.ts b/__fixtures__/test-project-rsa/api/src/directives/skipAuth/skipAuth.test.ts deleted file mode 100644 index 88d99a56eab2..000000000000 --- a/__fixtures__/test-project-rsa/api/src/directives/skipAuth/skipAuth.test.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { getDirectiveName } from '@redwoodjs/testing/api' - -import skipAuth from './skipAuth' - -describe('skipAuth directive', () => { - it('declares the directive sdl as schema, with the correct name', () => { - expect(skipAuth.schema).toBeTruthy() - expect(getDirectiveName(skipAuth.schema)).toBe('skipAuth') - }) -}) diff --git a/__fixtures__/test-project-rsa/api/src/directives/skipAuth/skipAuth.ts b/__fixtures__/test-project-rsa/api/src/directives/skipAuth/skipAuth.ts deleted file mode 100644 index e85b94ae8b89..000000000000 --- a/__fixtures__/test-project-rsa/api/src/directives/skipAuth/skipAuth.ts +++ /dev/null @@ -1,16 +0,0 @@ -import gql from 'graphql-tag' - -import { createValidatorDirective } from '@redwoodjs/graphql-server' - -export const schema = gql` - """ - Use to skip authentication checks and allow public access. - """ - directive @skipAuth on FIELD_DEFINITION -` - -const skipAuth = createValidatorDirective(schema, () => { - return -}) - -export default skipAuth diff --git a/__fixtures__/test-project-rsa/api/src/functions/graphql.ts b/__fixtures__/test-project-rsa/api/src/functions/graphql.ts deleted file mode 100644 index f395c3b0f852..000000000000 --- a/__fixtures__/test-project-rsa/api/src/functions/graphql.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { createGraphQLHandler } from '@redwoodjs/graphql-server' - -import directives from 'src/directives/**/*.{js,ts}' -import sdls from 'src/graphql/**/*.sdl.{js,ts}' -import services from 'src/services/**/*.{js,ts}' - -import { db } from 'src/lib/db' -import { logger } from 'src/lib/logger' - -export const handler = createGraphQLHandler({ - loggerConfig: { logger, options: {} }, - directives, - sdls, - services, - onException: () => { - // Disconnect from your database with an unhandled exception. - db.$disconnect() - }, -}) diff --git a/__fixtures__/test-project-rsa/api/src/graphql/.keep b/__fixtures__/test-project-rsa/api/src/graphql/.keep deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/__fixtures__/test-project-rsa/api/src/lib/auth.ts b/__fixtures__/test-project-rsa/api/src/lib/auth.ts deleted file mode 100644 index f98fe93a960c..000000000000 --- a/__fixtures__/test-project-rsa/api/src/lib/auth.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Once you are ready to add authentication to your application - * you'll build out requireAuth() with real functionality. For - * now we just return `true` so that the calls in services - * have something to check against, simulating a logged - * in user that is allowed to access that service. - * - * See https://redwoodjs.com/docs/authentication for more info. - */ -export const isAuthenticated = () => { - return true -} - -export const hasRole = ({ roles }) => { - return roles !== undefined -} - -// This is used by the redwood directive -// in ./api/src/directives/requireAuth - -// Roles are passed in by the requireAuth directive if you have auth setup -// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars -export const requireAuth = ({ roles }) => { - return isAuthenticated() -} diff --git a/__fixtures__/test-project-rsa/api/src/lib/db.ts b/__fixtures__/test-project-rsa/api/src/lib/db.ts deleted file mode 100644 index 5006d00aae49..000000000000 --- a/__fixtures__/test-project-rsa/api/src/lib/db.ts +++ /dev/null @@ -1,21 +0,0 @@ -// See https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/constructor -// for options. - -import { PrismaClient } from '@prisma/client' - -import { emitLogLevels, handlePrismaLogging } from '@redwoodjs/api/logger' - -import { logger } from './logger' - -/* - * Instance of the Prisma Client - */ -export const db = new PrismaClient({ - log: emitLogLevels(['info', 'warn', 'error']), -}) - -handlePrismaLogging({ - db, - logger, - logLevels: ['info', 'warn', 'error'], -}) diff --git a/__fixtures__/test-project-rsa/api/src/lib/logger.ts b/__fixtures__/test-project-rsa/api/src/lib/logger.ts deleted file mode 100644 index 150a309767c5..000000000000 --- a/__fixtures__/test-project-rsa/api/src/lib/logger.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { createLogger } from '@redwoodjs/api/logger' - -/** - * Creates a logger with RedwoodLoggerOptions - * - * These extend and override default LoggerOptions, - * can define a destination like a file or other supported pino log transport stream, - * and sets whether or not to show the logger configuration settings (defaults to false) - * - * @param RedwoodLoggerOptions - * - * RedwoodLoggerOptions have - * @param {options} LoggerOptions - defines how to log, such as redaction and format - * @param {string | DestinationStream} destination - defines where to log, such as a transport stream or file - * @param {boolean} showConfig - whether to display logger configuration on initialization - */ -export const logger = createLogger({}) diff --git a/__fixtures__/test-project-rsa/api/src/services/.keep b/__fixtures__/test-project-rsa/api/src/services/.keep deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/__fixtures__/test-project-rsa/api/tsconfig.json b/__fixtures__/test-project-rsa/api/tsconfig.json deleted file mode 100644 index fcbbf9872e43..000000000000 --- a/__fixtures__/test-project-rsa/api/tsconfig.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "compilerOptions": { - "noEmit": true, - "allowJs": true, - "esModuleInterop": true, - "target": "esnext", - "module": "esnext", - "moduleResolution": "node", - "skipLibCheck": false, - "baseUrl": "./", - "rootDirs": [ - "./src", - "../.redwood/types/mirror/api/src" - ], - "paths": { - "src/*": [ - "./src/*", - "../.redwood/types/mirror/api/src/*" - ], - "types/*": ["./types/*", "../types/*"], - "@redwoodjs/testing": ["../node_modules/@redwoodjs/testing/api"] - }, - "typeRoots": [ - "../node_modules/@types", - "./node_modules/@types" - ], - "types": ["jest"], - "jsx": "react-jsx" - }, - "include": [ - "src", - "../.redwood/types/includes/all-*", - "../.redwood/types/includes/api-*", - "../types" - ] -} diff --git a/__fixtures__/test-project-rsa/graphql.config.js b/__fixtures__/test-project-rsa/graphql.config.js deleted file mode 100644 index 2da7862f6b57..000000000000 --- a/__fixtures__/test-project-rsa/graphql.config.js +++ /dev/null @@ -1,5 +0,0 @@ -const { getPaths } = require('@redwoodjs/internal') - -module.exports = { - schema: getPaths().generated.schema, -} diff --git a/__fixtures__/test-project-rsa/jest.config.js b/__fixtures__/test-project-rsa/jest.config.js deleted file mode 100644 index c6b395cb762a..000000000000 --- a/__fixtures__/test-project-rsa/jest.config.js +++ /dev/null @@ -1,8 +0,0 @@ -// This the Redwood root jest config -// Each side, e.g. ./web/ and ./api/ has specific config that references this root -// More info at https://redwoodjs.com/docs/project-configuration-dev-test-build - -module.exports = { - rootDir: '.', - projects: ['/{*,!(node_modules)/**/}/jest.config.js'], -} diff --git a/__fixtures__/test-project-rsa/package.json b/__fixtures__/test-project-rsa/package.json deleted file mode 100644 index d40992f2f0ac..000000000000 --- a/__fixtures__/test-project-rsa/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "private": true, - "workspaces": { - "packages": [ - "api", - "web" - ] - }, - "devDependencies": { - "@redwoodjs/core": "7.0.0-canary.717" - }, - "eslintConfig": { - "extends": "@redwoodjs/eslint-config", - "root": true - }, - "engines": { - "node": "=20.x" - }, - "prisma": { - "seed": "yarn rw exec seed" - }, - "packageManager": "yarn@4.0.2", - "resolutions": { - "vite@4.4.9": "patch:vite@npm%3A4.4.9#./.yarn/patches/vite-npm-4.4.9-e845c1bbf8.patch" - } -} diff --git a/__fixtures__/test-project-rsa/prettier.config.js b/__fixtures__/test-project-rsa/prettier.config.js deleted file mode 100644 index 45058f7aa2a8..000000000000 --- a/__fixtures__/test-project-rsa/prettier.config.js +++ /dev/null @@ -1,18 +0,0 @@ -// https://prettier.io/docs/en/options.html -/** @type {import('prettier').RequiredOptions} */ -module.exports = { - trailingComma: 'es5', - bracketSpacing: true, - tabWidth: 2, - semi: false, - singleQuote: true, - arrowParens: 'always', - overrides: [ - { - files: 'Routes.*', - options: { - printWidth: 999, - }, - }, - ], -} diff --git a/__fixtures__/test-project-rsa/redwood.toml b/__fixtures__/test-project-rsa/redwood.toml deleted file mode 100644 index 33d327b98f4c..000000000000 --- a/__fixtures__/test-project-rsa/redwood.toml +++ /dev/null @@ -1,27 +0,0 @@ -# This file contains the configuration settings for your Redwood app. -# This file is also what makes your Redwood app a Redwood app. -# If you remove it and try to run `yarn rw dev`, you'll get an error. -# -# For the full list of options, see the "App Configuration: redwood.toml" doc: -# https://redwoodjs.com/docs/app-configuration-redwood-toml - -[web] - title = "Redwood App" - port = 8910 - apiUrl = "/.redwood/functions" # You can customize graphql and dbauth urls individually too: see https://redwoodjs.com/docs/app-configuration-redwood-toml#api-paths - includeEnvironmentVariables = [ - # Add any ENV vars that should be available to the web side to this array - # See https://redwoodjs.com/docs/environment-variables#web - ] -[api] - port = 8911 -[browser] - open = true -[notifications] - versionUpdates = ["latest"] - -[experimental.streamingSsr] - enabled = true - -[experimental.rsc] - enabled = true diff --git a/__fixtures__/test-project-rsa/scripts/.keep b/__fixtures__/test-project-rsa/scripts/.keep deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/__fixtures__/test-project-rsa/scripts/seed.ts b/__fixtures__/test-project-rsa/scripts/seed.ts deleted file mode 100644 index 5797fd9426c1..000000000000 --- a/__fixtures__/test-project-rsa/scripts/seed.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type { Prisma } from '@prisma/client' -import { db } from 'api/src/lib/db' - -export default async () => { - try { - // - // Manually seed via `yarn rw prisma db seed` - // Seeds automatically with `yarn rw prisma migrate dev` and `yarn rw prisma migrate reset` - // - // Update "const data = []" to match your data model and seeding needs - // - const data: Prisma.UserExampleCreateArgs['data'][] = [ - // To try this example data with the UserExample model in schema.prisma, - // uncomment the lines below and run 'yarn rw prisma migrate dev' - // - // { name: 'alice', email: 'alice@example.com' }, - // { name: 'mark', email: 'mark@example.com' }, - // { name: 'jackie', email: 'jackie@example.com' }, - // { name: 'bob', email: 'bob@example.com' }, - ] - console.log( - "\nUsing the default './scripts/seed.{js,ts}' template\nEdit the file to add seed data\n" - ) - - // Note: if using PostgreSQL, using `createMany` to insert multiple records is much faster - // @see: https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#createmany - Promise.all( - // - // Change to match your data model and seeding needs - // - data.map(async (data: Prisma.UserExampleCreateArgs['data']) => { - const record = await db.userExample.create({ data }) - console.log(record) - }) - ) - - // If using dbAuth and seeding users, you'll need to add a `hashedPassword` - // and associated `salt` to their record. Here's how to create them using - // the same algorithm that dbAuth uses internally: - // - // import { hashPassword } from '@redwoodjs/auth-dbauth-api' - // - // const users = [ - // { name: 'john', email: 'john@example.com', password: 'secret1' }, - // { name: 'jane', email: 'jane@example.com', password: 'secret2' } - // ] - // - // for (const user of users) { - // const [hashedPassword, salt] = hashPassword(user.password) - // await db.user.create({ - // data: { - // name: user.name, - // email: user.email, - // hashedPassword, - // salt - // } - // }) - // } - } catch (error) { - console.warn('Please define your seed data.') - console.error(error) - } -} diff --git a/__fixtures__/test-project-rsa/scripts/tsconfig.json b/__fixtures__/test-project-rsa/scripts/tsconfig.json deleted file mode 100644 index babc7c436be6..000000000000 --- a/__fixtures__/test-project-rsa/scripts/tsconfig.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "compilerOptions": { - "noEmit": true, - "allowJs": true, - "esModuleInterop": true, - "target": "esnext", - "module": "esnext", - "moduleResolution": "node", - "baseUrl": "./", - "paths": { - "$api/*": [ - "../api/*" - ], - "api/*": [ - "../api/*" - ], - "$web/*": [ - "../web/*" - ], - "web/*": [ - "../web/*" - ], - "$web/src/*": [ - "../web/src/*", - "../.redwood/types/mirror/web/src/*" - ], - "web/src/*": [ - "../web/src/*", - "../.redwood/types/mirror/web/src/*" - ], - "types/*": ["../types/*", "../web/types/*", "../api/types/*"] - }, - "typeRoots": ["../node_modules/@types"], - "jsx": "preserve" - }, - "include": [ - ".", - "../.redwood/types/includes/all-*", - "../.redwood/types/includes/web-*", - "../types" - ] -} diff --git a/__fixtures__/test-project-rsa/web/jest.config.js b/__fixtures__/test-project-rsa/web/jest.config.js deleted file mode 100644 index 0e54869ebdcb..000000000000 --- a/__fixtures__/test-project-rsa/web/jest.config.js +++ /dev/null @@ -1,8 +0,0 @@ -// More info at https://redwoodjs.com/docs/project-configuration-dev-test-build - -const config = { - rootDir: '../', - preset: '@redwoodjs/testing/config/jest/web', -} - -module.exports = config diff --git a/__fixtures__/test-project-rsa/web/package.json b/__fixtures__/test-project-rsa/web/package.json deleted file mode 100644 index 6dac2b3ab8c2..000000000000 --- a/__fixtures__/test-project-rsa/web/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "web", - "version": "0.0.0", - "private": true, - "browserslist": { - "development": [ - "last 1 version" - ], - "production": [ - "defaults" - ] - }, - "dependencies": { - "@redwoodjs/forms": "7.0.0-canary.717", - "@redwoodjs/router": "7.0.0-canary.717", - "@redwoodjs/web": "7.0.0-canary.717", - "react": "0.0.0-experimental-e5205658f-20230913", - "react-dom": "0.0.0-experimental-e5205658f-20230913" - }, - "devDependencies": { - "@redwoodjs/vite": "7.0.0-canary.717" - } -} diff --git a/__fixtures__/test-project-rsa/web/public/README.md b/__fixtures__/test-project-rsa/web/public/README.md deleted file mode 100644 index 618395f02033..000000000000 --- a/__fixtures__/test-project-rsa/web/public/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Static Assets -Use this folder to add static files directly to your app. All included files and folders will be copied directly into the `/dist` folder (created when Vite builds for production). They will also be available during development when you run `yarn rw dev`. ->Note: files will *not* hot reload while the development server is running. You'll need to manually stop/start to access file changes. - -### Example Use -A file like `favicon.png` will be copied to `/dist/favicon.png`. A folder containing a file such as `static-files/my-logo.jpg` will be copied to `/dist/static-files/my-logo.jpg`. These can be referenced in your code directly without any special handling, e.g. -``` - -``` -and -``` - alt="Logo" /> -``` - - -## Best Practices -Because assets in this folder are bypassing the javascript module system, **this folder should be used sparingly** for assets such as favicons, robots.txt, manifests, libraries incompatible with Vite, etc. - -In general, it's best to import files directly into a template, page, or component. This allows Vite to include that file in the bundle when small enough, or to copy it over to the `dist` folder with a hash. - -### Example Asset Import with Vite -Instead of handling our logo image as a static file per the example above, we can do the following: -``` -import React from "react" -import logo from "./my-logo.jpg" - - -function Header() { - return Logo -} - -export default Header -``` - -See Vite's docs for [static asset handling](https://vitejs.dev/guide/assets.html) diff --git a/__fixtures__/test-project-rsa/web/public/favicon.png b/__fixtures__/test-project-rsa/web/public/favicon.png deleted file mode 100644 index 47414294173cb0795dcafb8813599fc382282556..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1741 zcmV;;1~U1HP)u3dvWaK1Jt7p7xtk~lm38V(vb%~9EcN4itP(!;||l>?RBBL}g^A8<`Fn z=_ofw?w2~Qt#0f9Ac3O;;Nt1}TFWmPb1YZ9hDBXZ zTK55jh;jRpRArCUs~@6m!BMLSuZE&5;HTqrDc^;f)?K|FaV6o1RTFbt+uA;);7z?5 z9axBZCgX!V;dhWl*HZCE&V7oz;oZ;*lOh^wZ2aYlLI<1rXkc0&HH!|5!S0|*s- zM*~yi#Ef4dES_G+_-z+`S<%x__Ulk8{Z?I!;wv8DmN?3t1H$+fJ*q^w!} z8`oOx{i(WL4oLgKN0~^gQyJ3t#+tnIhR=h}6@BVu1&_1g7*O6j$-5z)KLsPi3dqCH zq+n<+)2a$Afvr|B97(#s5f6-oU6qYHP<2rWEKfC)aEc=?j9nPwEyIiT4XCI%BScNpoU1Cro6M@BSt>YU4@z^JQPbj- zbMl0tf(CkBNTVH0run?8E#6lyouay;Bf8|_ud%WyA2Dkqc}nAEGkyiO!|#6>OX~jC z_3u?iQ>Xm%XNGGb_3~zzqyj(lHYRC##{sV_zNQl$KP40jQHRR#WeJ!akxfaL;HU(y z@6A7KA;pjflPx?{&_wwQ<6?f(Uld(h*XSf+Ct`QR3EDfau;y#nNiKfJ`Ny24=O+_9 z{chAh!5R0T(`<1ayxDvCtBZ?9Rn)QBoddzqchGPN4C8rB2tQ(*#m6zlySN7XwxM)X zNo%g}Q*?B_&%_K;!PvNxj9-D>BYn6zcIb@VGE=-?gP+zjpQ4x$*@_cm*TL-MtWeV+ z%v$Vh+2e#jDJ4Yc3NPgE9Uhr~V;6)j#bgMC+5!L2yYdX5ef->+k9d_?db{`}fWW+F zU&GKd9pW?cv0e8pA%20doi=OgaTV=dLOHx7cgAQlYDkLWaAUksGbO`Z7+>qo}~5K=?ZI!b@vaF5}r7- zyP2aiwSn}KbwGhrQ0A?W4L_Jwg?C#vAElLzpK~}}&ny0d@_GVhUqVEfXX9}XI8%B; z;BYTG$dM}6WS8urD4fqn$733@mNss6jB7yHY*76e*L=X6apM|Dgg^tZhpge9{Ojy9 z{Sl&x=vUbHU+7KFQEas^U*jQ8^rj_XAzI=0y_Nmx3ChT&K?_-b!N10g5+C9TqMGZ@!a>mh#`}nJM>Cu2v@32F*rQ(x05Xb64 zV-ML!u$4W31M7A@mi~3fnSOQSZ->>TC+02Mt+0csMl0*2TCklB$VOH11pW{4 zD1)V+^h4n@OYlO&;Z!-dk{(LVtA%;(o#!>jYgG>s%eL0iXx~jJsrfL3rwo;cc52kP zRnvwZId>`-FV`PUvUKk4gU&nzX&+gTEm1bNsCdaXc zvaOny-3X43Fs?Jn;>*U?jaR1`9KIVP?p(?ulraQZc;T0UKos^SChGJoJYVu1%?E0v zDGNOfZKPrPKtyFYEU~bZZ~rB{4X2ko>_VJlJw3rw-!>TIT6R!3;POq5yNZdnfu$Ao j!CVlN4fQVi0D=DiS&&%ubg+{I00000NkvXXu0mjf8bDG2 diff --git a/__fixtures__/test-project-rsa/web/public/robots.txt b/__fixtures__/test-project-rsa/web/public/robots.txt deleted file mode 100644 index eb0536286f30..000000000000 --- a/__fixtures__/test-project-rsa/web/public/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -User-agent: * -Disallow: diff --git a/__fixtures__/test-project-rsa/web/src/App.tsx b/__fixtures__/test-project-rsa/web/src/App.tsx deleted file mode 100644 index 27cb83121ff7..000000000000 --- a/__fixtures__/test-project-rsa/web/src/App.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { FatalErrorBoundary, RedwoodProvider } from '@redwoodjs/web' -import { RedwoodApolloProvider } from '@redwoodjs/web/apollo' - -import FatalErrorPage from './pages/FatalErrorPage/FatalErrorPage' -import Routes from './Routes' - -import './index.css' - -const App = () => ( - - - - - - - -) - -export default App diff --git a/__fixtures__/test-project-rsa/web/src/Counter.css b/__fixtures__/test-project-rsa/web/src/Counter.css deleted file mode 100644 index 4cbd74d7d5b6..000000000000 --- a/__fixtures__/test-project-rsa/web/src/Counter.css +++ /dev/null @@ -1,7 +0,0 @@ -/** - * This should affect all h3 elements on the page, both server components and - * client components. This is just standard CSS stuff - */ -h3 { - color: orange; -} diff --git a/__fixtures__/test-project-rsa/web/src/Counter.module.css b/__fixtures__/test-project-rsa/web/src/Counter.module.css deleted file mode 100644 index 736b0da8688c..000000000000 --- a/__fixtures__/test-project-rsa/web/src/Counter.module.css +++ /dev/null @@ -1,3 +0,0 @@ -.header { - font-style: italic; -} diff --git a/__fixtures__/test-project-rsa/web/src/Counter.tsx b/__fixtures__/test-project-rsa/web/src/Counter.tsx deleted file mode 100644 index a6e38c4059b5..000000000000 --- a/__fixtures__/test-project-rsa/web/src/Counter.tsx +++ /dev/null @@ -1,19 +0,0 @@ -'use client' - -import React from 'react' - -// @ts-expect-error no types -import styles from './Counter.module.css' -import './Counter.css' - -export const Counter = () => { - const [count, setCount] = React.useState(0) - - return ( -
-

Count: {count}

- -

This is a client component.

-
- ) -} diff --git a/__fixtures__/test-project-rsa/web/src/Document.tsx b/__fixtures__/test-project-rsa/web/src/Document.tsx deleted file mode 100644 index f989f217529b..000000000000 --- a/__fixtures__/test-project-rsa/web/src/Document.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react' - -import { Css, Meta } from '@redwoodjs/web' -import type { TagDescriptor } from '@redwoodjs/web' - -interface DocumentProps { - children: React.ReactNode - css: string[] // array of css import strings - meta?: TagDescriptor[] -} - -export const Document: React.FC = ({ children, css, meta }) => { - return ( - - - - - - - - - -
{children}
- - - ) -} diff --git a/__fixtures__/test-project-rsa/web/src/Routes.tsx b/__fixtures__/test-project-rsa/web/src/Routes.tsx deleted file mode 100644 index 89a1df33eef0..000000000000 --- a/__fixtures__/test-project-rsa/web/src/Routes.tsx +++ /dev/null @@ -1,31 +0,0 @@ -// In this file, all Page components from 'src/pages` are auto-imported. Nested -// directories are supported, and should be uppercase. Each subdirectory will be -// prepended onto the component name. -// -// Examples: -// -// 'src/pages/HomePage/HomePage.js' -> HomePage -// 'src/pages/Admin/BooksPage/BooksPage.js' -> AdminBooksPage - -import { Router, Route, Set } from '@redwoodjs/router' -import { serve } from '@redwoodjs/vite/client' - -import NavigationLayout from './layouts/NavigationLayout/NavigationLayout' -import NotFoundPage from './pages/NotFoundPage/NotFoundPage' - -const AboutPage = serve('AboutPage') -const HomePage = serve('HomePage') - -const Routes = () => { - return ( - - - - - - - - ) -} - -export default Routes diff --git a/__fixtures__/test-project-rsa/web/src/components/.keep b/__fixtures__/test-project-rsa/web/src/components/.keep deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/__fixtures__/test-project-rsa/web/src/components/Counter/AboutCounter.tsx b/__fixtures__/test-project-rsa/web/src/components/Counter/AboutCounter.tsx deleted file mode 100644 index c86915e87f8b..000000000000 --- a/__fixtures__/test-project-rsa/web/src/components/Counter/AboutCounter.tsx +++ /dev/null @@ -1,20 +0,0 @@ -'use client' - -import React from 'react' - -// @ts-expect-error no types -import styles from './Counter.module.css' -import './Counter.css' - -export const AboutCounter = () => { - const [count, setCount] = React.useState(0) - - return ( -
-

Count: {count}

- -

This is a client component.

-

RSC on client: {globalThis.RWJS_EXP_RSC ? 'enabled' : 'disabled'}

-
- ) -} diff --git a/__fixtures__/test-project-rsa/web/src/components/Counter/Counter.css b/__fixtures__/test-project-rsa/web/src/components/Counter/Counter.css deleted file mode 100644 index 4cbd74d7d5b6..000000000000 --- a/__fixtures__/test-project-rsa/web/src/components/Counter/Counter.css +++ /dev/null @@ -1,7 +0,0 @@ -/** - * This should affect all h3 elements on the page, both server components and - * client components. This is just standard CSS stuff - */ -h3 { - color: orange; -} diff --git a/__fixtures__/test-project-rsa/web/src/components/Counter/Counter.module.css b/__fixtures__/test-project-rsa/web/src/components/Counter/Counter.module.css deleted file mode 100644 index 736b0da8688c..000000000000 --- a/__fixtures__/test-project-rsa/web/src/components/Counter/Counter.module.css +++ /dev/null @@ -1,3 +0,0 @@ -.header { - font-style: italic; -} diff --git a/__fixtures__/test-project-rsa/web/src/components/Counter/Counter.tsx b/__fixtures__/test-project-rsa/web/src/components/Counter/Counter.tsx deleted file mode 100644 index 5f21e7cdac2d..000000000000 --- a/__fixtures__/test-project-rsa/web/src/components/Counter/Counter.tsx +++ /dev/null @@ -1,21 +0,0 @@ -'use client' - -import React from 'react' - -import 'client-only' - -// @ts-expect-error no types -import styles from './Counter.module.css' -import './Counter.css' - -export const Counter = () => { - const [count, setCount] = React.useState(0) - - return ( -
-

Count: {count}

- -

This is a client component.

-
- ) -} diff --git a/__fixtures__/test-project-rsa/web/src/entries.ts b/__fixtures__/test-project-rsa/web/src/entries.ts deleted file mode 100644 index 6259057e245b..000000000000 --- a/__fixtures__/test-project-rsa/web/src/entries.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { defineEntries } from '@redwoodjs/vite/entries' - -export default defineEntries( - // getEntry - async (id) => { - switch (id) { - case 'AboutPage': - return import('./pages/AboutPage/AboutPage') - case 'HomePage': - return import('./pages/HomePage/HomePage') - default: - return null - } - } -) diff --git a/__fixtures__/test-project-rsa/web/src/entry.client.tsx b/__fixtures__/test-project-rsa/web/src/entry.client.tsx deleted file mode 100644 index d55036f35465..000000000000 --- a/__fixtures__/test-project-rsa/web/src/entry.client.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { hydrateRoot, createRoot } from 'react-dom/client' - -import App from './App' -/** - * When `#redwood-app` isn't empty then it's very likely that you're using - * prerendering. So React attaches event listeners to the existing markup - * rather than replacing it. - * https://reactjs.org/docs/react-dom-client.html#hydrateroot - */ -const redwoodAppElement = document.getElementById('redwood-app') - -if (!redwoodAppElement) { - throw new Error( - "Could not find an element with ID 'redwood-app'. Please ensure it exists in your 'web/src/index.html' file." - ) -} - -if (redwoodAppElement.children?.length > 0) { - hydrateRoot(redwoodAppElement, ) -} else { - const root = createRoot(redwoodAppElement) - root.render() -} diff --git a/__fixtures__/test-project-rsa/web/src/entry.server.tsx b/__fixtures__/test-project-rsa/web/src/entry.server.tsx deleted file mode 100644 index a52b268b771d..000000000000 --- a/__fixtures__/test-project-rsa/web/src/entry.server.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import App from './App' -import { Document } from './Document' - -interface Props { - css: string[] - meta?: any[] -} - -export const ServerEntry: React.FC = ({ css, meta }) => { - return ( - - - - ) -} diff --git a/__fixtures__/test-project-rsa/web/src/index.css b/__fixtures__/test-project-rsa/web/src/index.css deleted file mode 100644 index 57c14ee231a9..000000000000 --- a/__fixtures__/test-project-rsa/web/src/index.css +++ /dev/null @@ -1,4 +0,0 @@ -html, body { - margin: 0; - padding: 0; -} diff --git a/__fixtures__/test-project-rsa/web/src/index.html b/__fixtures__/test-project-rsa/web/src/index.html deleted file mode 100644 index 6b3b066be037..000000000000 --- a/__fixtures__/test-project-rsa/web/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - -
- - - diff --git a/__fixtures__/test-project-rsa/web/src/layouts/.keep b/__fixtures__/test-project-rsa/web/src/layouts/.keep deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/__fixtures__/test-project-rsa/web/src/layouts/NavigationLayout/NavigationLayout.css b/__fixtures__/test-project-rsa/web/src/layouts/NavigationLayout/NavigationLayout.css deleted file mode 100644 index a3e7be665c31..000000000000 --- a/__fixtures__/test-project-rsa/web/src/layouts/NavigationLayout/NavigationLayout.css +++ /dev/null @@ -1,32 +0,0 @@ -.navigation-layout { - & nav { - display: flex; - justify-content: space-between; - align-items: center; - padding: 10px; - background-color: color-mix(in srgb, yellow 50%, transparent); - border-bottom: 2px dashed color-mix(in srgb, yellow 90%, black); - } - - & ul { - list-style: none; - display: flex; - margin: 0; - padding: 0; - } - - & li { - margin-right: 10px; - } - - & a { - text-decoration: none; - color: #333; - padding: 5px; - border-bottom: 2px solid transparent; - } - - & a:hover { - border-bottom: 2px solid #333; - } -} diff --git a/__fixtures__/test-project-rsa/web/src/layouts/NavigationLayout/NavigationLayout.stories.tsx b/__fixtures__/test-project-rsa/web/src/layouts/NavigationLayout/NavigationLayout.stories.tsx deleted file mode 100644 index 4ec5ddf88eb3..000000000000 --- a/__fixtures__/test-project-rsa/web/src/layouts/NavigationLayout/NavigationLayout.stories.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import type { Meta, StoryObj } from '@storybook/react' - -import NavigationLayout from './NavigationLayout' - -const meta: Meta = { - component: NavigationLayout, -} - -export default meta - -type Story = StoryObj - -export const Primary: Story = {} diff --git a/__fixtures__/test-project-rsa/web/src/layouts/NavigationLayout/NavigationLayout.test.tsx b/__fixtures__/test-project-rsa/web/src/layouts/NavigationLayout/NavigationLayout.test.tsx deleted file mode 100644 index 74fff5fc1509..000000000000 --- a/__fixtures__/test-project-rsa/web/src/layouts/NavigationLayout/NavigationLayout.test.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { render } from '@redwoodjs/testing/web' - -import NavigationLayout from './NavigationLayout' - -// Improve this test with help from the Redwood Testing Doc: -// https://redwoodjs.com/docs/testing#testing-pages-layouts - -describe('NavigationLayout', () => { - it('renders successfully', () => { - expect(() => { - render() - }).not.toThrow() - }) -}) diff --git a/__fixtures__/test-project-rsa/web/src/layouts/NavigationLayout/NavigationLayout.tsx b/__fixtures__/test-project-rsa/web/src/layouts/NavigationLayout/NavigationLayout.tsx deleted file mode 100644 index 4f13e197309a..000000000000 --- a/__fixtures__/test-project-rsa/web/src/layouts/NavigationLayout/NavigationLayout.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { Link, routes } from '@redwoodjs/router' - -import './NavigationLayout.css' - -type NavigationLayoutProps = { - children?: React.ReactNode -} - -const NavigationLayout = ({ children }: NavigationLayoutProps) => { - return ( -
- -
{children}
-
- ) -} - -export default NavigationLayout diff --git a/__fixtures__/test-project-rsa/web/src/pages/AboutPage/AboutPage.css b/__fixtures__/test-project-rsa/web/src/pages/AboutPage/AboutPage.css deleted file mode 100644 index 995b3bbde1e0..000000000000 --- a/__fixtures__/test-project-rsa/web/src/pages/AboutPage/AboutPage.css +++ /dev/null @@ -1,2 +0,0 @@ -.about-page { -} diff --git a/__fixtures__/test-project-rsa/web/src/pages/AboutPage/AboutPage.tsx b/__fixtures__/test-project-rsa/web/src/pages/AboutPage/AboutPage.tsx deleted file mode 100644 index 2706e12e63db..000000000000 --- a/__fixtures__/test-project-rsa/web/src/pages/AboutPage/AboutPage.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { Assets } from '@redwoodjs/vite/assets' -import { ProdRwRscServerGlobal } from '@redwoodjs/vite/rwRscGlobal' - -import { AboutCounter } from '../../components/Counter/AboutCounter' - -import './AboutPage.css' - -// TODO (RSC) Something like this will probably be needed -// const RwRscGlobal = import.meta.env.PROD ? ProdRwRscServerGlobal : DevRwRscServerGlobal; - -globalThis.rwRscGlobal = new ProdRwRscServerGlobal() - -const AboutPage = () => { - return ( -
- {/* TODO (RSC) should be part of the router later */} - -
-

About Redwood

- -

RSC on server: {globalThis.RWJS_EXP_RSC ? 'enabled' : 'disabled'}

-
-
- ) -} - -export default AboutPage diff --git a/__fixtures__/test-project-rsa/web/src/pages/FatalErrorPage/FatalErrorPage.tsx b/__fixtures__/test-project-rsa/web/src/pages/FatalErrorPage/FatalErrorPage.tsx deleted file mode 100644 index b2bb436f8ed0..000000000000 --- a/__fixtures__/test-project-rsa/web/src/pages/FatalErrorPage/FatalErrorPage.tsx +++ /dev/null @@ -1,57 +0,0 @@ -// This page will be rendered when an error makes it all the way to the top of the -// application without being handled by a Javascript catch statement or React error -// boundary. -// -// You can modify this page as you wish, but it is important to keep things simple to -// avoid the possibility that it will cause its own error. If it does, Redwood will -// still render a generic error page, but your users will prefer something a bit more -// thoughtful :) - -// This import will be automatically removed when building for production -import { DevFatalErrorPage } from '@redwoodjs/web/dist/components/DevFatalErrorPage' - -export default DevFatalErrorPage || - (() => ( -
-