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

@futu/ada

v2.1.1

Published

用于下载Gitlab CI产生的artifacts。

Downloads

6

Readme

Ada

用于下载Gitlab CI产生的artifacts。

背景

Gitlab CI产生的artifacts并没有一个统一的文件目录存放,需要按一些规则去取:

  • 首先根据commit id取到本次构建的pipeline信息
  • 根据pipeline id取到jobs信息
  • 根据job id拼接下载地址,取到artifacts文件

本库对这个过程做了封装。

CLI使用

全局安装

npm install -g @futu/ada

使用

ada -g http://gitlab.com -p 12 -t X-XXXXXXXXXXXX -c ee9e4ad637b13e729e0d90c09a9b0990 -o dist.zip

API使用

const Ada = require('@futu/ada');
const ada = new Ada('http://gitlab.com', 12, 'X-XXXXXXXXXXXX');

ada.download('ee9e4ad637b13e729e0d90c09a9b0990', './dist.zip');

参数说明:

  • gitlab/g Gitlab http(s)访问地址
  • project/p 项目id,数字
  • stage / s 取artifacts文件的Stage name,默认为第一个stage
  • token/t Gitlab private token,在个人设置中可以生成
  • commit/c Commit Id
  • output/o 输出文件,在CLI模式中,默认为当前目录下的artifacts.zip
  • apiver/a API版本,默认为4,适用于Gitlab 12,如果使用Gitlab 10,请将值设置为3

版本

2.1.1(2020-03-02)

  • 修复当多个success状态的job存在时,取不到最新job的问题

2.1.0(2020-01-17)

  • 支持传递stage参数,选择特定的stage来下载artifacts文件

2.0.0(2019-08-19)

  • 添加apiver参数,支持v4 api

1.0.0 (2018-07-03)

  • 基本功能完成