@celljs/cos 4.3.0 → 4.4.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/README.md +24 -1
- package/package.json +4 -5
- package/cell.yml +0 -0
package/README.md
CHANGED
|
@@ -1 +1,24 @@
|
|
|
1
|
-
# Cell - COS Component
|
|
1
|
+
# Cell - COS Component
|
|
2
|
+
|
|
3
|
+
`ObjectStorageService` of [`@celljs/cloud`](../cloud) on [Tencent Cloud COS](https://www.tencentcloud.com/products/cos), with the `cos-nodejs-sdk-v5` SDK.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @celljs/cos
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
cloud:
|
|
11
|
+
region: ap-guangzhou
|
|
12
|
+
credentials:
|
|
13
|
+
accessKeyId: "${env.TENCENTCLOUD_SECRET_ID}"
|
|
14
|
+
accessKeySecret: "${env.TENCENTCLOUD_SECRET_KEY}"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
@Autowired(ObjectStorageService)
|
|
19
|
+
protected readonly storage: ObjectStorageService<any>;
|
|
20
|
+
|
|
21
|
+
await this.storage.putObject({ bucket: 'my-bucket-1250000000', key: 'a.txt', body: 'hello' });
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
COS bucket names include the APPID. `cloud.client` passes extra options to the COS client. See [@celljs/cloud](../cloud) for the interface and the credential sources.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/cos",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cell-component"
|
|
@@ -22,8 +22,7 @@
|
|
|
22
22
|
"files": [
|
|
23
23
|
"lib",
|
|
24
24
|
"esm",
|
|
25
|
-
"src"
|
|
26
|
-
"cell.yml"
|
|
25
|
+
"src"
|
|
27
26
|
],
|
|
28
27
|
"scripts": {
|
|
29
28
|
"build": "tsc -b && bun ../../scripts/build-esm.ts",
|
|
@@ -32,8 +31,8 @@
|
|
|
32
31
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
33
32
|
},
|
|
34
33
|
"dependencies": {
|
|
35
|
-
"@celljs/cloud": "4.
|
|
36
|
-
"@celljs/core": "4.
|
|
34
|
+
"@celljs/cloud": "4.4.1",
|
|
35
|
+
"@celljs/core": "4.4.1",
|
|
37
36
|
"cos-nodejs-sdk-v5": "^2.8.3"
|
|
38
37
|
},
|
|
39
38
|
"publishConfig": {
|
package/cell.yml
DELETED
|
File without changes
|