@whyour/qinglong 2.17.9-rc.4 → 2.17.9-rc.5
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/package.json
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
const { execSync } = require('child_process');
|
|
2
|
-
const { sendNotify } = require('./notify.js');
|
|
3
2
|
require(`./env.js`);
|
|
4
|
-
|
|
5
|
-
function initGlobal() {
|
|
6
|
-
global.QLAPI = {
|
|
7
|
-
notify: sendNotify,
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
|
|
11
3
|
function expandRange(rangeStr, max) {
|
|
12
4
|
const tempRangeStr = rangeStr
|
|
13
5
|
.trim()
|
|
@@ -76,8 +68,12 @@ function run() {
|
|
|
76
68
|
}
|
|
77
69
|
|
|
78
70
|
try {
|
|
79
|
-
initGlobal();
|
|
80
71
|
run();
|
|
72
|
+
|
|
73
|
+
const { sendNotify } = require('./notify.js');
|
|
74
|
+
global.QLAPI = {
|
|
75
|
+
notify: sendNotify,
|
|
76
|
+
};
|
|
81
77
|
} catch (error) {
|
|
82
78
|
console.log(`run builtin code error: `, error, '\n');
|
|
83
79
|
}
|
|
@@ -5,17 +5,6 @@ import json
|
|
|
5
5
|
import builtins
|
|
6
6
|
import sys
|
|
7
7
|
import env
|
|
8
|
-
from notify import send
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class BaseApi:
|
|
12
|
-
def notify(self, *args, **kwargs):
|
|
13
|
-
return send(*args, **kwargs)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def init_global():
|
|
17
|
-
QLAPI = BaseApi()
|
|
18
|
-
builtins.QLAPI = QLAPI
|
|
19
8
|
|
|
20
9
|
|
|
21
10
|
def try_parse_int(value):
|
|
@@ -92,7 +81,15 @@ def run():
|
|
|
92
81
|
|
|
93
82
|
|
|
94
83
|
try:
|
|
95
|
-
init_global()
|
|
96
84
|
run()
|
|
85
|
+
|
|
86
|
+
from notify import send
|
|
87
|
+
|
|
88
|
+
class BaseApi:
|
|
89
|
+
def notify(self, *args, **kwargs):
|
|
90
|
+
return send(*args, **kwargs)
|
|
91
|
+
|
|
92
|
+
QLAPI = BaseApi()
|
|
93
|
+
builtins.QLAPI = QLAPI
|
|
97
94
|
except Exception as error:
|
|
98
95
|
print(f"run builtin code error: {error}\n")
|