floating-live 0.16.0-beta.3 → 0.16.1

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/app.js CHANGED
@@ -13,6 +13,7 @@ export class App extends CustomEventEmitter {
13
13
  this.valueManager = new ValueManager(this);
14
14
  this.pluginManager = new PluginManager(this);
15
15
  // 初始化命令
16
+ this.registerCommand("command.snapshot", () => this.commandManager.toSnapshot());
16
17
  this.registerCommand("get", (e, name) => this.getValue(name));
17
18
  this.registerCommand("set", (e, name, value) => this.setValue(name, value));
18
19
  }
@@ -4,7 +4,6 @@ export class CommandManager {
4
4
  /** 功能列表 */
5
5
  this.list = new Map();
6
6
  this.app = app;
7
- app.registerCommand("command.snapshot", () => this.toSnapshot());
8
7
  }
9
8
  /** 注册命令 */
10
9
  register(name, call, options) {
@@ -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-beta.3",
3
+ "version": "0.16.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",