kernelsu 1.0.4 → 1.0.6

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.
Files changed (2) hide show
  1. package/index.js +8 -0
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -71,6 +71,9 @@ function Stdio() {
71
71
  export function spawn(command, args, options) {
72
72
  if (typeof args === "undefined") {
73
73
  args = [];
74
+ } else if (typeof args === "object") {
75
+ // allow for (command, options) signature
76
+ options = args;
74
77
  }
75
78
 
76
79
  if (typeof options === "undefined") {
@@ -84,6 +87,11 @@ function Stdio() {
84
87
  function cleanup(name) {
85
88
  delete window[name];
86
89
  }
90
+
91
+ child.on("exit", code => {
92
+ cleanup(childCallbackName);
93
+ });
94
+
87
95
  try {
88
96
  ksu.spawn(
89
97
  command,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kernelsu",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Library for KernelSU's module WebUI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,7 +17,7 @@
17
17
  "webui"
18
18
  ],
19
19
  "author": "weishu",
20
- "license": "GPL-3.0-or-later",
20
+ "license": "Apache-2.0",
21
21
  "bugs": {
22
22
  "url": "https://github.com/tiann/KernelSU/issues"
23
23
  },