@did-space/s3-driver 0.3.7 → 0.3.9
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/dist/operator/index.js +11 -6
- package/package.json +8 -4
package/dist/operator/index.js
CHANGED
|
@@ -450,12 +450,17 @@ class S3SpaceOperator {
|
|
|
450
450
|
debug('writeAsOwner.before', JSON.stringify({ key, options }));
|
|
451
451
|
const $key = (0, common_1.getSafeKey)((options === null || options === void 0 ? void 0 : options.useGlobal) ? key : (0, path_1.join)(this.options.root, key));
|
|
452
452
|
debug('writeAsOwner.$$key', $key);
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
453
|
+
const upload = new lib_storage_1.Upload({
|
|
454
|
+
client: this.s3Client,
|
|
455
|
+
params: {
|
|
456
|
+
Bucket: this.options.bucket,
|
|
457
|
+
// @note: 注意 key 不能以 / 开头
|
|
458
|
+
Key: $key,
|
|
459
|
+
Body: data,
|
|
460
|
+
},
|
|
461
|
+
});
|
|
462
|
+
yield upload.done();
|
|
463
|
+
debug('writeAsOwner.after', JSON.stringify({ key, options }));
|
|
459
464
|
});
|
|
460
465
|
}
|
|
461
466
|
/**
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@did-space/s3-driver",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"description": "Decentralized file space managed by DID",
|
|
8
|
-
"author":
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "arcblock",
|
|
10
|
+
"email": "blocklet@arcblock.io",
|
|
11
|
+
"url": "https://github.com/blocklet"
|
|
12
|
+
},
|
|
9
13
|
"homepage": "",
|
|
10
14
|
"license": "ISC",
|
|
11
15
|
"main": "dist/index.js",
|
|
@@ -34,7 +38,7 @@
|
|
|
34
38
|
"dependencies": {
|
|
35
39
|
"@aws-sdk/client-s3": "3.370.0",
|
|
36
40
|
"@aws-sdk/lib-storage": "3.370.0",
|
|
37
|
-
"@did-space/core": "0.3.
|
|
41
|
+
"@did-space/core": "0.3.9",
|
|
38
42
|
"debug": "^4.3.4",
|
|
39
43
|
"js-yaml": "^4.1.0",
|
|
40
44
|
"lodash": "^4.17.21",
|
|
@@ -57,5 +61,5 @@
|
|
|
57
61
|
"ts-jest": "^28.0.6",
|
|
58
62
|
"typescript": "^4.9.5"
|
|
59
63
|
},
|
|
60
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "82db55693ead83d0185ae410b0660a53f996a6e9"
|
|
61
65
|
}
|