alemonjs 1.0.4 → 1.0.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/lib/define/main.js +16 -23
- package/package.json +1 -1
package/lib/define/main.js
CHANGED
|
@@ -36,16 +36,6 @@ export async function defineAlemonConfig(Options) {
|
|
|
36
36
|
if (!Options)
|
|
37
37
|
return;
|
|
38
38
|
OptionsCache = Options;
|
|
39
|
-
/**
|
|
40
|
-
* **********
|
|
41
|
-
* 运行前执行
|
|
42
|
-
* **********
|
|
43
|
-
*/
|
|
44
|
-
if (Options?.command) {
|
|
45
|
-
for await (const item of Options.command) {
|
|
46
|
-
await command(item);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
39
|
/**
|
|
50
40
|
* *******
|
|
51
41
|
* pup配置
|
|
@@ -125,7 +115,7 @@ export async function defineAlemonConfig(Options) {
|
|
|
125
115
|
await rebotMap[item]();
|
|
126
116
|
}
|
|
127
117
|
}
|
|
128
|
-
|
|
118
|
+
if (!Options?.login || Object.keys(Options?.login ?? {}).length == 0) {
|
|
129
119
|
console.info('[LOGIN] 无登录配置');
|
|
130
120
|
}
|
|
131
121
|
/**
|
|
@@ -183,22 +173,25 @@ export async function defineAlemonConfig(Options) {
|
|
|
183
173
|
}
|
|
184
174
|
app.mount('#app');
|
|
185
175
|
}
|
|
176
|
+
/**
|
|
177
|
+
* **********
|
|
178
|
+
* 附加执行
|
|
179
|
+
* **********
|
|
180
|
+
*/
|
|
181
|
+
if (Options?.command) {
|
|
182
|
+
for await (const item of Options.command) {
|
|
183
|
+
await command(item);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
186
|
/**
|
|
187
187
|
* ***************
|
|
188
|
-
*
|
|
189
|
-
* 不会执行附加脚本
|
|
188
|
+
* 附加脚本
|
|
190
189
|
* ***************
|
|
191
190
|
*/
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
*/
|
|
197
|
-
if (Options?.scripts) {
|
|
198
|
-
for await (const item of Options.scripts) {
|
|
199
|
-
const name = item?.name ?? 'node';
|
|
200
|
-
nodeScripts(name, item?.file, item?.ars ?? []);
|
|
201
|
-
}
|
|
191
|
+
if (Options?.scripts) {
|
|
192
|
+
for await (const item of Options.scripts) {
|
|
193
|
+
const name = item?.name ?? 'node';
|
|
194
|
+
nodeScripts(name, item?.file, item?.ars ?? []);
|
|
202
195
|
}
|
|
203
196
|
}
|
|
204
197
|
return;
|