npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mengxk2008/aliyun-cdn-cli

v1.0.8

Published

aliyun cdn cli for refresh and push in shell

Downloads

3

Readme

aliyun-cdn-cli

阿里云 CDN CLI,可以快速刷新,预热等

阿里云CDN介绍

安装

npm install @mengxk2008/aliyun-cdn-cli --save-dev

配置

项目根目录创建配置文件 aliyun.config.json,配置阿里云CDN的 AK & SK:

{ 
  "accessKeyId": "-",
  "accessKeySecret": "-" 
}

选项

更多命令 npx aliyun-cdn-cli --help

  -i, --AccessKeyId <value>             阿里云凭证
  -k, --AccessKeySecret <value>         阿里云密钥
  -c, --config<value>                   自定义配置文件,默认读取./aliyun.config.json
  -f, --refreshPath <dir/file>          刷新目录或文件的地址:有特殊字符先做URLencode,以加速域名开头,多个以\\n隔开
  -o, --refreshType <Directory/File>    刷新类型:[Directory=目录(默认),File=文件][可选]
  -t, --taskType <refresh/push>         任务类型:[refresh=刷新(默认),push=预热]
  -h, --help                            查看帮助
  -v, --version                         查看版本

使用

刷新缓存 被刷新的文件缓存将立即失效,新的请求将回源获取最新的文件,支持URL批量刷新。

npx aliyun-cdn-cli -f http://yourcdndomain/img/
npx aliyun-cdn-cli -f http://yourcdndomain/img/1.png[\\nhttp://yourcdndomain/img/2.png]

预热源站 将源站的内容主动预热到L2缓存节点上。您首次访问可直接命中缓存,缓解源站压力。

npx aliyun-cdn-cli -t push -f http://yourcdndomain/img/1.png

常见问题

如何判断CDN的预热任务是否执行完成

使用CDN后,文件与源文件不一致,如何刷新缓存