@fuzionx/core 0.1.30 → 0.1.32
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.
- package/lib/app.js +5 -11
- package/lib/ws.js +5 -0
- package/package.json +2 -2
package/lib/app.js
CHANGED
|
@@ -24,19 +24,13 @@ function loadBridge() {
|
|
|
24
24
|
// 1. npm 설치된 @fuzionx/bridge
|
|
25
25
|
try { return require('@fuzionx/bridge'); } catch (_) {}
|
|
26
26
|
|
|
27
|
-
// 2. 로컬 개발 환경 (file: 의존성)
|
|
27
|
+
// 2. 로컬 개발 환경 (file: 또는 workspace 의존성)
|
|
28
28
|
try { return require('fuzionx-bridge'); } catch (_) {}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
path.resolve(dir, '../../../crates/fuzionx-bridge/fuzionx-bridge.linux-x64-gnu.node'),
|
|
35
|
-
];
|
|
36
|
-
for (const p of variants) {
|
|
37
|
-
try { return require(p); } catch (_) {}
|
|
38
|
-
}
|
|
39
|
-
throw new Error('fuzionx-bridge native module을 찾을 수 없습니다. npm install @fuzionx/core를 실행해 주세요.');
|
|
30
|
+
throw new Error(
|
|
31
|
+
'fuzionx-bridge native module을 찾을 수 없습니다. ' +
|
|
32
|
+
'npm install @fuzionx/bridge 또는 package.json에 workspace 의존성을 추가하세요.'
|
|
33
|
+
);
|
|
40
34
|
}
|
|
41
35
|
|
|
42
36
|
export class FuzionXApp {
|
package/lib/ws.js
CHANGED
|
@@ -60,6 +60,11 @@ class FuzionXSocket {
|
|
|
60
60
|
return this._bridge.wsGetMetadata(this.sessionId, key);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
/** 임의 세션의 메타데이터 조회 (로컬 + 원격 자동 폴백) */
|
|
64
|
+
getMetadataFor(sessionId, key) {
|
|
65
|
+
return this._bridge.wsGetMetadata(sessionId, key) || null;
|
|
66
|
+
}
|
|
67
|
+
|
|
63
68
|
/** 네임스페이스별 접속자 수 */
|
|
64
69
|
get onlineCount() {
|
|
65
70
|
return this._namespace
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fuzionx/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Express-style Node.js framework powered by FuzionX native bridge — 167K RPS single process",
|
|
6
6
|
"main": "index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"url": "https://github.com/saytohenry/fuzionx"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@fuzionx/bridge": "^0.1.
|
|
21
|
+
"@fuzionx/bridge": "^0.1.32"
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
24
|
"index.js",
|