Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
"puppeteer-core": "~24.22.0",
"react-is": "~19.1.0",
"rsc-html-stream": "~0.0.6",
"server-only": "^0.0.1",
"tmp-promise": "~3.0.3",
"ts-morph": "~27.0.0",
"unique-names-generator": "~4.7.1",
Expand Down
1 change: 1 addition & 0 deletions sdk/src/runtime/entries/worker.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "server-only";
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works as expected.

import "./types/worker";
export * from "../error";
export * from "../lib/types";
Expand Down
9 changes: 9 additions & 0 deletions sdk/src/runtime/requestInfo/worker.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { AsyncLocalStorage } from "async_hooks";
import { experimental_taintObjectReference } from "react";
import { defineRwState } from "rwsdk/__state";
import { DefaultAppContext, RequestInfo } from "./types";

Expand Down Expand Up @@ -28,6 +29,14 @@ export const requestInfo: DefaultRequestInfo = Object.freeze(
requestInfoBase,
) as DefaultRequestInfo;

if (typeof experimental_taintObjectReference === "function") {
experimental_taintObjectReference(
Comment thread
peterp marked this conversation as resolved.
Outdated
"Do not pass the full requestInfo object to Client Components. " +
"Instead, pass only the specific data you need via props.",
requestInfo,
);
}

export function getRequestInfo(): RequestInfo {
const store = requestInfoStore.getStore();
if (!store) {
Expand Down
Loading