floating-live 0.16.0 → 0.16.2

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.
@@ -13,6 +13,7 @@ export class Room extends BasePlugin {
13
13
  ctx.registerCommand("open", bindCommand(this.open, this));
14
14
  ctx.registerCommand("close", bindCommand(this.close, this));
15
15
  ctx.registerCommand("update", bindCommand(this.update, this));
16
+ ctx.registerCommand("move", bindCommand(this.move, this));
16
17
  ctx.registerCommand("room.snapshot", bindCommand(this.toSnapshot, this));
17
18
  }
18
19
  expose() {
@@ -1,4 +1,5 @@
1
1
  export function bindCommand(command, thisArg) {
2
- const c = ((e, ...args) => command(...args)).bind(thisArg);
2
+ const fn = command.bind(thisArg);
3
+ const c = (e, ...args) => fn(...args);
3
4
  return c;
4
5
  }
@@ -61,6 +61,7 @@ export class ValueManager {
61
61
  }
62
62
  /** 获取注册的所有值 */
63
63
  toSnapshot() {
64
+ console.log(this);
64
65
  return [...this.list].map(([name, config]) => ({
65
66
  name,
66
67
  value: config.get(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "floating-live",
3
- "version": "0.16.0",
3
+ "version": "0.16.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",