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 🙏

© 2026 – Pkg Stats / Ryan Hefner

teamcity-connector

v0.0.16

Published

A client that will connect to teamcity API to perform all functions for maintaining projects

Downloads

56

Readme

teamcity-connector

A client that will connect to teamcity API to perform all functions for maintaining projects

#Usage

##Creating the connector Create a new TeamcityConnector

let connector = new TeamcityConnector('http://localhost:8111', 'user', 'password');

##Projects All project work is located under the Project property of the TeamcityConnector

###Get a project To retrieve an existing project you can search for the project by name

let projectDetails = connector.project.get({name: 'Project Name'});

###Create a Project To create a project you just need the name of the project to create and the id of the parent project. If this is a new project created from scratch you do not need to provide a parent project anf the new project will be placed under the root.

let result = connector.project.create({name: 'My Subproject', parent: 'Parent Project Name'});

##BuildTypes The buildTypes are the definitions used when creating a TeamcityBuild, you will need to create this after you create your project

###Get A BuildType To locate a BuildType you will need to know its name and the name of the project that it belongs to

let buildTypeDetail = connector.buildtype.get({name: 'BuildType Name', project: 'Project Name'});

###Create a new BuildType Creating a basic BuildType can be done manually or you can use a template, to use the template just provide the Id of the template you wish to use. If you leave the template Id empty then no template will be used you can substitute the project name for projectId

let result = connector.buildtype.create({name: 'My Buildtype', projectName: 'Project Name', template: 'TemplateId'});

let result = connector.buildtype.create({name: 'My Buildtype', projectId: 'Project_Id', template: 'TemplateId'});

Adding Parameters

When you have created your BuildType you will want to amend the Parameters for your deployments

let result = connector.buildtype.addParameters({
  buildTypeId: 'build_type_id',
  parameters: [
    { name: parameter1, value: value1 },
    { name: parameter2: value: value2 }
  ]
})

##VcsRoot All builds needs to get their source form somewhere, so provide an VcsRoot ###Get an existing VcsRoot

let vcsrootDetail = connector.VcsRoot().get({name: 'VcsRoot name'});

###Create a VcsRoot Creating a VcsRoot is more involved,

let result = connector.vcsroot.create({
  name: 'VcsRoot Name',
  projectName: 'Project Name',
  projectId: 'ProjectId',
  url: 'Repository Url',
  branch: 'Branch name',
  vcsType: 'Type name'    
});

Adding Properties

When you have created your Vcs Root you will want to amend the Properties

let result = connector.vcsroot.addProperties({
  name: 'VcsRoot Name',
  properties: [
    { name: property1, value: value1 },
    { name: property2: value: value2 }
  ]
})

This is a lot of options but lets go through them

  • name - this is the name of the VcsRoot and is Required
  • projectName - the name of the project to create the VcsRoot in
  • projectId - the Id of the project of the project, you must have either this or the project name specified
  • url - the url to the Repository, this is mandatory
  • branch - the name of the branch to use
  • vcsType - the type of VcsRoot to create [jetbrains.get|perforce|svn|tfs]

#Testing ##Docker To test the library you can set up a new TeamCity server using JetBrains Docker container

docker pull jetbrains/teamcity-server
docker run -p 8111:8111 -d jetbrains/teamcity-server