deeke-script-app 1.5.3 → 1.5.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 +1 -1
- package/test/2.0/engines/enginesSimple.js +72 -0
- package/test/conf.d/default.conf +0 -0
- package/test/conf.d/link.conf +0 -42
- package/test/conf.d/mp.conf +0 -39
- package/test/conf.d/topuplive.conf +0 -68
- package/test/conf.d/yr60.conf +0 -67
package/package.json
CHANGED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
|
|
2
|
+
function test() {
|
|
3
|
+
let script = "let a = 12;console.log(a);System.sleep(3000);console.log(a);System.sleep(3000);console.log(a);";
|
|
4
|
+
Engines.executeScriptStr(script);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// test();
|
|
8
|
+
|
|
9
|
+
// console.log(1);
|
|
10
|
+
// for(let i = 0;i<1000;i++){
|
|
11
|
+
// //
|
|
12
|
+
// }
|
|
13
|
+
// System.sleep(5000);
|
|
14
|
+
// console.log(2);
|
|
15
|
+
|
|
16
|
+
function test1() {
|
|
17
|
+
console.log("任务开始");
|
|
18
|
+
setTimeout(() => {
|
|
19
|
+
console.log("延时3秒执行完成");
|
|
20
|
+
}, 3000);
|
|
21
|
+
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
let i = 0;
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
let timer = setInterval(() => {
|
|
26
|
+
if (i >= 3) {
|
|
27
|
+
clearInterval(timer);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
console.log("每3秒执行一次:" + i++);
|
|
31
|
+
}, 3000);
|
|
32
|
+
|
|
33
|
+
console.log('任务结束');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// test1();
|
|
37
|
+
|
|
38
|
+
function test2() {
|
|
39
|
+
let script = "let a = 12;console.log(a);System.sleep(3000);setTimeout(()=>console.log(22), 3000);console.log(a);";
|
|
40
|
+
Engines.executeScriptStr(script);
|
|
41
|
+
setTimeout(() => {
|
|
42
|
+
console.log("延时3秒执行完成");
|
|
43
|
+
}, 3000);
|
|
44
|
+
}
|
|
45
|
+
// test2();
|
|
46
|
+
|
|
47
|
+
let timerIndex;
|
|
48
|
+
function test3() {
|
|
49
|
+
let obj = {
|
|
50
|
+
run: function () {
|
|
51
|
+
console.log('线程');
|
|
52
|
+
timerIndex = setInterval(() => {
|
|
53
|
+
for (let i = 0; i <= 5; i++) {
|
|
54
|
+
console.log('延时3秒执行完成');
|
|
55
|
+
}
|
|
56
|
+
}, 3000);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
let thread = new java.lang.Thread(new java.lang.Runnable(obj));
|
|
61
|
+
|
|
62
|
+
thread.start();
|
|
63
|
+
thread.join();
|
|
64
|
+
console.log('主线程');
|
|
65
|
+
|
|
66
|
+
// setTimeout(() => {
|
|
67
|
+
// console.log("main-延时3秒执行完成", timerIndex);
|
|
68
|
+
// clearInterval(timerIndex);
|
|
69
|
+
// }, 12000);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
test3();
|
package/test/conf.d/default.conf
DELETED
|
File without changes
|
package/test/conf.d/link.conf
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
server {
|
|
2
|
-
listen 80;
|
|
3
|
-
listen [::]:80;
|
|
4
|
-
server_name link.local;
|
|
5
|
-
root /usr/share/nginx/html/link;
|
|
6
|
-
|
|
7
|
-
add_header X-Frame-Options "SAMEORIGIN";
|
|
8
|
-
add_header X-Content-Type-Options "nosniff";
|
|
9
|
-
|
|
10
|
-
index index.php index.html index.htm;
|
|
11
|
-
|
|
12
|
-
charset utf-8;
|
|
13
|
-
|
|
14
|
-
location = /favicon.ico {
|
|
15
|
-
access_log off; log_not_found off;
|
|
16
|
-
}
|
|
17
|
-
location = /robots.txt {
|
|
18
|
-
access_log off; log_not_found off;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
error_page 404 /index.php;
|
|
22
|
-
|
|
23
|
-
location / {
|
|
24
|
-
if (!-e $request_filename) {
|
|
25
|
-
rewrite ^/s/(.*)$ /s/index.php?key=$1 last;
|
|
26
|
-
rewrite ^/(.*)$ /s/dwz.php?key=$1 last;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
location ~ \.php$ {
|
|
31
|
-
add_header 'Access-Control-Allow-Origin' '*';
|
|
32
|
-
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
|
33
|
-
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,lang';
|
|
34
|
-
fastcgi_pass php:9000;
|
|
35
|
-
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
|
36
|
-
include fastcgi_params;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
location ~ /\.(?!well-known).* {
|
|
40
|
-
deny all;
|
|
41
|
-
}
|
|
42
|
-
}
|
package/test/conf.d/mp.conf
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
server {
|
|
2
|
-
listen 80;
|
|
3
|
-
listen [::]:80;
|
|
4
|
-
server_name mp.local;
|
|
5
|
-
root /usr/share/nginx/html/mp/mp-laravel/public;
|
|
6
|
-
|
|
7
|
-
add_header X-Frame-Options "SAMEORIGIN";
|
|
8
|
-
add_header X-Content-Type-Options "nosniff";
|
|
9
|
-
|
|
10
|
-
index index.php;
|
|
11
|
-
|
|
12
|
-
charset utf-8;
|
|
13
|
-
|
|
14
|
-
location = /favicon.ico {
|
|
15
|
-
access_log off; log_not_found off;
|
|
16
|
-
}
|
|
17
|
-
location = /robots.txt {
|
|
18
|
-
access_log off; log_not_found off;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
error_page 404 /index.php;
|
|
22
|
-
|
|
23
|
-
location / {
|
|
24
|
-
try_files $uri $uri/ /index.php?$query_string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
location ~ \.php$ {
|
|
28
|
-
add_header 'Access-Control-Allow-Origin' '*';
|
|
29
|
-
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
|
30
|
-
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,lang';
|
|
31
|
-
fastcgi_pass php83:9000;
|
|
32
|
-
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
|
33
|
-
include fastcgi_params;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
location ~ /\.(?!well-known).* {
|
|
37
|
-
deny all;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
server {
|
|
2
|
-
listen 80;
|
|
3
|
-
listen [::]:80;
|
|
4
|
-
server_name topuplive.local;
|
|
5
|
-
root /usr/share/nginx/html/topuplive/public;
|
|
6
|
-
|
|
7
|
-
add_header X-Frame-Options "SAMEORIGIN";
|
|
8
|
-
add_header X-Content-Type-Options "nosniff";
|
|
9
|
-
|
|
10
|
-
index index.php;
|
|
11
|
-
|
|
12
|
-
charset utf-8;
|
|
13
|
-
|
|
14
|
-
location = /favicon.ico {
|
|
15
|
-
access_log off; log_not_found off;
|
|
16
|
-
}
|
|
17
|
-
location = /robots.txt {
|
|
18
|
-
access_log off; log_not_found off;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
error_page 404 /index.php;
|
|
22
|
-
|
|
23
|
-
location / {
|
|
24
|
-
try_files $uri $uri/ /index.php?$query_string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
location /api {
|
|
29
|
-
proxy_set_header Host $host;
|
|
30
|
-
proxy_set_header X-Real-IP $remote_addr;
|
|
31
|
-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
32
|
-
proxy_set_header X-NginX-Proxy true;
|
|
33
|
-
proxy_pass http://topuplive.local/admin;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
location /status {
|
|
37
|
-
fastcgi_pass php:9000;
|
|
38
|
-
include fastcgi_params;
|
|
39
|
-
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
location /pro-api {
|
|
43
|
-
if ($request_method = 'OPTIONS') {
|
|
44
|
-
add_header 'Access-Control-Allow-Origin' '*';
|
|
45
|
-
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
|
46
|
-
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,lang,authorization';
|
|
47
|
-
add_header 'Access-Control-Max-Age' 1728000;
|
|
48
|
-
add_header 'Content-Type' 'text/plain charset=UTF-8';
|
|
49
|
-
add_header 'Content-Length' 0;
|
|
50
|
-
return 204;
|
|
51
|
-
}
|
|
52
|
-
proxy_set_header client-ip $remote_addr;
|
|
53
|
-
proxy_pass http://topuplive.local/user;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
location ~ \.php$ {
|
|
57
|
-
add_header 'Access-Control-Allow-Origin' '*';
|
|
58
|
-
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
|
59
|
-
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,lang';
|
|
60
|
-
fastcgi_pass php:9000;
|
|
61
|
-
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
|
62
|
-
include fastcgi_params;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
location ~ /\.(?!well-known).* {
|
|
66
|
-
deny all;
|
|
67
|
-
}
|
|
68
|
-
}
|
package/test/conf.d/yr60.conf
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
server {
|
|
2
|
-
listen 80;
|
|
3
|
-
listen [::]:80;
|
|
4
|
-
server_name topup60yr.local;
|
|
5
|
-
root /usr/share/nginx/html/topup60yr/public;
|
|
6
|
-
|
|
7
|
-
add_header X-Frame-Options "SAMEORIGIN";
|
|
8
|
-
add_header X-Content-Type-Options "nosniff";
|
|
9
|
-
|
|
10
|
-
index index.php;
|
|
11
|
-
|
|
12
|
-
charset utf-8;
|
|
13
|
-
|
|
14
|
-
location = /favicon.ico {
|
|
15
|
-
access_log off; log_not_found off;
|
|
16
|
-
}
|
|
17
|
-
location = /robots.txt {
|
|
18
|
-
access_log off; log_not_found off;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
error_page 404 /index.php;
|
|
22
|
-
|
|
23
|
-
location / {
|
|
24
|
-
try_files $uri $uri/ /index.php?$query_string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
location /api {
|
|
29
|
-
proxy_set_header Host $host;
|
|
30
|
-
proxy_set_header X-Real-IP $remote_addr;
|
|
31
|
-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
32
|
-
proxy_set_header X-NginX-Proxy true;
|
|
33
|
-
proxy_pass http://topup60yr.local/admin;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
location /cmsApi {
|
|
37
|
-
proxy_set_header client-ip $remote_addr;
|
|
38
|
-
proxy_pass https://cms.itangka.com/cmsApi;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
location /pro-api {
|
|
42
|
-
if ($request_method = 'OPTIONS') {
|
|
43
|
-
add_header 'Access-Control-Allow-Origin' '*';
|
|
44
|
-
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
|
45
|
-
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,lang,authorization';
|
|
46
|
-
add_header 'Access-Control-Max-Age' 1728000;
|
|
47
|
-
add_header 'Content-Type' 'text/plain charset=UTF-8';
|
|
48
|
-
add_header 'Content-Length' 0;
|
|
49
|
-
return 204;
|
|
50
|
-
}
|
|
51
|
-
proxy_set_header client-ip $remote_addr;
|
|
52
|
-
proxy_pass http://topup60yr.local/user;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
location ~ \.php$ {
|
|
56
|
-
add_header 'Access-Control-Allow-Origin' '*';
|
|
57
|
-
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
|
58
|
-
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,lang';
|
|
59
|
-
fastcgi_pass php:9000;
|
|
60
|
-
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
|
61
|
-
include fastcgi_params;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
location ~ /\.(?!well-known).* {
|
|
65
|
-
deny all;
|
|
66
|
-
}
|
|
67
|
-
}
|