{"id":24871171,"url":"https://github.com/staven630/webpack-oss","last_synced_at":"2025-10-15T14:31:57.801Z","repository":{"id":57397453,"uuid":"129719040","full_name":"staven630/webpack-oss","owner":"staven630","description":"webpack静态资源一键上传阿里云OSS插件，兼容webpack3.x/4.x","archived":false,"fork":false,"pushed_at":"2020-01-13T10:18:45.000Z","size":31,"stargazers_count":29,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T15:26:50.584Z","etag":null,"topics":["oss","webpack","webpack-oss"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/staven630.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-16T09:32:45.000Z","updated_at":"2022-08-17T05:59:06.000Z","dependencies_parsed_at":"2022-09-07T02:40:28.495Z","dependency_job_id":null,"html_url":"https://github.com/staven630/webpack-oss","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/staven630/webpack-oss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staven630%2Fwebpack-oss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staven630%2Fwebpack-oss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staven630%2Fwebpack-oss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staven630%2Fwebpack-oss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/staven630","download_url":"https://codeload.github.com/staven630/webpack-oss/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staven630%2Fwebpack-oss/sbom","scorecard":{"id":846990,"data":{"date":"2025-08-11","repo":{"name":"github.com/staven630/webpack-oss","commit":"516faa25526d8da0c9862357f9e4dd6b6270b06e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-23T21:42:39.907Z","repository_id":57397453,"created_at":"2025-08-23T21:42:39.908Z","updated_at":"2025-08-23T21:42:39.908Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019610,"owners_count":26086760,"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-10-14T02:00:06.444Z","response_time":60,"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":["oss","webpack","webpack-oss"],"created_at":"2025-02-01T04:31:08.354Z","updated_at":"2025-10-15T14:31:57.493Z","avatar_url":"https://github.com/staven630.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [webpack-oss](https://github.com/staven630/webpack-oss)\n\u003e webpack静态资源一键上传阿里云OSS插件，兼容webpack3.x/4.x\n\n# 安装\n\n```\nnpm i webpack-oss --save-dev\n```\n\n# 参数\n| 选项名          | 类型                 | 是否必填 | 默认值 | 描述                                                                                                                                 |\n| :-------------- | :------------------- | :------- | :----- | :----------------------------------------------------------------------------------------------------------------------------------- |\n| accessKeyId     | String               | √        |        | 阿里云accessKeyId                                                                                                                    |\n| accessKeySecret | String               | √        |        | 阿里云accessKeySecret                                                                                                                |\n| region          | String               | √        |        | 阿里云region                                                                                                                         |\n| bucket          | String               | √        |        | 阿里云bucket                                                                                                                         |\n| prefix          | String               | ×        | ''     | 自定义路径前缀，通常使用项目目录名，文件将存放在alioss的bucket/prefix目录下                                                          |\n| format          | Number               | ×        | ''     | 可用时间戳来生成oss目录版本号，每次会保留最近的版本文件做零宕机发布，删除其他版本文件。可以通过插件自身提供的静态方法getFormat()获得 |\n| limit           | Number               | ×        | 5      | 最多备份版本数量，会备份最近的版本，最小是3。配置了format才会生效                                                                    |\n| deleteAll       | Boolean              | ×        |        | 是否删除bucket/prefix中所有文件。优先匹配format配置                                                                                  |\n| local           | Boolean              | ×        | false  | 默认每次上传webpack构建流中文件，设为true可上传打包后webpack output指向目录里的文件                                                  |\n| output          | String               | ×        | ''     | 读取本地目录的路径，如果local为true，output为空，默认为读取webpack输出目录                                                           |\n| exclude         | ExpReg/Array\u003cExpReg\u003e | ×        | null   | 可传入正则，或正则组成的数组，来排除上传的文件                                                                                       |\n\n# 静态方法\n\u003e static getFormat()\n\n\u0026emsp;\u0026emsp;参数又由YYYY|YY|MM|DD|HH|hh|mm|SS|ss组合而成，返回一个纯数字。\n                                                        |\n```javascript\nconst WebpackAliOSSPlugin = require('webpack-oss')\n\nWebpackAliOSSPlugin.getFormat()\nWebpackAliOSSPlugin.getFormat('YYYY')\n```\n\n\n# 实例\n\n* 使用webpack构建流文件上传，并删原有所有资源\n```javascript\nconst WebpackAliOSSPlugin = require('webpack-oss')\n\nnew WebpackAliOSSPlugin({\n  accessKeyId: '2****************9',\n  accessKeySecret: 'z**************=',\n  region: 'oss-cn-hangzhou',\n  bucket: 'staven',\n  prefix: 'nuxt-doc',   // \"staven/nuxt-doc/icon_696aaa22.ttf\"\n  exclude: [/.*\\.html$/], // 或者 /.*\\.html$/,排除.html文件的上传  \n  deleteAll: true\t  // 优先匹配format配置项\n})\n```\n* 使用打包后的本地文件上传\n```javascript\nconst WebpackAliOSSPlugin = require('webpack-oss')\nconst path = require('path')\n\nnew WebpackAliOSSPlugin({\n  accessKeyId: '2****************9',\n  accessKeySecret: 'z**************=',\n  region: 'oss-cn-hangzhou',\n  bucket: 'staven',\n  prefix: 'nuxt-doc',   // \"staven/nuxt-doc/icon_696aaa22.ttf\"\n  exclude: [/.*\\.html$/], // 或者 /.*\\.html$/,排除.html文件的上传  \n  local: true,\n  output: path.resolve(__dirname, './build') // 此项不填，将默认指向webpack/vue-cli等工具输出目录\n})\n```\n* 使用format做版本备份\n```javascript\nconst WebpackAliOSSPlugin = require('webpack-oss')\nconst time = WebpackAliOSSPlugin.getFormat('YYMMDD')\n\nnew WebpackAliOSSPlugin({\n  accessKeyId: '2****************9',\n  accessKeySecret: 'z**************=',\n  region: 'oss-cn-hangzhou',\n  bucket: 'staven',\n  prefix: 'nuxt-doc',   // \"staven/nuxt-doc/icon_696aaa22.ttf\"\n  exclude: [/.*\\.html$/], // 或者 /.*\\.html$/,排除.html文件的上传  \n  deleteAll: false,\t  // 优先匹配format配置项\n  format: time， // 备份最近版本的oss文件，删除其他版本文件\n  local: true,   // 上传打包输出目录里的文件\n  limit: 10  // 备份版本数量，其余版本被删除\n})\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstaven630%2Fwebpack-oss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstaven630%2Fwebpack-oss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstaven630%2Fwebpack-oss/lists"}