-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support cname #19
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -159,7 +159,7 @@ const store = new OSSObject({ | |||||||||||||||||||||||||||||||||||||||||||||||
accessKeyId: 'your access key', | ||||||||||||||||||||||||||||||||||||||||||||||||
accessKeySecret: 'your access secret', | ||||||||||||||||||||||||||||||||||||||||||||||||
bucket: 'your bucket name', | ||||||||||||||||||||||||||||||||||||||||||||||||
region: 'oss-cn-hangzhou' | ||||||||||||||||||||||||||||||||||||||||||||||||
region: 'oss-cn-hangzhou', | ||||||||||||||||||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -175,20 +175,23 @@ const store = new OSSObject({ | |||||||||||||||||||||||||||||||||||||||||||||||
accessKeyId: 'your access key', | ||||||||||||||||||||||||||||||||||||||||||||||||
accessKeySecret: 'your access secret', | ||||||||||||||||||||||||||||||||||||||||||||||||
bucket: 'your bucket name', | ||||||||||||||||||||||||||||||||||||||||||||||||
endpoint: 'oss-accelerate.aliyuncs.com', | ||||||||||||||||||||||||||||||||||||||||||||||||
endpoint: 'https://oss-accelerate.aliyuncs.com', | ||||||||||||||||||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||
3. use custom domain | ||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||
See https://help.aliyun.com/zh/oss/user-guide/map-custom-domain-names-5 | ||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||
```js | ||||||||||||||||||||||||||||||||||||||||||||||||
const { OSSObject } = require('oss-client'); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||
const store = new OSSObject({ | ||||||||||||||||||||||||||||||||||||||||||||||||
accessKeyId: 'your access key', | ||||||||||||||||||||||||||||||||||||||||||||||||
accessKeySecret: 'your access secret', | ||||||||||||||||||||||||||||||||||||||||||||||||
cname: true, | ||||||||||||||||||||||||||||||||||||||||||||||||
endpoint: 'your custome domain', | ||||||||||||||||||||||||||||||||||||||||||||||||
// your custom domain endpoint | ||||||||||||||||||||||||||||||||||||||||||||||||
endpoint: 'https://my-static.domain.com', | ||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+184
to
+194
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure the The + // Set cname to true to use a custom domain name for bucket access. Committable suggestion
Suggested change
ToolsMarkdownlint
|
||||||||||||||||||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -1629,19 +1632,8 @@ RequestError | -1 | network error | 网络出现中断或异常 | |||||||||||||||||||||||||||||||||||||||||||||||
ConnectionTimeoutError | -2 | request connect timeout | 请求连接超时 | ||||||||||||||||||||||||||||||||||||||||||||||||
SecurityTokenExpired | 403 | sts Security Token Expired | sts Security Token 超时失效 | ||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||
<!-- GITCONTRIBUTOR_START --> | ||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||
## Contributors | ||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||
|[<img src="https://avatars.githubusercontent.com/u/1611647?v=4" width="100px;"/><br/><sub><b>PeterRao</b></sub>](https://github.com/PeterRao)<br/>|[<img src="https://avatars.githubusercontent.com/u/1209779?v=4" width="100px;"/><br/><sub><b>rockuw</b></sub>](https://github.com/rockuw)<br/>|[<img src="https://avatars.githubusercontent.com/u/156269?v=4" width="100px;"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>|[<img src="https://avatars.githubusercontent.com/u/985607?v=4" width="100px;"/><br/><sub><b>dead-horse</b></sub>](https://github.com/dead-horse)<br/>|[<img src="https://avatars.githubusercontent.com/u/24582204?v=4" width="100px;"/><br/><sub><b>taotao7</b></sub>](https://github.com/taotao7)<br/>|[<img src="https://avatars.githubusercontent.com/u/19388725?v=4" width="100px;"/><br/><sub><b>weiyie</b></sub>](https://github.com/weiyie)<br/>| | ||||||||||||||||||||||||||||||||||||||||||||||||
| :---: | :---: | :---: | :---: | :---: | :---: | | ||||||||||||||||||||||||||||||||||||||||||||||||
|[<img src="https://avatars.githubusercontent.com/u/5886725?v=4" width="100px;"/><br/><sub><b>binghaiwang</b></sub>](https://github.com/binghaiwang)<br/>|[<img src="https://avatars.githubusercontent.com/u/14790466?v=4" width="100px;"/><br/><sub><b>greenkeeperio-bot</b></sub>](https://github.com/greenkeeperio-bot)<br/>|[<img src="https://avatars.githubusercontent.com/u/5653578?v=4" width="100px;"/><br/><sub><b>luozhang002</b></sub>](https://github.com/luozhang002)<br/>|[<img src="https://avatars.githubusercontent.com/u/17213005?v=4" width="100px;"/><br/><sub><b>beajer</b></sub>](https://github.com/beajer)<br/>|[<img src="https://avatars.githubusercontent.com/u/17476119?v=4" width="100px;"/><br/><sub><b>mars-coder</b></sub>](https://github.com/mars-coder)<br/>|[<img src="https://avatars.githubusercontent.com/u/4757625?v=4" width="100px;"/><br/><sub><b>duan007a</b></sub>](https://github.com/duan007a)<br/>| | ||||||||||||||||||||||||||||||||||||||||||||||||
|[<img src="https://avatars.githubusercontent.com/u/33024188?v=4" width="100px;"/><br/><sub><b>Ari1c</b></sub>](https://github.com/Ari1c)<br/>|[<img src="https://avatars.githubusercontent.com/u/20496894?v=4" width="100px;"/><br/><sub><b>Pedestrian93</b></sub>](https://github.com/Pedestrian93)<br/>|[<img src="https://avatars.githubusercontent.com/u/13463883?v=4" width="100px;"/><br/><sub><b>microJ</b></sub>](https://github.com/microJ)<br/>|[<img src="https://avatars.githubusercontent.com/u/19716675?v=4" width="100px;"/><br/><sub><b>aloisklink</b></sub>](https://github.com/aloisklink)<br/>|[<img src="https://avatars.githubusercontent.com/u/360661?v=4" width="100px;"/><br/><sub><b>popomore</b></sub>](https://github.com/popomore)<br/>|[<img src="https://avatars.githubusercontent.com/u/32174276?v=4" width="100px;"/><br/><sub><b>semantic-release-bot</b></sub>](https://github.com/semantic-release-bot)<br/>| | ||||||||||||||||||||||||||||||||||||||||||||||||
|[<img src="https://avatars.githubusercontent.com/u/12809715?v=4" width="100px;"/><br/><sub><b>1019272778</b></sub>](https://github.com/1019272778)<br/>|[<img src="https://avatars.githubusercontent.com/u/863754?v=4" width="100px;"/><br/><sub><b>zensh</b></sub>](https://github.com/zensh)<br/>|[<img src="https://avatars.githubusercontent.com/u/340282?v=4" width="100px;"/><br/><sub><b>fool2fish</b></sub>](https://github.com/fool2fish)<br/>|[<img src="https://avatars.githubusercontent.com/u/8952081?v=4" width="100px;"/><br/><sub><b>AviVahl</b></sub>](https://github.com/AviVahl)<br/>|[<img src="https://avatars.githubusercontent.com/u/5139554?v=4" width="100px;"/><br/><sub><b>danielwpz</b></sub>](https://github.com/danielwpz)<br/>|[<img src="https://avatars.githubusercontent.com/u/19678627?v=4" width="100px;"/><br/><sub><b>tianniu0106</b></sub>](https://github.com/tianniu0106)<br/>| | ||||||||||||||||||||||||||||||||||||||||||||||||
|[<img src="https://avatars.githubusercontent.com/u/327019?v=4" width="100px;"/><br/><sub><b>JacksonTian</b></sub>](https://github.com/JacksonTian)<br/>|[<img src="https://avatars.githubusercontent.com/u/440651?v=4" width="100px;"/><br/><sub><b>jackytck</b></sub>](https://github.com/jackytck)<br/>|[<img src="https://avatars.githubusercontent.com/u/3422918?v=4" width="100px;"/><br/><sub><b>leoliew</b></sub>](https://github.com/leoliew)<br/>|[<img src="https://avatars.githubusercontent.com/u/103457?v=4" width="100px;"/><br/><sub><b>lfeng</b></sub>](https://github.com/lfeng)<br/>|[<img src="https://avatars.githubusercontent.com/u/19733683?v=4" width="100px;"/><br/><sub><b>snyk-bot</b></sub>](https://github.com/snyk-bot)<br/>|[<img src="https://avatars.githubusercontent.com/u/30425185?v=4" width="100px;"/><br/><sub><b>yupeng-yuxiaoyu</b></sub>](https://github.com/yupeng-yuxiaoyu)<br/>| | ||||||||||||||||||||||||||||||||||||||||||||||||
|[<img src="https://avatars.githubusercontent.com/u/99770068?v=4" width="100px;"/><br/><sub><b>sartoshi-foot-dao</b></sub>](https://github.com/sartoshi-foot-dao)<br/>|[<img src="https://avatars.githubusercontent.com/u/5172747?v=4" width="100px;"/><br/><sub><b>chay-xu</b></sub>](https://github.com/chay-xu)<br/>|[<img src="https://avatars.githubusercontent.com/u/4565306?v=4" width="100px;"/><br/><sub><b>chunpu</b></sub>](https://github.com/chunpu)<br/>|[<img src="https://avatars.githubusercontent.com/in/29110?v=4" width="100px;"/><br/><sub><b>dependabot[bot]</b></sub>](https://github.com/apps/dependabot)<br/>|[<img src="https://avatars.githubusercontent.com/u/7284558?v=4" width="100px;"/><br/><sub><b>duncup</b></sub>](https://github.com/duncup)<br/>|[<img src="https://avatars.githubusercontent.com/u/416060?v=4" width="100px;"/><br/><sub><b>qin</b></sub>](https://github.com/qin)<br/>| | ||||||||||||||||||||||||||||||||||||||||||||||||
[<img src="https://avatars.githubusercontent.com/u/17328761?v=4" width="100px;"/><br/><sub><b>rdwh</b></sub>](https://github.com/rdwh)<br/>|[<img src="https://avatars.githubusercontent.com/u/25103518?v=4" width="100px;"/><br/><sub><b>richex-cn</b></sub>](https://github.com/richex-cn)<br/>|[<img src="https://avatars.githubusercontent.com/u/45714422?v=4" width="100px;"/><br/><sub><b>hengshanMWC</b></sub>](https://github.com/hengshanMWC)<br/> | ||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||
This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Sat Sep 16 2023 01:02:55 GMT+0800`. | ||||||||||||||||||||||||||||||||||||||||||||||||
[![Contributors](https://contrib.rocks/image?repo=node-modules/oss-client)](https://github.com/node-modules/oss-client/graphs/contributors) | ||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||
<!-- GITCONTRIBUTOR_END --> | ||||||||||||||||||||||||||||||||||||||||||||||||
Made with [contributors-img](https://contrib.rocks). |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
{ | ||
"name": "oss-client", | ||
"version": "2.1.0", | ||
"engines": { | ||
"node": ">= 16.0.0" | ||
}, | ||
"description": "Aliyun OSS(Object Storage Service) Node.js Client", | ||
"scripts": { | ||
"lint": "eslint src test --ext .ts", | ||
"test": "egg-bin test", | ||
"test-local": "egg-bin test", | ||
"cov": "egg-bin cov", | ||
"ci": "npm run lint && npm run cov && npm run prepublishOnly", | ||
"contributor": "git-contributor", | ||
"ci": "npm run lint && npm run cov && npm run prepublishOnly && attw --pack", | ||
"prepublishOnly": "tshy && tshy-after" | ||
}, | ||
"repository": { | ||
|
@@ -25,9 +27,6 @@ | |
"bugs": { | ||
"url": "https://github.com/node-modules/oss-client/issues" | ||
}, | ||
"engines": { | ||
"node": ">= 16.0.0" | ||
}, | ||
"homepage": "https://github.com/node-modules/oss-client", | ||
"dependencies": { | ||
"is-type-of": "^2.0.1", | ||
|
@@ -40,6 +39,7 @@ | |
"xml2js": "^0.6.2" | ||
}, | ||
"devDependencies": { | ||
"@arethetypeswrong/cli": "^0.15.3", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tip Codebase Verification No usage of The dependency
Analysis chainAdd new dependency The addition of Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify the usage of `@arethetypeswrong/cli` in npm scripts.
# Test: Search for usage in npm scripts.
grep -R '@arethetypeswrong/cli' package.json
Length of output: 84 Script: #!/bin/bash
# Description: Verify the usage of `@arethetypeswrong/cli` in npm scripts.
# Extract and check the scripts section in package.json for any usage of @arethetypeswrong/cli.
jq '.scripts' package.json | grep '@arethetypeswrong/cli'
Length of output: 55 |
||
"@eggjs/tsconfig": "^1.1.0", | ||
"@types/mime": "^3.0.1", | ||
"@types/mocha": "^10.0.1", | ||
|
@@ -49,12 +49,10 @@ | |
"egg-bin": "^6.4.1", | ||
"eslint": "^8.25.0", | ||
"eslint-config-egg": "^13.0.0", | ||
"git-contributor": "^2.1.5", | ||
"tshy": "^1.0.0", | ||
"tshy-after": "^1.0.0", | ||
"typescript": "^5.2.2" | ||
}, | ||
"typings": "./dist/esm/index.d.ts", | ||
"files": [ | ||
"dist", | ||
"src" | ||
|
@@ -70,14 +68,17 @@ | |
"./package.json": "./package.json", | ||
".": { | ||
"import": { | ||
"source": "./src/index.ts", | ||
"types": "./dist/esm/index.d.ts", | ||
"default": "./dist/esm/index.js" | ||
}, | ||
"require": { | ||
"source": "./src/index.ts", | ||
"types": "./dist/commonjs/index.d.ts", | ||
"default": "./dist/commonjs/index.js" | ||
} | ||
} | ||
}, | ||
"types": "./dist/commonjs/index.d.ts" | ||
"types": "./dist/commonjs/index.d.ts", | ||
"main": "./dist/commonjs/index.js" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify the type of
region
in the documentation.The
region
parameter is used in the initialization ofOSSObject
, but its type isn't specified in the documentation. This could lead to confusion about what values are expected (string, object, etc.).Committable suggestion