alemonjs 2.1.81 → 2.1.82

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.
Files changed (2) hide show
  1. package/lib/app/store.js +4 -7
  2. package/package.json +1 -1
package/lib/app/store.js CHANGED
@@ -157,11 +157,7 @@ const normalizeRuntimeAppError = (error) => {
157
157
  };
158
158
  };
159
159
  const sameRuntimeAppCapabilities = (left, right) => {
160
- return (left.event === right.event &&
161
- left.httpApi === right.httpApi &&
162
- left.web === right.web &&
163
- left.schedule === right.schedule &&
164
- left.expose === right.expose);
160
+ return (left.event === right.event && left.httpApi === right.httpApi && left.web === right.web && left.schedule === right.schedule && left.expose === right.expose);
165
161
  };
166
162
  const sameRuntimeAppError = (left, right) => {
167
163
  if (!left && !right) {
@@ -205,7 +201,7 @@ const registerRuntimeApp = (record) => {
205
201
  updatedAt: now
206
202
  };
207
203
  if (!current || current.status !== record.status) {
208
- logRuntimeAppStatus('info', runtimeApps[record.name]);
204
+ logRuntimeAppStatus(record.status === 'failed' ? 'warn' : 'debug', runtimeApps[record.name]);
209
205
  }
210
206
  return runtimeApps[record.name];
211
207
  };
@@ -222,7 +218,8 @@ const updateRuntimeAppStatus = (name, status, error) => {
222
218
  current.status = status;
223
219
  current.updatedAt = Date.now();
224
220
  current.error = normalizedError;
225
- logRuntimeAppStatus(status === 'failed' ? 'warn' : 'info', current);
221
+ const level = status === 'failed' ? 'warn' : status === 'disposed' ? 'info' : 'debug';
222
+ logRuntimeAppStatus(level, current);
226
223
  return current;
227
224
  };
228
225
  const updateRuntimeAppCapabilities = (name, capabilities) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alemonjs",
3
- "version": "2.1.81",
3
+ "version": "2.1.82",
4
4
  "description": "bot script",
5
5
  "author": "lemonade",
6
6
  "license": "MIT",