Skip to content

Commit

Permalink
Remove server-runtime reexport modules
Browse files Browse the repository at this point in the history
  • Loading branch information
markdalgleish committed Jun 21, 2024
1 parent 951e843 commit bab6898
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 105 deletions.
96 changes: 60 additions & 36 deletions packages/react-router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,64 +380,88 @@ export { MaxPartSizeExceededError } from "./lib/server-runtime/upload/errors";
export { setDevServerHooks as unstable_setDevServerHooks } from "./lib/server-runtime/dev";

export type {
// TODO: (v7) Clean up code paths for these exports
// JsonFunction,
// RedirectFunction,
CreateCookieFunction,
CreateCookieSessionStorageFunction,
CreateMemorySessionStorageFunction,
CreateRequestHandlerFunction,
IsCookieFunction,
} from "./lib/server-runtime/cookies";
// TODO: (v7) Clean up code paths for these exports
// export type {
// JsonFunction,
// RedirectFunction,
// } from "./lib/server-runtime/responses";
export type { CreateRequestHandlerFunction } from "./lib/server-runtime/server";
export type {
CreateSessionFunction,
CreateSessionStorageFunction,
IsCookieFunction,
IsSessionFunction,
} from "./lib/server-runtime/interface";
} from "./lib/server-runtime/sessions";
export type { CreateCookieSessionStorageFunction } from "./lib/server-runtime/sessions/cookieStorage";
export type { CreateMemorySessionStorageFunction } from "./lib/server-runtime/sessions/memoryStorage";

export type {
HandleDataRequestFunction,
HandleDocumentRequestFunction,
HandleErrorFunction,
ServerBuild,
ServerEntryModule,
} from "./lib/server-runtime/build";

export type {
UploadHandlerPart,
UploadHandler,
} from "./lib/server-runtime/formData";
export type {
MemoryUploadHandlerOptions,
MemoryUploadHandlerFilterArgs,
} from "./lib/server-runtime/upload/memoryUploadHandler";

export type {
Cookie,
CookieOptions,
CookieParseOptions,
CookieSerializeOptions,
CookieSignatureOptions,
} from "./lib/server-runtime/cookies";

export type { SignFunction, UnsignFunction } from "./lib/server-runtime/crypto";

export type { AppLoadContext } from "./lib/server-runtime/data";

export type {
// TODO: (v7) Clean up code paths for these exports
// ActionFunction,
// ActionFunctionArgs,
// EntryContext,
// ErrorResponse,
// HtmlLinkDescriptor,
// LinkDescriptor,
PageLinkDescriptor,
} from "./lib/server-runtime/links";

export type {
TypedDeferredData,
TypedResponse,
} from "./lib/server-runtime/responses";

export type {
// TODO: (v7) Clean up code paths for these exports
// ActionFunction,
// ActionFunctionArgs,
// LinksFunction,
// LoaderFunction,
// LoaderFunctionArgs,
// ServerRuntimeMetaArgs,
// ServerRuntimeMetaDescriptor,
// ServerRuntimeMetaFunction,
// SerializeFrom,
AppLoadContext,
Cookie,
CookieOptions,
CookieParseOptions,
CookieSerializeOptions,
CookieSignatureOptions,
DataFunctionArgs,
FlashSessionData,
HandleDataRequestFunction,
HandleDocumentRequestFunction,
HeadersArgs,
HeadersFunction,
MemoryUploadHandlerFilterArgs,
MemoryUploadHandlerOptions,
HandleErrorFunction,
PageLinkDescriptor,
RequestHandler,
ServerBuild,
ServerEntryModule,
} from "./lib/server-runtime/routeModules";

export type { RequestHandler } from "./lib/server-runtime/server";

export type {
Session,
SessionData,
SessionIdStorageStrategy,
SessionStorage,
SignFunction,
TypedDeferredData,
TypedResponse,
UnsignFunction,
UploadHandler,
UploadHandlerPart,
} from "./lib/server-runtime/reexport";
FlashSessionData,
} from "./lib/server-runtime/sessions";

// Private exports for internal use
export { ServerMode as UNSAFE_ServerMode } from "./lib/server-runtime/mode";
Expand Down
10 changes: 0 additions & 10 deletions packages/react-router/lib/server-runtime/interface.ts

This file was deleted.

59 changes: 0 additions & 59 deletions packages/react-router/lib/server-runtime/reexport.ts

This file was deleted.

0 comments on commit bab6898

Please sign in to comment.