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

gitlab

Package Overview
Dependencies
Maintainers
2
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitlab - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

examples/bad-token.coffee

2

examples/example.credentials.js

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -3,0 +3,0 @@ module.exports = {

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -3,0 +3,0 @@ var Gitlab, credentials, gitlab;

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -3,0 +3,0 @@ var Gitlab, credentials, gitlab;

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -3,0 +3,0 @@ var Gitlab, credentials, gitlab;

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -3,0 +3,0 @@ var Gitlab, credentials, gitlab, projectId;

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -3,0 +3,0 @@ var Gitlab, credentials, gitlab, userId;

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -3,0 +3,0 @@ var debug,

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -83,3 +83,3 @@ var ApiBase, debug, querystring, slumber,

case 2:
return fn(err, ret);
return fn(err, ret || JSON.parse(response.body).message);
case 3:

@@ -86,0 +86,0 @@ return fn(err, response, ret);

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -3,0 +3,0 @@ var ApiBaseHTTP, debug,

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -3,0 +3,0 @@ var debug,

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -3,0 +3,0 @@ var ApiV3;

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -3,0 +3,0 @@ var BaseModel, Groups,

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -66,3 +66,3 @@ var BaseModel, Issues,

this.debug("Issues::show()");
if (projectId.indexOf("/") !== -1) {
if (projectId.toString().indexOf("/") !== -1) {
projectId = encodeURIComponent(projectId);

@@ -69,0 +69,0 @@ } else {

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -3,0 +3,0 @@ var BaseModel, ProjectKeys, Utils,

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -3,0 +3,0 @@ var BaseModel, ProjectHooks, Utils,

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -3,0 +3,0 @@ var BaseModel, ProjectIssues, Utils,

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -3,0 +3,0 @@ var BaseModel, ProjectMembers, Utils,

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -56,3 +56,3 @@ var BaseModel, ProjectMergeRequests, Utils,

this.debug("Projects::mergerequest()");
return this.get("projects/" + (Utils.parseProjectId(projectId)) + "/merge_request/@{parseInt mergerequestId}", (function(_this) {
return this.get("projects/" + (Utils.parseProjectId(projectId)) + "/merge_request/" + (parseInt(mergerequestId)), (function(_this) {
return function(data) {

@@ -88,4 +88,3 @@ if (fn) {

ProjectMergeRequests.prototype.update = function(projectId, mergerequestId, url, fn) {
var params;
ProjectMergeRequests.prototype.update = function(projectId, mergerequestId, params, fn) {
if (fn == null) {

@@ -95,5 +94,4 @@ fn = null;

this.debug("Projects::saveMergeRequest()");
params = {
access_level: parseInt(accessLevel)
};
params.id = Utils.parseProjectId(projectId);
params.merge_request_id = parseInt(mergerequestId);
return this.put("projects/" + (Utils.parseProjectId(projectId)) + "/merge_request/" + (parseInt(mergerequestId)), params, (function(_this) {

@@ -100,0 +98,0 @@ return function(data) {

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -3,0 +3,0 @@ var BaseModel, ProjectMilestones, Utils,

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -24,2 +24,6 @@ var BaseModel, ProjectRepository, Utils,

this.listTags = __bind(this.listTags, this);
this.deleteBranch = __bind(this.deleteBranch, this);
this.createBranch = __bind(this.createBranch, this);
this.unprotectBranch = __bind(this.unprotectBranch, this);
this.protectBranch = __bind(this.protectBranch, this);
this.showBranch = __bind(this.showBranch, this);

@@ -58,2 +62,61 @@ this.listBranches = __bind(this.listBranches, this);

ProjectRepository.prototype.protectBranch = function(projectId, branchId, fn) {
if (fn == null) {
fn = null;
}
this.debug("Projects::protectBranch()");
return this.put("projects/" + (Utils.parseProjectId(projectId)) + "/repository/branches/" + (encodeURI(branchId)) + "/protect", null, (function(_this) {
return function(data) {
if (fn) {
return fn(data);
}
};
})(this));
};
ProjectRepository.prototype.unprotectBranch = function(projectId, branchId, fn) {
if (fn == null) {
fn = null;
}
this.debug("Projects::unprotectBranch()");
return this.put("projects/" + (Utils.parseProjectId(projectId)) + "/repository/branches/" + (encodeURI(branchId)) + "/unprotect", null, (function(_this) {
return function(data) {
if (fn) {
return fn(data);
}
};
})(this));
};
ProjectRepository.prototype.createBranch = function(params, fn) {
if (params == null) {
params = {};
}
if (fn == null) {
fn = null;
}
this.debug("Projects::createBranch()", params);
return this.post("projects/" + (Utils.parseProjectId(params.projectId)) + "/repository/branches", params, (function(_this) {
return function(data) {
if (fn) {
return fn(data);
}
};
})(this));
};
ProjectRepository.prototype.deleteBranch = function(projectId, branchId, fn) {
if (fn == null) {
fn = null;
}
this.debug("Projects::deleteBranch()");
return this["delete"]("projects/" + (Utils.parseProjectId(projectId)) + "/repository/branches/" + (encodeURI(branchId)), (function(_this) {
return function(data) {
if (fn) {
return fn(data);
}
};
})(this));
};
ProjectRepository.prototype.listTags = function(projectId, fn) {

@@ -137,8 +200,17 @@ if (fn == null) {

ProjectRepository.prototype.showFile = function(projectId, params, fn) {
if (params == null) {
params = {};
}
if (fn == null) {
fn = null;
}
if ('function' === typeof params) {
fn = params;
params = projectId;
} else {
params.projectId = projectId;
}
this.debug("Projects::showFile()", params);
if (params.file_path && params.ref) {
return this.post("projects/" + (Utils.parseProjectId(params.projectId)) + "/repository/files", params, (function(_this) {
return this.get("projects/" + (Utils.parseProjectId(params.projectId)) + "/repository/files", params, (function(_this) {
return function(data) {

@@ -145,0 +217,0 @@ if (fn) {

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -63,3 +63,3 @@ var BaseModel, Projects, Utils,

if (fn) {
return fn(data);
return fn(retData || data);
}

@@ -165,3 +165,3 @@ } else if (retData.length === params.per_page) {

this.debug("Projects::listCommits()");
return this.get("projects/" + params.id + "/repository/commits", (function(_this) {
return this.get("projects/" + params.id + "/repository/commits", params, (function(_this) {
return function(data) {

@@ -168,0 +168,0 @@ if (fn) {

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -22,8 +22,15 @@ var BaseModel, Users,

Users.prototype.all = function(fn) {
Users.prototype.all = function(params, fn) {
if (params == null) {
params = {};
}
if (fn == null) {
fn = null;
}
if ('function' === typeof params) {
fn = params;
params = {};
}
this.debug("Users::all()");
return this.get("users", (function(_this) {
return this.get("users", params, (function(_this) {
return function(data) {

@@ -30,0 +37,0 @@ if (fn) {

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -3,0 +3,0 @@ var Utils;

{
"name": "gitlab",
"version": "1.0.0",
"version": "1.1.0",
"description": "GitLab API Nodejs library.",

@@ -37,17 +37,50 @@ "main": "lib/index.js",

"url": "https://github.com/dave-irvine"
}, {
},
{
"name": "Glavin Wiechert",
"url": "https://github.com/Glavin001"
}, {
},
{
"name": "Florian Quiblier",
"url": "https://github.com/fofoy"
}, {
},
{
"name": "Anthony Heber",
"url": "https://github.com/aheber"
}, {
},
{
"name": "Evan Heidtmann",
"url": "https://github.com/ezheidtmann"
}, {
},
{
"name": "luoqpolyvi",
"url": "https://github.com/luoqpolyvi"
},
{
"name": "Brian Vanderbusch",
"url": "https://github.com/LongLiveCHIEF"
},
{
"name": "daprahamian",
"url": "https://github.com/daprahamian"
},
{
"name": "pgorecki",
"url": "https://github.com/pgorecki"
},
{
"name": "CaoJun",
"url": "https://github.com/mdsb100"
},
{
"name": "nalabjp",
"url": "https://github.com/nalabjp"
},
{
"name": "shaoshuai0102",
"url": "https://github.com/shaoshuai0102"
},
{
"name": "Sakesan Panjamawat",
"url": "https://github.com/sakp"
}

@@ -54,0 +87,0 @@ ],

@@ -5,3 +5,2 @@ node-gitlab

[![Build Status (Travis)](https://travis-ci.org/moul/node-gitlab.png?branch=master)](https://travis-ci.org/moul/node-gitlab)
[![Build Status (Shippable)](https://api.shippable.com/projects/5371096b93ac868700b434d9/badge/develop)](https://www.shippable.com/projects/5371096b93ac868700b434d9)
[![Dependency Status](https://david-dm.org/moul/node-gitlab.png?theme=shields.io)](https://david-dm.org/moul/node-gitlab)

@@ -86,2 +85,8 @@ [![authors](https://sourcegraph.com/api/repos/github.com/moul/node-gitlab/badges/authors.png)](https://sourcegraph.com/github.com/moul/node-gitlab)

CLI
---
Check out [cli-gitlab](https://github.com/mdsb100/cli-gitlab)
Contributors

@@ -98,2 +103,6 @@ ------------

- [pgorecki](https://github.com/pgorecki)
- [CaoJun](https://github.com/mdsb100)
- [nalabjp](https://github.com/nalabjp)
- [shaoshuai0102](https://github.com/shaoshuai0102)
- [Sakesan Panjamawat](https://github.com/sakp)

@@ -109,2 +118,10 @@ License

1.1.0 (2014-11-04)
------------------
- Added project branch support
- Improved compatibility with API
- Improved global error handling
- Rebuilt javascript using latest Coffee-Script
1.0.0 (2014-08-19)

@@ -111,0 +128,0 @@ ------------------

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -3,0 +3,0 @@ var Mock,

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -120,3 +120,3 @@ var Gitlab, assert, credentials, gitlab, mock, projectId, userId, validate_project;

describe('#listCommits()', function() {
return it('should retrieve list of members of a project', function(done) {
return it('should retrieve commits of a given project', function(done) {
return gitlab.projects.repository.listCommits(projectId, function(result) {

@@ -128,3 +128,3 @@ return done();

describe('#listTags()', function() {
return it('should retrieve list of members of a project', function(done) {
return it('should retrieve tags of a given project', function(done) {
return gitlab.projects.repository.listTags(projectId, function(result) {

@@ -135,4 +135,4 @@ return done();

});
return describe('#listTree()', function() {
return it('should retrieve list of members of a project', function(done) {
describe('#listTree()', function() {
return it('should retrieve tree of a given project', function(done) {
return gitlab.projects.repository.listTree(projectId, function(result) {

@@ -143,2 +143,25 @@ return done();

});
return describe('#showFile()', function() {
it('should retrieve specified file with arity=3', function(done) {
var opts;
opts = {
file_path: 'README.md',
ref: 'master'
};
return gitlab.projects.repository.showFile(projectId, opts, function(result) {
return done();
});
});
return it('should retrieve specified file with arity=2', function(done) {
var opts;
opts = {
projectId: projectId,
file_path: 'README.md',
ref: 'master'
};
return gitlab.projects.repository.showFile(opts, function(result) {
return done();
});
});
});
});

@@ -145,0 +168,0 @@ });

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.7.1
// Generated by CoffeeScript 1.8.0
(function() {

@@ -3,0 +3,0 @@ var assert;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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