Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

appveyor

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appveyor - npm Package Compare versions

Comparing version 0.0.1-0 to 0.1.0

.travis.yml

17

appveyor.js
#!/usr/bin/env node
var AppVeyor = require('./index.js');
var Configstore = require('configstore');
var AppVeyor = require('./index.js')
var appveyor = new AppVeyor(new Configstore('appveyorjs'));
var appveyor = new AppVeyor()

@@ -37,2 +36,14 @@ appveyor.on('error', function (error) {

program.command('yml')
.help('create a appveyor.yml file in the current directory')
.callback(function (opts) {
appveyor.yml(process.stdout)
})
program.command('badge')
.help('print the text for the badge (shields.io)')
.callback(function (opts) {
appveyor.badge(process.stdout)
})
program.parse()
var request = require('request')
var ghslug = require('github-slug')
var Configstore = require('configstore');
var EventEmitter = require('events').EventEmitter
var extend = require('util').inherits
var fs = require('fs')
var path = require('path')

@@ -10,3 +13,3 @@ extend(AppVeyor, EventEmitter)

function AppVeyor(configstore) {
this.configstore = configstore
this.configstore = configstore || new Configstore('appveyorjs')
this.headers = {

@@ -70,2 +73,21 @@ 'User-Agent': 'node-appveyor'

AppVeyor.prototype.yml = function (stream) {
var from = fs.createReadStream(path.join(__dirname, 'appveyor.yml'))
from.pipe(fs.createWriteStream(path.join(process.cwd(), 'appveyor.yml')))
if(stream)
from.pipe(stream)
}
AppVeyor.prototype.badge = function (stream) {
var self = this
ghslug(process.cwd(), function (err, slug) {
if(err) {
self.emit('error', err)
return
}
stream.write('[![Windows Build status](http://img.shields.io/appveyor/ci/' + slug + '.svg)]')
stream.write('(https://ci.appveyor.com/project/' + slug + '/branch/master)\n')
})
}
AppVeyor.prototype._getToken = function (cb) {

@@ -72,0 +94,0 @@ var token = this.configstore.get('token')

8

package.json
{
"name": "appveyor",
"version": "0.0.1-0",
"version": "0.1.0",
"description": "A CLI for AppVeyor",

@@ -10,3 +10,3 @@ "main": "index.js",

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "node test.js"
},

@@ -34,3 +34,7 @@ "repository": {

"request": "^2.39.0"
},
"devDependencies": {
"nock": "^0.43.0",
"tape": "^2.13.4"
}
}
# AppVeyor
Mac / Linux | Windows
---- | ----
[![Build Status](https://travis-ci.org/finnp/node-appveyor.svg?branch=master)](https://travis-ci.org/finnp/node-appveyor) | [![Windows Build status](http://img.shields.io/appveyor/ci/finnp/node-appveyor.svg)](https://ci.appveyor.com/project/finnp/node-appveyor/branch/master)

@@ -6,4 +9,21 @@ A javascriptable CLI for AppVeyor for node projects. It is basically the

Install with `npm install appveyor -g`
* Add projects / hooks
* Create appveyor.yaml
```
Usage: appveyor <command>
command
auth set the auth token for AppVeyor
hook activate AppVeyor for the current project
yml create a appveyor.yml file in the current directory
badge print the text for the badge (shields.io)
```
The commands map to the specific functions. For now look at
the source code for details.
```js
var AppVeyor = require('appveyor')
var appveyor = new AppVeyor()
appveyor.auth('<your token>') // saved locally
appveyor.badge(process.stdout) // prints the badge
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc