rwsdk 1.0.0-beta.9-test.20251007055438 → 1.0.0-beta.9-test.20251007155132

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  import { requestInfo } from "../requestInfo/worker.js";
2
+ let stateCounter = 0;
2
3
  /**
3
4
  * Creates a request-scoped state variable that automatically resolves to the correct
4
5
  * instance based on the current request context using AsyncLocalStorage.
@@ -7,7 +8,7 @@ import { requestInfo } from "../requestInfo/worker.js";
7
8
  */
8
9
  export function defineRequestState() {
9
10
  // Generate a unique key for this state variable to prevent collisions
10
- const key = `__requestState_${crypto.randomUUID()}`;
11
+ const key = `__requestState_${stateCounter++}`;
11
12
  const setter = (value) => {
12
13
  requestInfo.__userContext[key] = value;
13
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rwsdk",
3
- "version": "1.0.0-beta.9-test.20251007055438",
3
+ "version": "1.0.0-beta.9-test.20251007155132",
4
4
  "description": "Build fast, server-driven webapps on Cloudflare with SSR, RSC, and realtime",
5
5
  "type": "module",
6
6
  "bin": {