Skip to content

Commit bab6898

Browse files
committed
Remove server-runtime reexport modules
1 parent 951e843 commit bab6898

File tree

3 files changed

+60
-105
lines changed

3 files changed

+60
-105
lines changed

packages/react-router/index.ts

Lines changed: 60 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -380,64 +380,88 @@ export { MaxPartSizeExceededError } from "./lib/server-runtime/upload/errors";
380380
export { setDevServerHooks as unstable_setDevServerHooks } from "./lib/server-runtime/dev";
381381

382382
export type {
383-
// TODO: (v7) Clean up code paths for these exports
384-
// JsonFunction,
385-
// RedirectFunction,
386383
CreateCookieFunction,
387-
CreateCookieSessionStorageFunction,
388-
CreateMemorySessionStorageFunction,
389-
CreateRequestHandlerFunction,
384+
IsCookieFunction,
385+
} from "./lib/server-runtime/cookies";
386+
// TODO: (v7) Clean up code paths for these exports
387+
// export type {
388+
// JsonFunction,
389+
// RedirectFunction,
390+
// } from "./lib/server-runtime/responses";
391+
export type { CreateRequestHandlerFunction } from "./lib/server-runtime/server";
392+
export type {
390393
CreateSessionFunction,
391394
CreateSessionStorageFunction,
392-
IsCookieFunction,
393395
IsSessionFunction,
394-
} from "./lib/server-runtime/interface";
396+
} from "./lib/server-runtime/sessions";
397+
export type { CreateCookieSessionStorageFunction } from "./lib/server-runtime/sessions/cookieStorage";
398+
export type { CreateMemorySessionStorageFunction } from "./lib/server-runtime/sessions/memoryStorage";
399+
400+
export type {
401+
HandleDataRequestFunction,
402+
HandleDocumentRequestFunction,
403+
HandleErrorFunction,
404+
ServerBuild,
405+
ServerEntryModule,
406+
} from "./lib/server-runtime/build";
407+
408+
export type {
409+
UploadHandlerPart,
410+
UploadHandler,
411+
} from "./lib/server-runtime/formData";
412+
export type {
413+
MemoryUploadHandlerOptions,
414+
MemoryUploadHandlerFilterArgs,
415+
} from "./lib/server-runtime/upload/memoryUploadHandler";
416+
417+
export type {
418+
Cookie,
419+
CookieOptions,
420+
CookieParseOptions,
421+
CookieSerializeOptions,
422+
CookieSignatureOptions,
423+
} from "./lib/server-runtime/cookies";
424+
425+
export type { SignFunction, UnsignFunction } from "./lib/server-runtime/crypto";
426+
427+
export type { AppLoadContext } from "./lib/server-runtime/data";
395428

396429
export type {
397430
// TODO: (v7) Clean up code paths for these exports
398-
// ActionFunction,
399-
// ActionFunctionArgs,
400-
// EntryContext,
401-
// ErrorResponse,
402431
// HtmlLinkDescriptor,
403432
// LinkDescriptor,
433+
PageLinkDescriptor,
434+
} from "./lib/server-runtime/links";
435+
436+
export type {
437+
TypedDeferredData,
438+
TypedResponse,
439+
} from "./lib/server-runtime/responses";
440+
441+
export type {
442+
// TODO: (v7) Clean up code paths for these exports
443+
// ActionFunction,
444+
// ActionFunctionArgs,
404445
// LinksFunction,
405446
// LoaderFunction,
406447
// LoaderFunctionArgs,
407448
// ServerRuntimeMetaArgs,
408449
// ServerRuntimeMetaDescriptor,
409450
// ServerRuntimeMetaFunction,
410-
// SerializeFrom,
411-
AppLoadContext,
412-
Cookie,
413-
CookieOptions,
414-
CookieParseOptions,
415-
CookieSerializeOptions,
416-
CookieSignatureOptions,
417451
DataFunctionArgs,
418-
FlashSessionData,
419-
HandleDataRequestFunction,
420-
HandleDocumentRequestFunction,
421452
HeadersArgs,
422453
HeadersFunction,
423-
MemoryUploadHandlerFilterArgs,
424-
MemoryUploadHandlerOptions,
425-
HandleErrorFunction,
426-
PageLinkDescriptor,
427-
RequestHandler,
428-
ServerBuild,
429-
ServerEntryModule,
454+
} from "./lib/server-runtime/routeModules";
455+
456+
export type { RequestHandler } from "./lib/server-runtime/server";
457+
458+
export type {
430459
Session,
431460
SessionData,
432461
SessionIdStorageStrategy,
433462
SessionStorage,
434-
SignFunction,
435-
TypedDeferredData,
436-
TypedResponse,
437-
UnsignFunction,
438-
UploadHandler,
439-
UploadHandlerPart,
440-
} from "./lib/server-runtime/reexport";
463+
FlashSessionData,
464+
} from "./lib/server-runtime/sessions";
441465

442466
// Private exports for internal use
443467
export { ServerMode as UNSAFE_ServerMode } from "./lib/server-runtime/mode";

packages/react-router/lib/server-runtime/interface.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

packages/react-router/lib/server-runtime/reexport.ts

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)