Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
github.com/microsoft/azure-devops-node-api
Integrate with Visual Studio Team Services from your Node.js apps.
See samples for complete coding examples
npm install vso-node-api --save
Typings (.d.ts) are now distributed with the api, so intellisense and compile support just works from tsc
and vscode
var vsts = require('vso-node-api');
// your collection url
var collectionUrl = "https://fabrikam.visualstudio.com/defaultcollection";
// ideally from config
let token: string = "cbdeb34vzyuk5l4gxc4qfczn3lko3avfkfqyb47etahq6axpcqha";
let authHandler = vm.getPersonalAccessTokenHandler(token);
var connect = new vsts.WebApi(collectionUrl, creds);
import * as ba from 'vso-node-api/BuildApi';
let vstsBuild: ba.IBuildApi = connection.getBuildApi();
Coding is easy using linear coding with async/await in typescript
import * as bi from 'vso-node-api/interfaces/BuildInterfaces';
async function run() {
let project: string = 'myProject';
let defs: bi.DefinitionReference[] = await vstsBuild.getDefinitions(project);
defs.forEach((defRef: bi.DefinitionReference) => {
console.log(defRef.name + ' (' + defRef.id + ')');
});
}
run();
To see what APIs are available, see the appropriate client interface. For example, GitApi.ts
Pre-reqs: Node >= 4.4.7 LTS and typescript (tsc) >= 1.8
Run npm install
first
Set environment variables using set or export:
API_URL=https://fabrikam.visualstudio.com/defaultcollection
// use your token
API_TOKEN=cbdeb34vzyuk5l4gxc4qfczn3lko3avfkfqyb47etahq6axpcqha
API_PROJECT=myProject
Run samples:
$ npm run samples
To contribute to this repository, see the contribution guide
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.