@waline/vercel 1.31.5 → 1.31.7

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@waline/vercel",
3
- "version": "1.31.5",
3
+ "version": "1.31.7",
4
4
  "description": "vercel server for waline comment system",
5
5
  "keywords": [
6
6
  "waline",
@@ -18,23 +18,23 @@
18
18
  "@cloudbase/node-sdk": "^2.11.0",
19
19
  "@koa/cors": "^4.0.0",
20
20
  "akismet": "^2.0.7",
21
- "deta": "^1.2.0",
22
- "dompurify": "^3.0.5",
21
+ "deta": "^2.0.0",
22
+ "dompurify": "^3.0.6",
23
23
  "dy-node-ip2region": "^1.0.1",
24
24
  "fast-csv": "^4.3.6",
25
25
  "form-data": "^4.0.0",
26
26
  "jsdom": "^22.1.0",
27
- "jsonwebtoken": "^9.0.1",
28
- "katex": "^0.16.8",
27
+ "jsonwebtoken": "^9.0.2",
28
+ "katex": "^0.16.9",
29
29
  "koa-compose": "^4.1.0",
30
- "leancloud-storage": "^4.15.0",
31
- "markdown-it": "^13.0.1",
30
+ "leancloud-storage": "^4.15.1",
31
+ "markdown-it": "^13.0.2",
32
32
  "markdown-it-emoji": "^2.0.2",
33
33
  "markdown-it-sub": "^1.0.0",
34
34
  "markdown-it-sup": "^1.0.0",
35
35
  "mathjax-full": "^3.2.2",
36
36
  "node-fetch": "^2.7.0",
37
- "nodemailer": "^6.9.4",
37
+ "nodemailer": "^6.9.6",
38
38
  "nunjucks": "^3.2.4",
39
39
  "phpass": "^0.1.1",
40
40
  "prismjs": "^1.29.0",
@@ -49,7 +49,7 @@
49
49
  "think-mongo": "^2.2.1",
50
50
  "think-router-rest": "^1.0.5",
51
51
  "thinkjs": "^3.2.15",
52
- "ua-parser-js": "^1.0.35"
52
+ "ua-parser-js": "^1.0.36"
53
53
  },
54
54
  "engines": {
55
55
  "node": ">=14"
@@ -405,15 +405,16 @@ module.exports = class extends Base {
405
405
  ret.map(async (item) => {
406
406
  const _oldStatus = item.get('status');
407
407
 
408
- var newData
409
- if (think.isFunction(data)) {
410
- newData = data(item.toJSON())
411
- }
412
- if ('updatedAt' in newData) {
413
- delete newData.updatedAt
414
- }
415
- item.set(newData)
408
+ var updateData = typeof data === 'function' ? data(item.toJSON()) : data;
416
409
 
410
+ const REVERSED_KEYS = ['createdAt', 'updatedAt'];
411
+ for (const k in updateData) {
412
+ if (REVERSED_KEYS.includes(k)) {
413
+ continue;
414
+ }
415
+ item.set(k, updateData[k]);
416
+ }
417
+
417
418
  const _newStatus = item.get('status');
418
419
 
419
420
  if (_newStatus && _oldStatus !== _newStatus) {