lebai_sdk 0.1.20 → 0.1.21

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/lebai_sdk.d.ts CHANGED
@@ -278,6 +278,12 @@ export class Robot {
278
278
  */
279
279
  get_items(prefix: string): Promise<any>;
280
280
  /**
281
+ * @param {string} name
282
+ * @param {any | undefined} params
283
+ * @returns {Promise<any>}
284
+ */
285
+ run_plugin_cmd(name: string, params?: any): Promise<any>;
286
+ /**
281
287
  * @param {string} scene
282
288
  * @param {any | undefined} params
283
289
  * @param {string | undefined} dir
package/lebai_sdk_bg.js CHANGED
@@ -10,20 +10,6 @@ heap.push(undefined, null, true, false);
10
10
 
11
11
  function getObject(idx) { return heap[idx]; }
12
12
 
13
- let heap_next = heap.length;
14
-
15
- function dropObject(idx) {
16
- if (idx < 132) return;
17
- heap[idx] = heap_next;
18
- heap_next = idx;
19
- }
20
-
21
- function takeObject(idx) {
22
- const ret = getObject(idx);
23
- dropObject(idx);
24
- return ret;
25
- }
26
-
27
13
  let WASM_VECTOR_LEN = 0;
28
14
 
29
15
  let cachedUint8Memory0 = null;
@@ -103,6 +89,20 @@ function getInt32Memory0() {
103
89
  return cachedInt32Memory0;
104
90
  }
105
91
 
92
+ let heap_next = heap.length;
93
+
94
+ function dropObject(idx) {
95
+ if (idx < 132) return;
96
+ heap[idx] = heap_next;
97
+ heap_next = idx;
98
+ }
99
+
100
+ function takeObject(idx) {
101
+ const ret = getObject(idx);
102
+ dropObject(idx);
103
+ return ret;
104
+ }
105
+
106
106
  function addHeapObject(obj) {
107
107
  if (heap_next === heap.length) heap.push(heap.length + 1);
108
108
  const idx = heap_next;
@@ -322,7 +322,7 @@ function getArrayU8FromWasm0(ptr, len) {
322
322
  ptr = ptr >>> 0;
323
323
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
324
324
  }
325
- function __wbg_adapter_237(arg0, arg1, arg2, arg3) {
325
+ function __wbg_adapter_238(arg0, arg1, arg2, arg3) {
326
326
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h113bdd07219d3bc1(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
327
327
  }
328
328
 
@@ -755,6 +755,17 @@ export class Robot {
755
755
  return takeObject(ret);
756
756
  }
757
757
  /**
758
+ * @param {string} name
759
+ * @param {any | undefined} params
760
+ * @returns {Promise<any>}
761
+ */
762
+ run_plugin_cmd(name, params) {
763
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
764
+ const len0 = WASM_VECTOR_LEN;
765
+ const ret = wasm.robot_run_plugin_cmd(this.__wbg_ptr, ptr0, len0, isLikeNone(params) ? 0 : addHeapObject(params));
766
+ return takeObject(ret);
767
+ }
768
+ /**
758
769
  * @param {string} scene
759
770
  * @param {any | undefined} params
760
771
  * @param {string | undefined} dir
@@ -1252,10 +1263,6 @@ export class RobotSubscription {
1252
1263
  }
1253
1264
  }
1254
1265
 
1255
- export function __wbindgen_object_drop_ref(arg0) {
1256
- takeObject(arg0);
1257
- };
1258
-
1259
1266
  export function __wbindgen_string_get(arg0, arg1) {
1260
1267
  const obj = getObject(arg1);
1261
1268
  const ret = typeof(obj) === 'string' ? obj : undefined;
@@ -1265,11 +1272,20 @@ export function __wbindgen_string_get(arg0, arg1) {
1265
1272
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1266
1273
  };
1267
1274
 
1275
+ export function __wbindgen_object_drop_ref(arg0) {
1276
+ takeObject(arg0);
1277
+ };
1278
+
1268
1279
  export function __wbindgen_number_new(arg0) {
1269
1280
  const ret = arg0;
1270
1281
  return addHeapObject(ret);
1271
1282
  };
1272
1283
 
1284
+ export function __wbg_robot_new(arg0) {
1285
+ const ret = Robot.__wrap(arg0);
1286
+ return addHeapObject(ret);
1287
+ };
1288
+
1273
1289
  export function __wbindgen_string_new(arg0, arg1) {
1274
1290
  const ret = getStringFromWasm0(arg0, arg1);
1275
1291
  return addHeapObject(ret);
@@ -1280,11 +1296,6 @@ export function __wbg_robotsubscription_new(arg0) {
1280
1296
  return addHeapObject(ret);
1281
1297
  };
1282
1298
 
1283
- export function __wbg_robot_new(arg0) {
1284
- const ret = Robot.__wrap(arg0);
1285
- return addHeapObject(ret);
1286
- };
1287
-
1288
1299
  export function __wbindgen_cb_drop(arg0) {
1289
1300
  const obj = takeObject(arg0).original;
1290
1301
  if (obj.cnt-- == 1) {
@@ -1582,7 +1593,7 @@ export function __wbg_new_43f1b47c28813cbd(arg0, arg1) {
1582
1593
  const a = state0.a;
1583
1594
  state0.a = 0;
1584
1595
  try {
1585
- return __wbg_adapter_237(a, state0.b, arg0, arg1);
1596
+ return __wbg_adapter_238(a, state0.b, arg0, arg1);
1586
1597
  } finally {
1587
1598
  state0.a = a;
1588
1599
  }
@@ -1663,33 +1674,33 @@ export function __wbindgen_memory() {
1663
1674
  return addHeapObject(ret);
1664
1675
  };
1665
1676
 
1666
- export function __wbindgen_closure_wrapper1647(arg0, arg1, arg2) {
1667
- const ret = makeMutClosure(arg0, arg1, 673, __wbg_adapter_48);
1677
+ export function __wbindgen_closure_wrapper1667(arg0, arg1, arg2) {
1678
+ const ret = makeMutClosure(arg0, arg1, 681, __wbg_adapter_48);
1668
1679
  return addHeapObject(ret);
1669
1680
  };
1670
1681
 
1671
- export function __wbindgen_closure_wrapper1649(arg0, arg1, arg2) {
1672
- const ret = makeMutClosure(arg0, arg1, 673, __wbg_adapter_51);
1682
+ export function __wbindgen_closure_wrapper1669(arg0, arg1, arg2) {
1683
+ const ret = makeMutClosure(arg0, arg1, 681, __wbg_adapter_51);
1673
1684
  return addHeapObject(ret);
1674
1685
  };
1675
1686
 
1676
- export function __wbindgen_closure_wrapper1651(arg0, arg1, arg2) {
1677
- const ret = makeMutClosure(arg0, arg1, 673, __wbg_adapter_48);
1687
+ export function __wbindgen_closure_wrapper1671(arg0, arg1, arg2) {
1688
+ const ret = makeMutClosure(arg0, arg1, 681, __wbg_adapter_48);
1678
1689
  return addHeapObject(ret);
1679
1690
  };
1680
1691
 
1681
- export function __wbindgen_closure_wrapper1653(arg0, arg1, arg2) {
1682
- const ret = makeMutClosure(arg0, arg1, 673, __wbg_adapter_48);
1692
+ export function __wbindgen_closure_wrapper1673(arg0, arg1, arg2) {
1693
+ const ret = makeMutClosure(arg0, arg1, 681, __wbg_adapter_48);
1683
1694
  return addHeapObject(ret);
1684
1695
  };
1685
1696
 
1686
- export function __wbindgen_closure_wrapper2389(arg0, arg1, arg2) {
1687
- const ret = makeMutClosure(arg0, arg1, 785, __wbg_adapter_58);
1697
+ export function __wbindgen_closure_wrapper2410(arg0, arg1, arg2) {
1698
+ const ret = makeMutClosure(arg0, arg1, 793, __wbg_adapter_58);
1688
1699
  return addHeapObject(ret);
1689
1700
  };
1690
1701
 
1691
- export function __wbindgen_closure_wrapper2434(arg0, arg1, arg2) {
1692
- const ret = makeMutClosure(arg0, arg1, 807, __wbg_adapter_61);
1702
+ export function __wbindgen_closure_wrapper2455(arg0, arg1, arg2) {
1703
+ const ret = makeMutClosure(arg0, arg1, 815, __wbg_adapter_61);
1693
1704
  return addHeapObject(ret);
1694
1705
  };
1695
1706
 
package/lebai_sdk_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "rise0chen<rise0chen@163.com>"
5
5
  ],
6
6
  "description": "lebai_sdk",
7
- "version": "0.1.20",
7
+ "version": "0.1.21",
8
8
  "license": "SEE LICENSE IN LICENSE",
9
9
  "repository": {
10
10
  "type": "git",