fsd-oss 0.13.0 → 0.13.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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2018 郑州脉冲软件科技有限公司
3
+ Copyright (c) 2023 郑州渺漠信息科技有限公司
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -165,7 +165,11 @@ class SimpleOSSClient {
165
165
  headers: response.headers
166
166
  };
167
167
  }
168
- let data = await xml2data(xml);
168
+ let data = await xml2js.parseStringPromise(xml, {
169
+ trim: true,
170
+ explicitArray: false,
171
+ explicitRoot: false
172
+ });
169
173
  if (data.Code) {
170
174
  throw new Error(data.Message);
171
175
  }
@@ -217,14 +221,3 @@ class SimpleOSSClient {
217
221
  }
218
222
  }
219
223
  exports.default = SimpleOSSClient;
220
- function xml2data(xml) {
221
- return new Promise((resolve, reject) => {
222
- const opt = { trim: true, explicitArray: false, explicitRoot: false };
223
- xml2js.parseString(xml, opt, (error, result) => {
224
- if (error) {
225
- return reject(new Error('XMLDataError'));
226
- }
227
- resolve(result);
228
- });
229
- });
230
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fsd-oss",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "description": "Aliyun OSS adapter for fsd",
5
5
  "main": "lib/index.js",
6
6
  "types": "index.d.ts",
@@ -20,7 +20,7 @@
20
20
  "mime-types": "^2.1.35",
21
21
  "minimatch": "^3.1.2",
22
22
  "slash": "^3.0.0",
23
- "xml2js": "^0.5.0"
23
+ "xml2js": "^0.6.2"
24
24
  },
25
- "gitHead": "1548128573c0fd22977706a6704029ec3ca3bab6"
25
+ "gitHead": "12ff02bfc634ba84c771ca433d33aae2dc881436"
26
26
  }
@@ -1,4 +1,4 @@
1
- import { Request } from 'akita';
1
+ import type { Request } from 'akita';
2
2
 
3
3
  export default class SimpleOSSClient {
4
4
  config: SimpleOSSClientConfig;