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 +1 -1
- package/lib/simple-oss-client.js +5 -12
- package/package.json +3 -3
- package/simple-oss-client.d.ts +1 -1
package/LICENSE
CHANGED
package/lib/simple-oss-client.js
CHANGED
|
@@ -165,7 +165,11 @@ class SimpleOSSClient {
|
|
|
165
165
|
headers: response.headers
|
|
166
166
|
};
|
|
167
167
|
}
|
|
168
|
-
let data = await
|
|
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.
|
|
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.
|
|
23
|
+
"xml2js": "^0.6.2"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "12ff02bfc634ba84c771ca433d33aae2dc881436"
|
|
26
26
|
}
|
package/simple-oss-client.d.ts
CHANGED