{"id":13841623,"url":"https://github.com/hustcc/aliyun-oss-deploy","last_synced_at":"2026-03-14T05:05:53.028Z","repository":{"id":32428596,"uuid":"132836457","full_name":"hustcc/aliyun-oss-deploy","owner":"hustcc","description":"🙈 一个 nodejs 命令行工具，用于部署静态资源到 aliyun oss，支持代码方式和 CLI 方式！","archived":false,"fork":false,"pushed_at":"2023-11-30T15:28:09.000Z","size":21,"stargazers_count":38,"open_issues_count":2,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-06T08:42:17.229Z","etag":null,"topics":["aliyun","aliyun-oss","cd","deploy","oss"],"latest_commit_sha":null,"homepage":"https://atool.vip/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hustcc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-05-10T02:15:23.000Z","updated_at":"2024-07-02T09:47:28.000Z","dependencies_parsed_at":"2023-11-30T16:44:56.913Z","dependency_job_id":null,"html_url":"https://github.com/hustcc/aliyun-oss-deploy","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"45f4202a72e9249da7ce0729b0e0c5dcfeeb102d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hustcc/aliyun-oss-deploy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Faliyun-oss-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Faliyun-oss-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Faliyun-oss-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Faliyun-oss-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hustcc","download_url":"https://codeload.github.com/hustcc/aliyun-oss-deploy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Faliyun-oss-deploy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269361124,"owners_count":24404306,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aliyun","aliyun-oss","cd","deploy","oss"],"created_at":"2024-08-04T17:01:17.066Z","updated_at":"2026-03-14T05:05:51.814Z","avatar_url":"https://github.com/hustcc.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","JavaScript (485)"],"sub_categories":[],"readme":"# aliyun-oss-deploy\n\n\u003e 一个用于部署静态资源到 aliyun oss 的模块，支持 putObject 和 putStream。可以代码方式或者 cli 方式调用！\n\n[![npm](https://img.shields.io/npm/v/aliyun-oss-deploy.svg)](https://www.npmjs.com/package/aliyun-oss-deploy)\n[![npm](https://img.shields.io/npm/dm/aliyun-oss-deploy.svg)](https://www.npmjs.com/package/aliyun-oss-deploy)\n\n![image](https://user-images.githubusercontent.com/7856674/40217123-aa5df822-5a9d-11e8-8b2d-5488967e3fcc.png)\n\n## Install\n\n```bash\nnpm i --save-dev aliyun-oss-deploy\n```\n\n\n## Usage\n\n - 代码方式\n\n```js\nconst deploy = require('aliyun-oss-deploy');\n\ndeploy(path, ossConfig[, prefix, byStream]);\n```\n\n**注意**：prefix 用来配置资源版本号比较合适，默认为空；byStream 默认为 false，表示使用 putObject 方法！\n\n\n - CLI 方式\n\n```bash\naliyun-oss-deploy -p ./dist -c .aliossrc -d static\n```\n\n帮助文档：\n\n```bash\naliyun-oss-deploy --help\nOptions:\n  --version        Show version number           [boolean]\n  -p, --filePath   Set your upload files path     [string]\n  -d, --prefix     Set the target dir of upload   [string]\n  -c, --aliossrc   Set your .aliossrc file path   [string]\n  -s, --useStream  Upload file by putStream      [boolean]\n  --help           Show help                     [boolean]\n```\n\n\n可以在 package.json 中直接使用\n\n```json\n{\n  \"script\": {\n    \"deploy\": \"aliyun-oss-deploy -p ./dist\"\n  }\n}\n```\n\n\n## Config\n\n\u003e 无论是代码方式还是 cli 方式，aliyun oss 配置文件都是下面的数据结构！\n\n**需要注意的是**：对于 CLI 方法，配置文件必须是 JSON 格式（双引号）！\n\n\n```js\n{\n  \"accessKeyId\": \"your accessKeyId\",\n  \"accessKeySecret\": \"your accessKeySecret\",\n  \"region\": \"your region\",\n  \"bucket\": \"your bucket\"\n}\n```\n\n**注意**：`region` 是区分 endpoint 的区域分类。\n\n\n## License\n\nISC@[hustcc](https://github.com/hustcc).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhustcc%2Faliyun-oss-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhustcc%2Faliyun-oss-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhustcc%2Faliyun-oss-deploy/lists"}