From c10f94b86f5c22ef003c54ac437a27367d4dac59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Wed, 15 Feb 2023 22:19:45 +0100 Subject: [PATCH] chore: remove `entry.{client,server}` from examples --- __template/app/entry.client.tsx | 21 ---- __template/app/entry.server.tsx | 110 ------------------ _official-blog-tutorial/app/entry.client.tsx | 21 ---- _official-blog-tutorial/app/entry.server.tsx | 110 ------------------ _official-jokes/app/entry.client.tsx | 21 ---- _official-jokes/app/entry.server.tsx | 110 ------------------ _official-realtime-app/app/entry.client.tsx | 21 ---- _official-realtime-app/app/entry.server.tsx | 110 ------------------ basic/app/entry.client.tsx | 21 ---- basic/app/entry.server.tsx | 110 ------------------ bullmq-task-queue/app/entry.client.tsx | 21 ---- bullmq-task-queue/app/entry.server.tsx | 110 ------------------ catch-boundary/app/entry.client.tsx | 21 ---- catch-boundary/app/entry.server.tsx | 110 ------------------ client-only-components/app/entry.client.tsx | 21 ---- client-only-components/app/entry.server.tsx | 110 ------------------ client-side-validation/app/entry.client.tsx | 21 ---- client-side-validation/app/entry.server.tsx | 110 ------------------ collected-notes/app/entry.client.tsx | 21 ---- collected-notes/app/entry.server.tsx | 110 ------------------ combobox-resource-route/app/entry.client.tsx | 21 ---- combobox-resource-route/app/entry.server.tsx | 110 ------------------ dark-mode/app/entry.client.tsx | 21 ---- dark-mode/app/entry.server.tsx | 110 ------------------ dataloader/app/entry.client.tsx | 21 ---- dataloader/app/entry.server.tsx | 110 ------------------ .../app/entry.client.tsx | 21 ---- .../app/entry.server.tsx | 110 ------------------ file-and-s3-upload/app/entry.client.tsx | 21 ---- file-and-s3-upload/app/entry.server.tsx | 110 ------------------ firebase/app/entry.client.tsx | 21 ---- firebase/app/entry.server.tsx | 110 ------------------ form-to-notion-db/app/entry.client.tsx | 21 ---- form-to-notion-db/app/entry.server.tsx | 110 ------------------ framer-motion/app/entry.client.tsx | 21 ---- framer-motion/app/entry.server.tsx | 110 ------------------ framer-route-animation/app/entry.client.tsx | 21 ---- framer-route-animation/app/entry.server.tsx | 110 ------------------ gdpr-cookie-consent/app/entry.client.tsx | 21 ---- gdpr-cookie-consent/app/entry.server.tsx | 110 ------------------ google-analytics/app/entry.client.tsx | 21 ---- google-analytics/app/entry.server.tsx | 110 ------------------ graphql-api/app/entry.client.tsx | 21 ---- graphql-api/app/entry.server.tsx | 110 ------------------ image-resize/app/entry.client.tsx | 21 ---- image-resize/app/entry.server.tsx | 110 ------------------ infinite-scrolling/app/entry.client.tsx | 21 ---- infinite-scrolling/app/entry.server.tsx | 110 ------------------ io-ts-formdata-decoding/app/entry.client.tsx | 21 ---- io-ts-formdata-decoding/app/entry.server.tsx | 110 ------------------ ioredis/app/entry.client.tsx | 21 ---- ioredis/app/entry.server.tsx | 110 ------------------ leaflet/app/entry.client.tsx | 21 ---- leaflet/app/entry.server.tsx | 110 ------------------ mantine/app/entry.client.tsx | 21 ---- msw/app/entry.client.tsx | 21 ---- msw/app/entry.server.tsx | 110 ------------------ multiple-forms/app/entry.client.tsx | 21 ---- multiple-forms/app/entry.server.tsx | 110 ------------------ multiple-params/app/entry.client.tsx | 21 ---- multiple-params/app/entry.server.tsx | 110 ------------------ newsletter-signup/app/entry.client.tsx | 21 ---- newsletter-signup/app/entry.server.tsx | 110 ------------------ nprogress/app/entry.client.tsx | 21 ---- nprogress/app/entry.server.tsx | 110 ------------------ on-demand-hydration/app/entry.client.tsx | 21 ---- on-demand-hydration/app/entry.server.tsx | 110 ------------------ outlet-form-rerender/app/entry.client.tsx | 21 ---- outlet-form-rerender/app/entry.server.tsx | 110 ------------------ pathless-routes/app/entry.client.tsx | 21 ---- pathless-routes/app/entry.server.tsx | 110 ------------------ playwright/app/entry.client.tsx | 21 ---- playwright/app/entry.server.tsx | 110 ------------------ pm-app/app/entry.client.tsx | 21 ---- pm-app/app/entry.server.tsx | 110 ------------------ quirrel/app/entry.client.tsx | 21 ---- quirrel/app/entry.server.tsx | 110 ------------------ react-quill/app/entry.client.tsx | 21 ---- react-quill/app/entry.server.tsx | 110 ------------------ react-spring/app/entry.client.tsx | 21 ---- react-spring/app/entry.server.tsx | 110 ------------------ redis-upstash-session/app/entry.client.tsx | 21 ---- redis-upstash-session/app/entry.server.tsx | 110 ------------------ remix-auth-auth0/app/entry.client.tsx | 21 ---- remix-auth-auth0/app/entry.server.tsx | 110 ------------------ remix-auth-form/app/entry.client.tsx | 21 ---- remix-auth-form/app/entry.server.tsx | 110 ------------------ remix-auth-github/app/entry.client.tsx | 21 ---- remix-auth-github/app/entry.server.tsx | 110 ------------------ .../app/entry.client.tsx | 21 ---- .../app/entry.server.tsx | 110 ------------------ remix-auth-supabase/app/entry.client.tsx | 21 ---- remix-auth-supabase/app/entry.server.tsx | 110 ------------------ route-modal/app/entry.client.tsx | 21 ---- route-modal/app/entry.server.tsx | 110 ------------------ routes-gen/app/entry.client.tsx | 21 ---- routes-gen/app/entry.server.tsx | 110 ------------------ rust/app/entry.client.tsx | 21 ---- rust/app/entry.server.tsx | 110 ------------------ sanity/app/entry.client.tsx | 21 ---- sanity/app/entry.server.tsx | 110 ------------------ sass/app/entry.client.tsx | 21 ---- sass/app/entry.server.tsx | 110 ------------------ search-input/app/entry.client.tsx | 21 ---- search-input/app/entry.server.tsx | 110 ------------------ session-flash/app/entry.client.tsx | 21 ---- session-flash/app/entry.server.tsx | 110 ------------------ sharing-loader-data/app/entry.client.tsx | 21 ---- sharing-loader-data/app/entry.server.tsx | 110 ------------------ socket.io/app/entry.client.tsx | 21 ---- socket.io/app/entry.server.tsx | 110 ------------------ sse-chat/app/entry.client.tsx | 21 ---- sse-chat/app/entry.server.tsx | 110 ------------------ sse-counter/app/entry.client.tsx | 21 ---- sse-counter/app/entry.server.tsx | 110 ------------------ strapi/app/entry.client.tsx | 21 ---- strapi/app/entry.server.tsx | 110 ------------------ stripe-integration/app/entry.client.tsx | 21 ---- stripe-integration/app/entry.server.tsx | 110 ------------------ supabase-subscription/app/entry.client.tsx | 21 ---- supabase-subscription/app/entry.server.tsx | 110 ------------------ tailwindcss/app/entry.client.tsx | 21 ---- tailwindcss/app/entry.server.tsx | 110 ------------------ tiptap-collab-editing/app/entry.client.tsx | 21 ---- tiptap-collab-editing/app/entry.server.tsx | 110 ------------------ toast-message/app/entry.client.tsx | 21 ---- toast-message/app/entry.server.tsx | 110 ------------------ .../apps/remix-app/app/entry.client.tsx | 21 ---- twind/app/entry.client.tsx | 21 ---- unocss/app/entry.client.tsx | 21 ---- unocss/app/entry.server.tsx | 110 ------------------ usematches-loader-data/app/entry.client.tsx | 21 ---- usematches-loader-data/app/entry.server.tsx | 110 ------------------ vanilla-extract/app/entry.client.tsx | 21 ---- vanilla-extract/app/entry.server.tsx | 110 ------------------ xata/app/entry.client.tsx | 21 ---- xata/app/entry.server.tsx | 110 ------------------ yarn-pnp/app/entry.client.tsx | 21 ---- yarn-pnp/app/entry.server.tsx | 110 ------------------ 139 files changed, 8971 deletions(-) delete mode 100644 __template/app/entry.client.tsx delete mode 100644 __template/app/entry.server.tsx delete mode 100644 _official-blog-tutorial/app/entry.client.tsx delete mode 100644 _official-blog-tutorial/app/entry.server.tsx delete mode 100644 _official-jokes/app/entry.client.tsx delete mode 100644 _official-jokes/app/entry.server.tsx delete mode 100644 _official-realtime-app/app/entry.client.tsx delete mode 100644 _official-realtime-app/app/entry.server.tsx delete mode 100644 basic/app/entry.client.tsx delete mode 100644 basic/app/entry.server.tsx delete mode 100644 bullmq-task-queue/app/entry.client.tsx delete mode 100644 bullmq-task-queue/app/entry.server.tsx delete mode 100644 catch-boundary/app/entry.client.tsx delete mode 100644 catch-boundary/app/entry.server.tsx delete mode 100644 client-only-components/app/entry.client.tsx delete mode 100644 client-only-components/app/entry.server.tsx delete mode 100644 client-side-validation/app/entry.client.tsx delete mode 100644 client-side-validation/app/entry.server.tsx delete mode 100644 collected-notes/app/entry.client.tsx delete mode 100644 collected-notes/app/entry.server.tsx delete mode 100644 combobox-resource-route/app/entry.client.tsx delete mode 100644 combobox-resource-route/app/entry.server.tsx delete mode 100644 dark-mode/app/entry.client.tsx delete mode 100644 dark-mode/app/entry.server.tsx delete mode 100644 dataloader/app/entry.client.tsx delete mode 100644 dataloader/app/entry.server.tsx delete mode 100644 file-and-cloudinary-upload/app/entry.client.tsx delete mode 100644 file-and-cloudinary-upload/app/entry.server.tsx delete mode 100644 file-and-s3-upload/app/entry.client.tsx delete mode 100644 file-and-s3-upload/app/entry.server.tsx delete mode 100644 firebase/app/entry.client.tsx delete mode 100644 firebase/app/entry.server.tsx delete mode 100644 form-to-notion-db/app/entry.client.tsx delete mode 100644 form-to-notion-db/app/entry.server.tsx delete mode 100644 framer-motion/app/entry.client.tsx delete mode 100644 framer-motion/app/entry.server.tsx delete mode 100644 framer-route-animation/app/entry.client.tsx delete mode 100644 framer-route-animation/app/entry.server.tsx delete mode 100644 gdpr-cookie-consent/app/entry.client.tsx delete mode 100644 gdpr-cookie-consent/app/entry.server.tsx delete mode 100644 google-analytics/app/entry.client.tsx delete mode 100644 google-analytics/app/entry.server.tsx delete mode 100644 graphql-api/app/entry.client.tsx delete mode 100644 graphql-api/app/entry.server.tsx delete mode 100644 image-resize/app/entry.client.tsx delete mode 100644 image-resize/app/entry.server.tsx delete mode 100644 infinite-scrolling/app/entry.client.tsx delete mode 100644 infinite-scrolling/app/entry.server.tsx delete mode 100644 io-ts-formdata-decoding/app/entry.client.tsx delete mode 100644 io-ts-formdata-decoding/app/entry.server.tsx delete mode 100644 ioredis/app/entry.client.tsx delete mode 100644 ioredis/app/entry.server.tsx delete mode 100644 leaflet/app/entry.client.tsx delete mode 100644 leaflet/app/entry.server.tsx delete mode 100644 mantine/app/entry.client.tsx delete mode 100644 msw/app/entry.client.tsx delete mode 100644 msw/app/entry.server.tsx delete mode 100644 multiple-forms/app/entry.client.tsx delete mode 100644 multiple-forms/app/entry.server.tsx delete mode 100644 multiple-params/app/entry.client.tsx delete mode 100644 multiple-params/app/entry.server.tsx delete mode 100644 newsletter-signup/app/entry.client.tsx delete mode 100644 newsletter-signup/app/entry.server.tsx delete mode 100644 nprogress/app/entry.client.tsx delete mode 100644 nprogress/app/entry.server.tsx delete mode 100644 on-demand-hydration/app/entry.client.tsx delete mode 100644 on-demand-hydration/app/entry.server.tsx delete mode 100644 outlet-form-rerender/app/entry.client.tsx delete mode 100644 outlet-form-rerender/app/entry.server.tsx delete mode 100644 pathless-routes/app/entry.client.tsx delete mode 100644 pathless-routes/app/entry.server.tsx delete mode 100644 playwright/app/entry.client.tsx delete mode 100644 playwright/app/entry.server.tsx delete mode 100644 pm-app/app/entry.client.tsx delete mode 100644 pm-app/app/entry.server.tsx delete mode 100644 quirrel/app/entry.client.tsx delete mode 100644 quirrel/app/entry.server.tsx delete mode 100644 react-quill/app/entry.client.tsx delete mode 100644 react-quill/app/entry.server.tsx delete mode 100644 react-spring/app/entry.client.tsx delete mode 100644 react-spring/app/entry.server.tsx delete mode 100644 redis-upstash-session/app/entry.client.tsx delete mode 100644 redis-upstash-session/app/entry.server.tsx delete mode 100644 remix-auth-auth0/app/entry.client.tsx delete mode 100644 remix-auth-auth0/app/entry.server.tsx delete mode 100644 remix-auth-form/app/entry.client.tsx delete mode 100644 remix-auth-form/app/entry.server.tsx delete mode 100644 remix-auth-github/app/entry.client.tsx delete mode 100644 remix-auth-github/app/entry.server.tsx delete mode 100644 remix-auth-supabase-github/app/entry.client.tsx delete mode 100644 remix-auth-supabase-github/app/entry.server.tsx delete mode 100644 remix-auth-supabase/app/entry.client.tsx delete mode 100644 remix-auth-supabase/app/entry.server.tsx delete mode 100644 route-modal/app/entry.client.tsx delete mode 100644 route-modal/app/entry.server.tsx delete mode 100644 routes-gen/app/entry.client.tsx delete mode 100644 routes-gen/app/entry.server.tsx delete mode 100644 rust/app/entry.client.tsx delete mode 100644 rust/app/entry.server.tsx delete mode 100644 sanity/app/entry.client.tsx delete mode 100644 sanity/app/entry.server.tsx delete mode 100644 sass/app/entry.client.tsx delete mode 100644 sass/app/entry.server.tsx delete mode 100644 search-input/app/entry.client.tsx delete mode 100644 search-input/app/entry.server.tsx delete mode 100644 session-flash/app/entry.client.tsx delete mode 100644 session-flash/app/entry.server.tsx delete mode 100644 sharing-loader-data/app/entry.client.tsx delete mode 100644 sharing-loader-data/app/entry.server.tsx delete mode 100644 socket.io/app/entry.client.tsx delete mode 100644 socket.io/app/entry.server.tsx delete mode 100644 sse-chat/app/entry.client.tsx delete mode 100644 sse-chat/app/entry.server.tsx delete mode 100644 sse-counter/app/entry.client.tsx delete mode 100644 sse-counter/app/entry.server.tsx delete mode 100755 strapi/app/entry.client.tsx delete mode 100755 strapi/app/entry.server.tsx delete mode 100644 stripe-integration/app/entry.client.tsx delete mode 100644 stripe-integration/app/entry.server.tsx delete mode 100644 supabase-subscription/app/entry.client.tsx delete mode 100644 supabase-subscription/app/entry.server.tsx delete mode 100644 tailwindcss/app/entry.client.tsx delete mode 100644 tailwindcss/app/entry.server.tsx delete mode 100644 tiptap-collab-editing/app/entry.client.tsx delete mode 100644 tiptap-collab-editing/app/entry.server.tsx delete mode 100644 toast-message/app/entry.client.tsx delete mode 100644 toast-message/app/entry.server.tsx delete mode 100644 turborepo-vercel/apps/remix-app/app/entry.client.tsx delete mode 100644 twind/app/entry.client.tsx delete mode 100644 unocss/app/entry.client.tsx delete mode 100644 unocss/app/entry.server.tsx delete mode 100644 usematches-loader-data/app/entry.client.tsx delete mode 100644 usematches-loader-data/app/entry.server.tsx delete mode 100644 vanilla-extract/app/entry.client.tsx delete mode 100644 vanilla-extract/app/entry.server.tsx delete mode 100644 xata/app/entry.client.tsx delete mode 100644 xata/app/entry.server.tsx delete mode 100644 yarn-pnp/app/entry.client.tsx delete mode 100644 yarn-pnp/app/entry.server.tsx diff --git a/__template/app/entry.client.tsx b/__template/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/__template/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/__template/app/entry.server.tsx b/__template/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/__template/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/_official-blog-tutorial/app/entry.client.tsx b/_official-blog-tutorial/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/_official-blog-tutorial/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/_official-blog-tutorial/app/entry.server.tsx b/_official-blog-tutorial/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/_official-blog-tutorial/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/_official-jokes/app/entry.client.tsx b/_official-jokes/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/_official-jokes/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/_official-jokes/app/entry.server.tsx b/_official-jokes/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/_official-jokes/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/_official-realtime-app/app/entry.client.tsx b/_official-realtime-app/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/_official-realtime-app/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/_official-realtime-app/app/entry.server.tsx b/_official-realtime-app/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/_official-realtime-app/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/basic/app/entry.client.tsx b/basic/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/basic/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/basic/app/entry.server.tsx b/basic/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/basic/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/bullmq-task-queue/app/entry.client.tsx b/bullmq-task-queue/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/bullmq-task-queue/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/bullmq-task-queue/app/entry.server.tsx b/bullmq-task-queue/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/bullmq-task-queue/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/catch-boundary/app/entry.client.tsx b/catch-boundary/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/catch-boundary/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/catch-boundary/app/entry.server.tsx b/catch-boundary/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/catch-boundary/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/client-only-components/app/entry.client.tsx b/client-only-components/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/client-only-components/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/client-only-components/app/entry.server.tsx b/client-only-components/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/client-only-components/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/client-side-validation/app/entry.client.tsx b/client-side-validation/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/client-side-validation/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/client-side-validation/app/entry.server.tsx b/client-side-validation/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/client-side-validation/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/collected-notes/app/entry.client.tsx b/collected-notes/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/collected-notes/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/collected-notes/app/entry.server.tsx b/collected-notes/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/collected-notes/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/combobox-resource-route/app/entry.client.tsx b/combobox-resource-route/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/combobox-resource-route/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/combobox-resource-route/app/entry.server.tsx b/combobox-resource-route/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/combobox-resource-route/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/dark-mode/app/entry.client.tsx b/dark-mode/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/dark-mode/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/dark-mode/app/entry.server.tsx b/dark-mode/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/dark-mode/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/dataloader/app/entry.client.tsx b/dataloader/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/dataloader/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/dataloader/app/entry.server.tsx b/dataloader/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/dataloader/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/file-and-cloudinary-upload/app/entry.client.tsx b/file-and-cloudinary-upload/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/file-and-cloudinary-upload/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/file-and-cloudinary-upload/app/entry.server.tsx b/file-and-cloudinary-upload/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/file-and-cloudinary-upload/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/file-and-s3-upload/app/entry.client.tsx b/file-and-s3-upload/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/file-and-s3-upload/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/file-and-s3-upload/app/entry.server.tsx b/file-and-s3-upload/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/file-and-s3-upload/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/firebase/app/entry.client.tsx b/firebase/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/firebase/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/firebase/app/entry.server.tsx b/firebase/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/firebase/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/form-to-notion-db/app/entry.client.tsx b/form-to-notion-db/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/form-to-notion-db/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/form-to-notion-db/app/entry.server.tsx b/form-to-notion-db/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/form-to-notion-db/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/framer-motion/app/entry.client.tsx b/framer-motion/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/framer-motion/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/framer-motion/app/entry.server.tsx b/framer-motion/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/framer-motion/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/framer-route-animation/app/entry.client.tsx b/framer-route-animation/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/framer-route-animation/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/framer-route-animation/app/entry.server.tsx b/framer-route-animation/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/framer-route-animation/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/gdpr-cookie-consent/app/entry.client.tsx b/gdpr-cookie-consent/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/gdpr-cookie-consent/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/gdpr-cookie-consent/app/entry.server.tsx b/gdpr-cookie-consent/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/gdpr-cookie-consent/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/google-analytics/app/entry.client.tsx b/google-analytics/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/google-analytics/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/google-analytics/app/entry.server.tsx b/google-analytics/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/google-analytics/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/graphql-api/app/entry.client.tsx b/graphql-api/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/graphql-api/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/graphql-api/app/entry.server.tsx b/graphql-api/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/graphql-api/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/image-resize/app/entry.client.tsx b/image-resize/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/image-resize/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/image-resize/app/entry.server.tsx b/image-resize/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/image-resize/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/infinite-scrolling/app/entry.client.tsx b/infinite-scrolling/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/infinite-scrolling/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/infinite-scrolling/app/entry.server.tsx b/infinite-scrolling/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/infinite-scrolling/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/io-ts-formdata-decoding/app/entry.client.tsx b/io-ts-formdata-decoding/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/io-ts-formdata-decoding/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/io-ts-formdata-decoding/app/entry.server.tsx b/io-ts-formdata-decoding/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/io-ts-formdata-decoding/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/ioredis/app/entry.client.tsx b/ioredis/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/ioredis/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/ioredis/app/entry.server.tsx b/ioredis/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/ioredis/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/leaflet/app/entry.client.tsx b/leaflet/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/leaflet/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/leaflet/app/entry.server.tsx b/leaflet/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/leaflet/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/mantine/app/entry.client.tsx b/mantine/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/mantine/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/msw/app/entry.client.tsx b/msw/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/msw/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/msw/app/entry.server.tsx b/msw/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/msw/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/multiple-forms/app/entry.client.tsx b/multiple-forms/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/multiple-forms/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/multiple-forms/app/entry.server.tsx b/multiple-forms/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/multiple-forms/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/multiple-params/app/entry.client.tsx b/multiple-params/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/multiple-params/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/multiple-params/app/entry.server.tsx b/multiple-params/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/multiple-params/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/newsletter-signup/app/entry.client.tsx b/newsletter-signup/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/newsletter-signup/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/newsletter-signup/app/entry.server.tsx b/newsletter-signup/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/newsletter-signup/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/nprogress/app/entry.client.tsx b/nprogress/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/nprogress/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/nprogress/app/entry.server.tsx b/nprogress/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/nprogress/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/on-demand-hydration/app/entry.client.tsx b/on-demand-hydration/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/on-demand-hydration/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/on-demand-hydration/app/entry.server.tsx b/on-demand-hydration/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/on-demand-hydration/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/outlet-form-rerender/app/entry.client.tsx b/outlet-form-rerender/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/outlet-form-rerender/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/outlet-form-rerender/app/entry.server.tsx b/outlet-form-rerender/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/outlet-form-rerender/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/pathless-routes/app/entry.client.tsx b/pathless-routes/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/pathless-routes/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/pathless-routes/app/entry.server.tsx b/pathless-routes/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/pathless-routes/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/playwright/app/entry.client.tsx b/playwright/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/playwright/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/playwright/app/entry.server.tsx b/playwright/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/playwright/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/pm-app/app/entry.client.tsx b/pm-app/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/pm-app/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/pm-app/app/entry.server.tsx b/pm-app/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/pm-app/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/quirrel/app/entry.client.tsx b/quirrel/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/quirrel/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/quirrel/app/entry.server.tsx b/quirrel/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/quirrel/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/react-quill/app/entry.client.tsx b/react-quill/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/react-quill/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/react-quill/app/entry.server.tsx b/react-quill/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/react-quill/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/react-spring/app/entry.client.tsx b/react-spring/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/react-spring/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/react-spring/app/entry.server.tsx b/react-spring/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/react-spring/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/redis-upstash-session/app/entry.client.tsx b/redis-upstash-session/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/redis-upstash-session/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/redis-upstash-session/app/entry.server.tsx b/redis-upstash-session/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/redis-upstash-session/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/remix-auth-auth0/app/entry.client.tsx b/remix-auth-auth0/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/remix-auth-auth0/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/remix-auth-auth0/app/entry.server.tsx b/remix-auth-auth0/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/remix-auth-auth0/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/remix-auth-form/app/entry.client.tsx b/remix-auth-form/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/remix-auth-form/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/remix-auth-form/app/entry.server.tsx b/remix-auth-form/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/remix-auth-form/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/remix-auth-github/app/entry.client.tsx b/remix-auth-github/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/remix-auth-github/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/remix-auth-github/app/entry.server.tsx b/remix-auth-github/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/remix-auth-github/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/remix-auth-supabase-github/app/entry.client.tsx b/remix-auth-supabase-github/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/remix-auth-supabase-github/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/remix-auth-supabase-github/app/entry.server.tsx b/remix-auth-supabase-github/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/remix-auth-supabase-github/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/remix-auth-supabase/app/entry.client.tsx b/remix-auth-supabase/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/remix-auth-supabase/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/remix-auth-supabase/app/entry.server.tsx b/remix-auth-supabase/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/remix-auth-supabase/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/route-modal/app/entry.client.tsx b/route-modal/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/route-modal/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/route-modal/app/entry.server.tsx b/route-modal/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/route-modal/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/routes-gen/app/entry.client.tsx b/routes-gen/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/routes-gen/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/routes-gen/app/entry.server.tsx b/routes-gen/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/routes-gen/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/rust/app/entry.client.tsx b/rust/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/rust/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/rust/app/entry.server.tsx b/rust/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/rust/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/sanity/app/entry.client.tsx b/sanity/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/sanity/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/sanity/app/entry.server.tsx b/sanity/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/sanity/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/sass/app/entry.client.tsx b/sass/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/sass/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/sass/app/entry.server.tsx b/sass/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/sass/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/search-input/app/entry.client.tsx b/search-input/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/search-input/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/search-input/app/entry.server.tsx b/search-input/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/search-input/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/session-flash/app/entry.client.tsx b/session-flash/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/session-flash/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/session-flash/app/entry.server.tsx b/session-flash/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/session-flash/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/sharing-loader-data/app/entry.client.tsx b/sharing-loader-data/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/sharing-loader-data/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/sharing-loader-data/app/entry.server.tsx b/sharing-loader-data/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/sharing-loader-data/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/socket.io/app/entry.client.tsx b/socket.io/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/socket.io/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/socket.io/app/entry.server.tsx b/socket.io/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/socket.io/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/sse-chat/app/entry.client.tsx b/sse-chat/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/sse-chat/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/sse-chat/app/entry.server.tsx b/sse-chat/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/sse-chat/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/sse-counter/app/entry.client.tsx b/sse-counter/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/sse-counter/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/sse-counter/app/entry.server.tsx b/sse-counter/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/sse-counter/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/strapi/app/entry.client.tsx b/strapi/app/entry.client.tsx deleted file mode 100755 index 852a7928..00000000 --- a/strapi/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/strapi/app/entry.server.tsx b/strapi/app/entry.server.tsx deleted file mode 100755 index dc6248a2..00000000 --- a/strapi/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/stripe-integration/app/entry.client.tsx b/stripe-integration/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/stripe-integration/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/stripe-integration/app/entry.server.tsx b/stripe-integration/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/stripe-integration/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/supabase-subscription/app/entry.client.tsx b/supabase-subscription/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/supabase-subscription/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/supabase-subscription/app/entry.server.tsx b/supabase-subscription/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/supabase-subscription/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/tailwindcss/app/entry.client.tsx b/tailwindcss/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/tailwindcss/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/tailwindcss/app/entry.server.tsx b/tailwindcss/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/tailwindcss/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/tiptap-collab-editing/app/entry.client.tsx b/tiptap-collab-editing/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/tiptap-collab-editing/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/tiptap-collab-editing/app/entry.server.tsx b/tiptap-collab-editing/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/tiptap-collab-editing/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/toast-message/app/entry.client.tsx b/toast-message/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/toast-message/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/toast-message/app/entry.server.tsx b/toast-message/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/toast-message/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/turborepo-vercel/apps/remix-app/app/entry.client.tsx b/turborepo-vercel/apps/remix-app/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/turborepo-vercel/apps/remix-app/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/twind/app/entry.client.tsx b/twind/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/twind/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/unocss/app/entry.client.tsx b/unocss/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/unocss/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/unocss/app/entry.server.tsx b/unocss/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/unocss/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/usematches-loader-data/app/entry.client.tsx b/usematches-loader-data/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/usematches-loader-data/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/usematches-loader-data/app/entry.server.tsx b/usematches-loader-data/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/usematches-loader-data/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/vanilla-extract/app/entry.client.tsx b/vanilla-extract/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/vanilla-extract/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/vanilla-extract/app/entry.server.tsx b/vanilla-extract/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/vanilla-extract/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/xata/app/entry.client.tsx b/xata/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/xata/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/xata/app/entry.server.tsx b/xata/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/xata/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); diff --git a/yarn-pnp/app/entry.client.tsx b/yarn-pnp/app/entry.client.tsx deleted file mode 100644 index 852a7928..00000000 --- a/yarn-pnp/app/entry.client.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -const hydrate = () => - startTransition(() => { - hydrateRoot( - document, - - - - ); - }); - -if (typeof requestIdleCallback === "function") { - requestIdleCallback(hydrate); -} else { - // Safari doesn't support requestIdleCallback - // https://caniuse.com/requestidlecallback - setTimeout(hydrate, 1); -} diff --git a/yarn-pnp/app/entry.server.tsx b/yarn-pnp/app/entry.server.tsx deleted file mode 100644 index dc6248a2..00000000 --- a/yarn-pnp/app/entry.server.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { PassThrough } from "stream"; - -import type { EntryContext } from "@remix-run/node"; -import { Response } from "@remix-run/node"; -import { RemixServer } from "@remix-run/react"; -import isbot from "isbot"; -import { renderToPipeableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -const handleRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext - ); -export default handleRequest; - -const handleBotRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - }); - -const handleBrowserRequest = ( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext -) => - new Promise((resolve, reject) => { - let didError = false; - - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady: () => { - const body = new PassThrough(); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(body, { - headers: responseHeaders, - status: didError ? 500 : responseStatusCode, - }) - ); - - pipe(body); - }, - onShellError: (error: unknown) => { - reject(error); - }, - onError: (error: unknown) => { - didError = true; - - console.error(error); - }, - } - ); - - setTimeout(abort, ABORT_DELAY); - });