@domain.js/main 0.3.19 → 0.3.20
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/dist/http/defines.d.ts +1 -0
- package/dist/http/socket.js +2 -1
- package/dist/http/utils.js +1 -0
- package/package.json +1 -1
package/dist/http/defines.d.ts
CHANGED
package/dist/http/socket.js
CHANGED
|
@@ -42,6 +42,7 @@ const makeProfile = (client, type = "user", auth, extra = {}) => {
|
|
|
42
42
|
clientIp: utils.clientIp(client),
|
|
43
43
|
remoteIp: utils.remoteIp(client),
|
|
44
44
|
realIp: utils.realIp(client),
|
|
45
|
+
method: "None",
|
|
45
46
|
isSocket: true,
|
|
46
47
|
startedAt: new Date(),
|
|
47
48
|
userAgent: client.handshake.headers["user-agent"] || "Not captured",
|
|
@@ -140,7 +141,7 @@ function BridgeSocket(io, domain) {
|
|
|
140
141
|
throw new MyError("notFound", "不存在该领域方法");
|
|
141
142
|
if (!client.profile)
|
|
142
143
|
throw new MyError("noAuth", "请先执行 init");
|
|
143
|
-
const res = await method(client.profile, params);
|
|
144
|
+
const res = await method({ ...client.profile, method: name }, params);
|
|
144
145
|
if (responseId) {
|
|
145
146
|
client.emit("response", responseId, res);
|
|
146
147
|
}
|
package/dist/http/utils.js
CHANGED