fetch-idl
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

fetch-idl CircleCI codecov npm version

Fetch Thrift or Proto files from Git Repositories

Usage

Install

npm install fetch-idl --save

Call the api

import fetchIdl from 'fetch-idl'

const repos = 'git@github.com:lancewuz/fetch-idl.git';
fetchIdl({ repo, branch: 'master', entryGlob: 'test/idl/!(error|index).thrift', outDir: `temp`, rootDir: '.' });

API

fetchIdl(params: FetchPramas): { commit: string }

fetch IDL files from repository, controlled by the FetchPramas:

interface FetchParams {
  // The repository of idl files
  repo: string;
  // The branch of the repo
  branch: string;
  // The entry file path expressed by Glob
  entryGlob: string;
  // The output directory for idl files
  outDir?: string;
  // The root directory of the entryGlob
  rootDir?: string;
  // The commit id of the repo
  commitId?: string;
}

Package Sidebar

Install

npm i fetch-idl

Weekly Downloads

0

Version

0.1.3

License

ISC

Unpacked Size

16.9 kB

Total Files

6

Last publish

Collaborators

  • lancewuz