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

remote-svn

v1.0.2

Published

Promise wrapped classes easy to use for making operations on SVN without risking locks and conflicts

Downloads

5

Readme

RemoteSvn / LocalSvn

perform operations on remote copy of SVN or Read only operations on a Local copy

Getting Started

checkout to your computer and run: npm install, to run mocha use: npm run test-local / test-remote (edit credentials)

referance the module

create a svn object

const testSvn = new remoteSvn();

Create log output interface

implement info error and debug functions, accept string, do whatever you want with it

logger =  { //looger interface
    info:(str)=>{console.log("[INFO]",str)},
    error:(str)=>{console.error("[ERROR]",str)},
    debug:(str)=>{console.warn("[DEBUG]",str)}
}

Create credentials object

creds = {
    username: "my.username",
    password: "myPassword123"
}

initialize the object pass the name of the folder you want the local files to be saved at, pass the base URL of the svn remote pass the logger interface function pass the credentials object (match the names)

svnConfig = {baseFolder, baseURL, logger, creds}
const params = await testSvn.init(svnConfig)
  • some examples ...

all operations returns a Promise, and perform async operations

const returnFilePath = await testSvn.getFile({"filePath":testFiles[0], "revision":undefined})

all operations that require parameters expect an object with a key:value for every parameter

await testSvn.deleteFiles({filePaths:[testFiles[0],testFiles[1]],message:commitMessage})

all downloaded files / newly created files are stored localy, remember to delete them when finished

await testSvn.deleteFiles({filePaths:[testFiles[0],testFiles[1]],message:commitMessage})

Prerequisites

must have svn v1.8 or later installed, one of the packages relay on svnmucc which is included in that version

svnmucc put _localPath_ _remotePath_

Running the tests

Edit the .env file , fill in missing details Use mocah ( installed globaly using npm i -g mocha) or use "npm run test-remote" or use "npm run test-local"

Break down into end to end tests

you can take example from the tests on how to get/add/remove a file and commit

Built With

  • node-svn-ultimate - SVN wrapper for node
  • fs-extra - file system methods
  • count-files - Count files, directories, and bytes in a directory recursively.
  • mocha - Simple, flexible, fun JavaScript test framework for Node.js & The Browser.

Authors

License

GNUv3

Acknowledgments

  • stackOverflow
  • coffee