befly 2.0.0 → 2.0.1

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/main.js +2 -2
  2. package/package.json +2 -2
package/main.js CHANGED
@@ -7,7 +7,7 @@ import { Logger } from './utils/logger.js';
7
7
  import { Jwt } from './utils/jwt.js';
8
8
  import { validator } from './utils/validate.js';
9
9
  import { Crypto2 } from './utils/crypto.js';
10
- import { XMLParser } from './libs/xml/XMLParser.js';
10
+ import { Xml } from './libs/xml.js';
11
11
  import { isEmptyObject, isType, pickFields, sortPlugins, RYes, RNo, filename2, dirname2 } from './utils/util.js';
12
12
 
13
13
  const setCorsOptions = (req) => {
@@ -394,7 +394,7 @@ class Befly {
394
394
  ctx.body = await req.json();
395
395
  } else if (contentType.indexOf('xml') !== -1) {
396
396
  const textData = await req.text();
397
- const xmlData = new XMLParser().parse(textData);
397
+ const xmlData = Xml.parse(textData);
398
398
  ctx.body = xmlData?.xml ? xmlData.xml : xmlData;
399
399
  } else if (contentType.indexOf('form-data') !== -1) {
400
400
  ctx.body = await req.formData();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "befly",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Buma - 为 Bun 专属打造的 API 接口框架核心引擎",
5
5
  "type": "module",
6
6
  "private": false,
@@ -51,5 +51,5 @@
51
51
  "README.md",
52
52
  "vitest.config.js"
53
53
  ],
54
- "gitHead": "59aa632aa23cb30a332b268fed8a82cc752ba89b"
54
+ "gitHead": "568a64555d16f9a8175808ff6802572d2a9c78ca"
55
55
  }