@celljs/oss 4.3.0 → 4.4.0
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 +25 -1
- package/package.json +4 -5
- package/cell.yml +0 -0
package/README.md
CHANGED
|
@@ -1 +1,25 @@
|
|
|
1
|
-
# Cell - OSS Component
|
|
1
|
+
# Cell - OSS Component
|
|
2
|
+
|
|
3
|
+
`ObjectStorageService` of [`@celljs/cloud`](../cloud) on [Alibaba Cloud OSS](https://www.alibabacloud.com/product/object-storage-service), with the `ali-oss` SDK.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @celljs/oss
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
cloud:
|
|
11
|
+
region: cn-hangzhou # the client uses oss-<region>
|
|
12
|
+
credentials:
|
|
13
|
+
accessKeyId: "${env.ALIBABA_CLOUD_ACCESS_KEY_ID}"
|
|
14
|
+
accessKeySecret: "${env.ALIBABA_CLOUD_ACCESS_KEY_SECRET}"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
@Autowired(ObjectStorageService)
|
|
19
|
+
protected readonly storage: ObjectStorageService<OSS>;
|
|
20
|
+
|
|
21
|
+
await this.storage.putObject({ bucket: 'my-bucket', key: 'a.txt', body: 'hello' });
|
|
22
|
+
const body = await this.storage.getObject({ bucket: 'my-bucket', key: 'a.txt' });
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`cloud.client` passes extra options to the `ali-oss` client (`endpoint`, `internal`, `timeout`, ...). 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/oss",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
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.0",
|
|
35
|
+
"@celljs/core": "4.4.0",
|
|
37
36
|
"@types/ali-oss": "^6.0.5",
|
|
38
37
|
"ali-oss": "^6.23.0"
|
|
39
38
|
},
|
package/cell.yml
DELETED
|
File without changes
|