Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including local-repository-provider with all npm packages installed. Try it out:

var localRepositoryProvider = require("local-repository-provider")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

local-repository-provider v6.4.35

repository provider using local (native) git commands

npm Greenkeeper semantic-release styled with prettier Build Status codecov.io Known Vulnerabilities GitHub Issues Dependency Status devDependency Status docs downloads Commitizen friendly

local-repository-provider

repository provider using local (native) git commands

API

Table of Contents

LocalProvider

Extends Provider

Provider using native git executable

Properties

newWorkspacePath

Generate path for a new workspace For the livetime of the provider always genrate new names

Returns string path

repository

using provider workspace and number of repositories to create repository workspace

Parameters

  • name string
  • workspace string where to place the repos workspace @see #newWorkspacePath

environmentOptions

  • GIT_CLONE_OPTIONS

defaultOptions

Default configuration options

  • workspace
  • cloneOptions defaults to ["--depth", "10", "--no-single-branch"]

Returns Object

LocalRepository

Extends Repository

Properties

  • workspace string
  • currentBranch Branch

_initialize

exec git clone or git pull

_fetchBranches

build lookup of all remote branches

git ls-remote --heads

condensedName

most significant part of the url remove trailing .git only use last directory of pathname

Returns string name

setCurrentBranch

Set the current active branch (workspace)

Parameters

  • branch Branch

refId

Get sha of a ref Calls

git show-ref <ref>

Parameters

Returns string sha of the ref

workspace

workspace directory.

Returns string

LocalBranch

Extends Branch

Properties

writeEntries

writes ContentEntries into the branch

Parameters

  • entries Array<ContentEntry>

Returns Promise<Array<ContentEntry>> written entries

commit

Excutes:

  • writes all updates into the workspace
  • git add
  • git commit
  • git push --set-upstream origin

Parameters

  • message string commit message
  • entries Array<ContentEntry> file entries to be commited
  • options Object

entries

Search for patch in the branch

Parameters

  • matchingPatterns Array<string> (optional, default ["**/.*","**/*"])

Returns Iterable<Entry> matching branch path names

entry

Search for patch in the branch

Parameters

Returns Entry matching branch path names

maybeEntry

Search for patch in the branch

Parameters

Returns Entry matching branch path names

install

With npm do:

npm install local-repository-provider

license

BSD-2-Clause

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free