@did-space/s3-driver 0.2.146 → 0.2.148
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.d.ts
CHANGED
|
@@ -36,6 +36,14 @@ export declare class S3SpaceOperator implements SpaceOperatorProtocol {
|
|
|
36
36
|
write(options: WriteOptions): Promise<void>;
|
|
37
37
|
delete(options: DeleteOptions): Promise<void>;
|
|
38
38
|
read(options: ReadOptions): Promise<Stream>;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @FIXME 在 prod spaces 里面发送 HeadObjectCommand 请求如同石沉大海,related: {@link https://github.com/ArcBlock/blocklet-server/issues/7257 从 NFT Maker 的 应用 Dashboard 备份到 Prod Spaces 的时候报错了 #7257}
|
|
42
|
+
* @description 获取文件的 MD5 哈希值
|
|
43
|
+
* @param {GetHashOptions} options
|
|
44
|
+
* @return {*} {Promise<string>}
|
|
45
|
+
* @memberof S3SpaceOperator
|
|
46
|
+
*/
|
|
39
47
|
getHash(options: GetHashOptions): Promise<string>;
|
|
40
48
|
exists(options: ReadOptions): Promise<boolean>;
|
|
41
49
|
/**
|
package/dist/operator/index.js
CHANGED
|
@@ -27,7 +27,6 @@ const lib_storage_1 = require("@aws-sdk/lib-storage");
|
|
|
27
27
|
const mime_types_1 = __importDefault(require("mime-types"));
|
|
28
28
|
const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
|
|
29
29
|
const debug_1 = __importDefault(require("debug"));
|
|
30
|
-
const utils_1 = require("../utils");
|
|
31
30
|
const { version: s3ClientVersion } = require('@aws-sdk/client-s3/package.json');
|
|
32
31
|
const { version: libStorageVersion } = require('@aws-sdk/lib-storage/package.json');
|
|
33
32
|
const debug = (0, debug_1.default)('@did-space/s3-driver:S3SpaceOperator');
|
|
@@ -202,6 +201,14 @@ class S3SpaceOperator {
|
|
|
202
201
|
}
|
|
203
202
|
});
|
|
204
203
|
}
|
|
204
|
+
/**
|
|
205
|
+
*
|
|
206
|
+
* @FIXME 在 prod spaces 里面发送 HeadObjectCommand 请求如同石沉大海,related: {@link https://github.com/ArcBlock/blocklet-server/issues/7257 从 NFT Maker 的 应用 Dashboard 备份到 Prod Spaces 的时候报错了 #7257}
|
|
207
|
+
* @description 获取文件的 MD5 哈希值
|
|
208
|
+
* @param {GetHashOptions} options
|
|
209
|
+
* @return {*} {Promise<string>}
|
|
210
|
+
* @memberof S3SpaceOperator
|
|
211
|
+
*/
|
|
205
212
|
getHash(options) {
|
|
206
213
|
return __awaiter(this, void 0, void 0, function* () {
|
|
207
214
|
const key = yield this.getObjectKey(options);
|
|
@@ -209,7 +216,7 @@ class S3SpaceOperator {
|
|
|
209
216
|
const output = yield this.s3Client.send(new client_s3_1.HeadObjectCommand({
|
|
210
217
|
Bucket: this.options.bucket,
|
|
211
218
|
Key: key,
|
|
212
|
-
})
|
|
219
|
+
}));
|
|
213
220
|
debug('getHash.after', `Bucket=${this.options.bucket} Key=${key}`);
|
|
214
221
|
return output.Metadata['x-hash'];
|
|
215
222
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@did-space/s3-driver",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.148",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@aws-sdk/client-s3": "
|
|
36
|
-
"@aws-sdk/lib-storage": "
|
|
37
|
-
"@did-space/core": "0.2.
|
|
35
|
+
"@aws-sdk/client-s3": "3.370.0",
|
|
36
|
+
"@aws-sdk/lib-storage": "3.370.0",
|
|
37
|
+
"@did-space/core": "0.2.148",
|
|
38
38
|
"debug": "^4.3.4",
|
|
39
39
|
"js-yaml": "^4.1.0",
|
|
40
40
|
"lodash": "^4.17.21",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"ts-jest": "^28.0.6",
|
|
57
57
|
"typescript": "^4.9.5"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "d545df21ded99fbf28ee582cc507d2ab325c1598"
|
|
60
60
|
}
|