@replicast/core 1.0.0-rc.5 → 1.0.0-rc.6
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-browser.d.ts","sourceRoot":"","sources":["../../src/transport/context-browser.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;QACrB,CAAC,UAAU,OAAO,MAAM,MAAM,CAAC,GAAG,CAAC;gBAC3B,SAAS;CACtB,CAAA;AAED,wBAAgB,MAAM,IAAI,KAAK,CAE9B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Browser stub — AsyncLocalStorage is Node.js-only.
|
|
2
|
+
// contextStorage is used only by server.ts (serve() is never called in browser).
|
|
3
|
+
// useCtx() is exported as a public API but only valid inside @Server handlers.
|
|
4
|
+
export const contextStorage = {
|
|
5
|
+
run(_store, fn) { return fn(); },
|
|
6
|
+
getStore() { return undefined; },
|
|
7
|
+
};
|
|
8
|
+
export function useCtx() {
|
|
9
|
+
throw new Error('useCtx() is not available in browser builds');
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=context-browser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-browser.js","sourceRoot":"","sources":["../../src/transport/context-browser.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,iFAAiF;AACjF,+EAA+E;AAC/E,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,GAAG,CAAI,MAAe,EAAE,EAAW,IAAO,OAAO,EAAE,EAAE,CAAA,CAAC,CAAC;IACvD,QAAQ,KAAgB,OAAO,SAAS,CAAA,CAAC,CAAC;CAC3C,CAAA;AAED,MAAM,UAAU,MAAM;IACpB,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAA;AAChE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@replicast/core",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.6",
|
|
4
4
|
"description": "TypeScript RPC and state-replication framework for multiplayer games",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"access": "public"
|
|
14
14
|
},
|
|
15
15
|
"browser": {
|
|
16
|
-
"./dist/transport/ws-node.js": "./dist/transport/ws-browser.js"
|
|
16
|
+
"./dist/transport/ws-node.js": "./dist/transport/ws-browser.js",
|
|
17
|
+
"./dist/transport/context.js": "./dist/transport/context-browser.js"
|
|
17
18
|
},
|
|
18
19
|
"scripts": {
|
|
19
20
|
"build": "tsc -p tsconfig.build.json",
|