Skip to content

Commit bebad56

Browse files
committed
feat: Console.logLevel
Update arguments-builder.config.ts Update response.dev.js Update request.dev.js Update database.mjs Update response.js Update setENV.mjs Update request.js
1 parent ab9c536 commit bebad56

File tree

7 files changed

+300
-100
lines changed

7 files changed

+300
-100
lines changed

arguments-builder.config.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,5 +140,20 @@ export default defineConfig({
140140
],
141141
type: "string",
142142
},
143+
{
144+
key: "LogLevel",
145+
name: "[调试] 日志等级",
146+
type: "string",
147+
defaultValue: "WARN",
148+
description: "选择脚本日志的输出等级,低于所选等级的日志将全部输出。",
149+
options: [
150+
{ key: "OFF", label: "关闭" },
151+
{ key: "ERROR", label: "❌ 错误" },
152+
{ key: "WARN", label: "⚠️ 警告" },
153+
{ key: "INFO", label: "ℹ️ 信息" },
154+
{ key: "DEBUG", label: "🅱️ 调试" },
155+
{ key: "ALL", label: "全部" },
156+
],
157+
},
143158
],
144159
});

src/function/database.mjs

Lines changed: 247 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,248 @@
11
export default {
2-
"Location": {
3-
"Settings": {
4-
"PEP": {
5-
"GCC": "US"
6-
}
7-
}
8-
},
9-
"Maps": {
10-
"Settings": {
11-
"UrlInfoSet": {
12-
"Dispatcher": "AutoNavi",
13-
"Directions": "AutoNavi",
14-
"RAP": "Apple",
15-
"LocationShift": "AUTO"
16-
},
17-
"TileSet": {
18-
"Map": "CN",
19-
"Satellite": "HYBRID",
20-
"Traffic": "CN",
21-
"POI": "CN",
22-
"Flyover": "XX",
23-
"Munin": "XX"
24-
},
25-
"GeoManifest": {
26-
"Dynamic": {
27-
"Config": {
28-
"CountryCode": "CN"
29-
}
30-
}
31-
},
32-
"Config": {
33-
"Announcements": {
34-
"Environment:": "CN"
35-
}
36-
}
37-
},
38-
"Configs": {}
39-
},
40-
"Watch": {
41-
"Settings": {
42-
"UrlInfoSet": {
43-
"LocationShift": "Apple"
44-
},
45-
"GeoManifest": {
46-
"Dynamic": {
47-
"Config": {
48-
"CountryCode": "US"
49-
}
50-
}
51-
},
52-
"Config": {
53-
"Announcements": {
54-
"Environment:": "CN"
55-
}
56-
}
57-
}
58-
}
59-
}
2+
Location: {
3+
Settings: {
4+
PEP: {
5+
GCC: "US",
6+
},
7+
},
8+
Configs: {},
9+
},
10+
Maps: {
11+
Settings: {
12+
UrlInfoSet: {
13+
Dispatcher: "AutoNavi",
14+
Directions: "AutoNavi",
15+
RAP: "Apple",
16+
LocationShift: "AUTO",
17+
},
18+
TileSet: {
19+
Map: "CN",
20+
Satellite: "HYBRID",
21+
Traffic: "CN",
22+
POI: "CN",
23+
Flyover: "XX",
24+
Munin: "XX",
25+
},
26+
GeoManifest: {
27+
Dynamic: {
28+
Config: {
29+
CountryCode: "CN",
30+
},
31+
},
32+
},
33+
Config: {
34+
Announcements: {
35+
"Environment:": "CN",
36+
},
37+
},
38+
},
39+
Configs: {},
40+
},
41+
Watch: {
42+
Settings: {
43+
UrlInfoSet: {
44+
LocationShift: "Apple",
45+
},
46+
GeoManifest: {
47+
Dynamic: {
48+
Config: {
49+
CountryCode: "US",
50+
},
51+
},
52+
},
53+
Config: {
54+
Announcements: {
55+
"Environment:": "CN",
56+
},
57+
},
58+
},
59+
Configs: {},
60+
},
61+
Default: {
62+
Settings: {
63+
LogLevel: "WARN",
64+
},
65+
Configs: {
66+
Storefront: {
67+
AE: "143481",
68+
AF: "143610",
69+
AG: "143540",
70+
AI: "143538",
71+
AL: "143575",
72+
AM: "143524",
73+
AO: "143564",
74+
AR: "143505",
75+
AT: "143445",
76+
AU: "143460",
77+
AZ: "143568",
78+
BA: "143612",
79+
BB: "143541",
80+
BD: "143490",
81+
BE: "143446",
82+
BF: "143578",
83+
BG: "143526",
84+
BH: "143559",
85+
BJ: "143576",
86+
BM: "143542",
87+
BN: "143560",
88+
BO: "143556",
89+
BR: "143503",
90+
BS: "143539",
91+
BT: "143577",
92+
BW: "143525",
93+
BY: "143565",
94+
BZ: "143555",
95+
CA: "143455",
96+
CD: "143613",
97+
CG: "143582",
98+
CH: "143459",
99+
CI: "143527",
100+
CL: "143483",
101+
CM: "143574",
102+
CN: "143465",
103+
CO: "143501",
104+
CR: "143495",
105+
CV: "143580",
106+
CY: "143557",
107+
CZ: "143489",
108+
DE: "143443",
109+
DK: "143458",
110+
DM: "143545",
111+
DO: "143508",
112+
DZ: "143563",
113+
EC: "143509",
114+
EE: "143518",
115+
EG: "143516",
116+
ES: "143454",
117+
FI: "143447",
118+
FJ: "143583",
119+
FM: "143591",
120+
FR: "143442",
121+
GA: "143614",
122+
GB: "143444",
123+
GD: "143546",
124+
GF: "143615",
125+
GH: "143573",
126+
GM: "143584",
127+
GR: "143448",
128+
GT: "143504",
129+
GW: "143585",
130+
GY: "143553",
131+
HK: "143463",
132+
HN: "143510",
133+
HR: "143494",
134+
HU: "143482",
135+
ID: "143476",
136+
IE: "143449",
137+
IL: "143491",
138+
IN: "143467",
139+
IQ: "143617",
140+
IS: "143558",
141+
IT: "143450",
142+
JM: "143511",
143+
JO: "143528",
144+
JP: "143462",
145+
KE: "143529",
146+
KG: "143586",
147+
KH: "143579",
148+
KN: "143548",
149+
KP: "143466",
150+
KR: "143466",
151+
KW: "143493",
152+
KY: "143544",
153+
KZ: "143517",
154+
TC: "143552",
155+
TD: "143581",
156+
TJ: "143603",
157+
TH: "143475",
158+
TM: "143604",
159+
TN: "143536",
160+
TO: "143608",
161+
TR: "143480",
162+
TT: "143551",
163+
TW: "143470",
164+
TZ: "143572",
165+
LA: "143587",
166+
LB: "143497",
167+
LC: "143549",
168+
LI: "143522",
169+
LK: "143486",
170+
LR: "143588",
171+
LT: "143520",
172+
LU: "143451",
173+
LV: "143519",
174+
LY: "143567",
175+
MA: "143620",
176+
MD: "143523",
177+
ME: "143619",
178+
MG: "143531",
179+
MK: "143530",
180+
ML: "143532",
181+
MM: "143570",
182+
MN: "143592",
183+
MO: "143515",
184+
MR: "143590",
185+
MS: "143547",
186+
MT: "143521",
187+
MU: "143533",
188+
MV: "143488",
189+
MW: "143589",
190+
MX: "143468",
191+
MY: "143473",
192+
MZ: "143593",
193+
NA: "143594",
194+
NE: "143534",
195+
NG: "143561",
196+
NI: "143512",
197+
NL: "143452",
198+
NO: "143457",
199+
NP: "143484",
200+
NR: "143606",
201+
NZ: "143461",
202+
OM: "143562",
203+
PA: "143485",
204+
PE: "143507",
205+
PG: "143597",
206+
PH: "143474",
207+
PK: "143477",
208+
PL: "143478",
209+
PT: "143453",
210+
PW: "143595",
211+
PY: "143513",
212+
QA: "143498",
213+
RO: "143487",
214+
RS: "143500",
215+
RU: "143469",
216+
RW: "143621",
217+
SA: "143479",
218+
SB: "143601",
219+
SC: "143599",
220+
SE: "143456",
221+
SG: "143464",
222+
SI: "143499",
223+
SK: "143496",
224+
SL: "143600",
225+
SN: "143535",
226+
SR: "143554",
227+
ST: "143598",
228+
SV: "143506",
229+
SZ: "143602",
230+
UA: "143492",
231+
UG: "143537",
232+
US: "143441",
233+
UY: "143514",
234+
UZ: "143566",
235+
VC: "143550",
236+
VE: "143502",
237+
VG: "143543",
238+
VN: "143471",
239+
VU: "143609",
240+
XK: "143624",
241+
YE: "143571",
242+
ZA: "143472",
243+
ZM: "143622",
244+
ZW: "143605",
245+
},
246+
},
247+
},
248+
};

src/function/setENV.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function setENV(name, platforms, database) {
1212
Console.log("☑️ Set Environment Variables");
1313
const { Settings, Caches, Configs } = getStorage(name, platforms, database);
1414
/***************** Settings *****************/
15-
Console.debug(`typeof Settings: ${typeof Settings}`, `Settings: ${JSON.stringify(Settings, null, 2)}`);
15+
Console.info(`typeof Settings: ${typeof Settings}`, `Settings: ${JSON.stringify(Settings, null, 2)}`);
1616
/***************** Caches *****************/
1717
//Console.debug(`typeof Caches: ${typeof Caches}`, `Caches: ${JSON.stringify(Caches)}`);
1818
/***************** Configs *****************/

0 commit comments

Comments
 (0)