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

@serverless-cd/checkout

v0.1.3-beta.2

Published

Checkout a git repository.

Downloads

146

Readme

下载仓库代码(@serverless-cd/checkout)

快速体验

- plugin: "@serverless-cd/checkout"
  inputs:
   # 通过分支或者tag来下载仓库,比如:refs/heads/main 或者 refs/tags/v0.0.1
    ref: ""

    # 通过commit id来下载仓库
    commit: ""

    # 用于下载仓库的个人访问令牌 比如:github的个人访问令牌(https://github.com/settings/tokens)。
    token: ""

    # 支持下载的代码托管平台(github、gitee、gitlab、codeup)
    provider: ""

    # 仓库的克隆地址,比如:https://gitee.com/shihuali/checkout.git
    clone_url: ""

    # 仓库owner,比如clone_url为https://gitee.com/shihuali/checkout.git时,owner应为 shihuali
    owner: ""

    # 代码下载目录
    exec_dir: ""

字段解析

| 参数 | 说明 | 类型 | 必填 | 默认值 | | -------- | -------------------------------------------------------------------------------------------- | ---------------------------------- | ---- | -------- | | ref | 通过分支或者 tag 来下载仓库,比如:refs/heads/main 或者 refs/tags/v0.0.1 | string | 否 | | | commit | 通过 commit id 来下载仓库 | string | 否 | | | exec_dir | 代码下载目录 | string | 否 | 临时目录 | | token | 用于下载仓库的个人访问令牌 比如:github 的个人访问令牌 | string | 否 | | | provider | 支持下载的代码托管平台 | enum:github、gitee、gitlab、codeup | 否 | | | clone_url | 仓库的克隆地址 | string | 否 | | | owner | 仓库 owner | string | 否 | |

注意 Engine 调用方式

对于 checkout 插件而言,调用 engine 的时候需要注入 checkout 插件所需要的参数

const engine = new Engine({
  cwd: __dirname,
  steps,
  logConfig: { logPrefix },
  inputs: {
    git: {
      token: "xxx",  // 必填
      provider: "gitee", // 必填
      owner: "shihuali", // 必填
      clone_url: "https://gitee.com/shihuali/checkout.git", // 必填
      exec_dir: "./checkout", // 选填
      ref: "refs/heads/main", // 选填
      commit: 'xx' // 选填
    },
  },
});
await engine.start();

作为普通的 NPM Module 使用