alemonjs 2.0.12 → 2.0.13
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.
|
@@ -111,26 +111,19 @@ const expendEvent = async (valueEvent, select, next) => {
|
|
|
111
111
|
}
|
|
112
112
|
if (Array.isArray(app.default.current)) {
|
|
113
113
|
let i = 0;
|
|
114
|
-
let T = true;
|
|
115
114
|
let isNext = false;
|
|
116
115
|
const onRes = (res) => {
|
|
117
116
|
if (isNext) {
|
|
118
117
|
// 内部调用了next
|
|
119
118
|
return;
|
|
120
119
|
}
|
|
121
|
-
if (
|
|
122
|
-
T = res;
|
|
123
|
-
}
|
|
124
|
-
else if (Array.isArray(res)) {
|
|
120
|
+
if (Array.isArray(res)) {
|
|
125
121
|
if (res.length > 0) {
|
|
126
122
|
// 发送数据
|
|
127
123
|
Send(...res);
|
|
128
124
|
}
|
|
129
125
|
}
|
|
130
126
|
else if (typeof res === 'object') {
|
|
131
|
-
if (typeof res?.allowGrouping === 'boolean') {
|
|
132
|
-
T = res.allowGrouping;
|
|
133
|
-
}
|
|
134
127
|
if (Array.isArray(res.data)) {
|
|
135
128
|
// 发送数据
|
|
136
129
|
Send(...res.data);
|
|
@@ -140,8 +133,7 @@ const expendEvent = async (valueEvent, select, next) => {
|
|
|
140
133
|
const start = async () => {
|
|
141
134
|
if (i >= app.default.current.length)
|
|
142
135
|
return;
|
|
143
|
-
|
|
144
|
-
if (!T)
|
|
136
|
+
if (isNext)
|
|
145
137
|
return;
|
|
146
138
|
if (isAsyncFunction(app.default.current[i])) {
|
|
147
139
|
const res = await app.default.current[i](valueEvent, (...cns) => {
|
|
@@ -166,22 +158,16 @@ const expendEvent = async (valueEvent, select, next) => {
|
|
|
166
158
|
let isNext = false;
|
|
167
159
|
const onRes = (res) => {
|
|
168
160
|
if (isNext) {
|
|
169
|
-
// 内部调用了next
|
|
170
161
|
return;
|
|
171
162
|
}
|
|
172
163
|
if (typeof res === 'boolean') {
|
|
173
|
-
// T = res
|
|
174
164
|
}
|
|
175
165
|
else if (Array.isArray(res)) {
|
|
176
166
|
if (res.length > 0) {
|
|
177
|
-
// 发送数据
|
|
178
167
|
Send(...res);
|
|
179
168
|
}
|
|
180
169
|
}
|
|
181
170
|
else if (typeof res === 'object') {
|
|
182
|
-
if (typeof res?.allowGrouping === 'boolean') {
|
|
183
|
-
// T = res.allowGrouping
|
|
184
|
-
}
|
|
185
171
|
if (Array.isArray(res.data)) {
|
|
186
172
|
// 发送数据
|
|
187
173
|
Send(...res.data);
|
|
@@ -110,7 +110,6 @@ const expendMiddleware = async (valueEvent, select, next) => {
|
|
|
110
110
|
}
|
|
111
111
|
if (Array.isArray(app.default.current)) {
|
|
112
112
|
let i = 0;
|
|
113
|
-
let T = true;
|
|
114
113
|
let isNext = false;
|
|
115
114
|
/**
|
|
116
115
|
*
|
|
@@ -119,22 +118,15 @@ const expendMiddleware = async (valueEvent, select, next) => {
|
|
|
119
118
|
*/
|
|
120
119
|
const onRes = (res) => {
|
|
121
120
|
if (isNext) {
|
|
122
|
-
// 被调用了next
|
|
123
121
|
return;
|
|
124
122
|
}
|
|
125
|
-
if (
|
|
126
|
-
T = res;
|
|
127
|
-
}
|
|
128
|
-
else if (Array.isArray(res)) {
|
|
123
|
+
if (Array.isArray(res)) {
|
|
129
124
|
if (res.length > 0) {
|
|
130
125
|
// 发送数据
|
|
131
126
|
Send(...res);
|
|
132
127
|
}
|
|
133
128
|
}
|
|
134
129
|
else if (typeof res === 'object') {
|
|
135
|
-
if (typeof res?.allowGrouping === 'boolean') {
|
|
136
|
-
T = res.allowGrouping;
|
|
137
|
-
}
|
|
138
130
|
if (Array.isArray(res.data)) {
|
|
139
131
|
// 发送数据
|
|
140
132
|
Send(...res.data);
|
|
@@ -144,8 +136,7 @@ const expendMiddleware = async (valueEvent, select, next) => {
|
|
|
144
136
|
const start = async () => {
|
|
145
137
|
if (i >= app.default.current.length)
|
|
146
138
|
return;
|
|
147
|
-
|
|
148
|
-
if (!T)
|
|
139
|
+
if (isNext)
|
|
149
140
|
return;
|
|
150
141
|
if (isAsyncFunction(app.default.current[i])) {
|
|
151
142
|
const res = await app.default.current[i](valueEvent, (...cns) => {
|
|
@@ -170,22 +161,15 @@ const expendMiddleware = async (valueEvent, select, next) => {
|
|
|
170
161
|
let isNext = false;
|
|
171
162
|
const onRes = (res) => {
|
|
172
163
|
if (isNext) {
|
|
173
|
-
// 被调用了next
|
|
174
164
|
return;
|
|
175
165
|
}
|
|
176
|
-
if (
|
|
177
|
-
// T = res
|
|
178
|
-
}
|
|
179
|
-
else if (Array.isArray(res)) {
|
|
166
|
+
if (Array.isArray(res)) {
|
|
180
167
|
if (res.length > 0) {
|
|
181
168
|
// 发送数据
|
|
182
169
|
Send(...res);
|
|
183
170
|
}
|
|
184
171
|
}
|
|
185
172
|
else if (typeof res === 'object') {
|
|
186
|
-
if (typeof res?.allowGrouping === 'boolean') {
|
|
187
|
-
// T = res.allowGrouping
|
|
188
|
-
}
|
|
189
173
|
if (Array.isArray(res.data)) {
|
|
190
174
|
// 发送数据
|
|
191
175
|
Send(...res.data);
|