New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cos-cdn

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cos-cdn

cos-nodejs-sdk-v5 upload static assests to cloud.tencent cdn

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

cos-cdn

本项目封装了腾讯云的cos上传服务。

使用方法

"cos-cdn": "git+ssh://git@gitlab.wallstcn.com:wscnfrontend/cos-cdn.git"

package.json中添加cos-cdn

命令行demo

"cdn:stage": "cos-cdn-upload --Directory='juicy-stage' --Filepath='dist'",
"cdn:prod": "cos-cdn-upload --Directory='juicy' --Filepath='dist'"

参数

PropertyDescriptionDefault
Directorycdn子路径(https://static-alpha.wallstreetcn.com/xxx/)default(一般设为项目名称,如juicy)
Filepath你需要上传文件夹dist(从项目根路径开始)
AppIdAppId (一般无需修改)process.env.COS_APP_ID
SecretIdSecretId (一般无需修改)process.env.COS_SECRET_ID
SecretKeySecretKey (一般无需修改)process.env.COS_SECRET_KEY
RecursiveRecursive (一般无需修改)true
BucketBucket (一般无需修改)static
RegionRegion (一般无需修改)cn-east

本项目支持读取命令行参数或者读取根目录下cos/config.js的配置文件。

优先级:根目录下 cos/config.js的配置文件 > 命令行参数 > 内置配置

内置Config

const config = {
  Directory: 'default',
  Filepath: 'dist',
  AppId: process.env.COS_APP_ID,
  SecretId: process.env.COS_SECRET_ID,
  SecretKey: process.env.COS_SECRET_KEY,
  Recursive: true,
  Bucket: 'static',
  Region: 'cn-east'
}

Keywords

FAQs

Package last updated on 16 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc