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.3.0 to 1.4.0

.editorconfig

12

examples/list-projects.js

@@ -16,11 +16,11 @@ (function() {

gitlab.projects.all(function(projects) {
var project, _i, _len, _results;
_results = [];
for (_i = 0, _len = projects.length; _i < _len; _i++) {
project = projects[_i];
_results.push(console.log("#" + project.id + ": " + project.name + ", path: " + project.path + ", default_branch: " + project.default_branch + ", private: " + project["private"] + ", owner: " + project.owner.name + " (" + project.owner.email + "), date: " + project.created_at));
var i, len, project, results;
results = [];
for (i = 0, len = projects.length; i < len; i++) {
project = projects[i];
results.push(console.log("#" + project.id + ": " + project.name + ", path: " + project.path + ", default_branch: " + project.default_branch + ", private: " + project["private"] + ", owner: " + project.owner.name + " (" + project.owner.email + "), date: " + project.created_at));
}
return _results;
return results;
});
}).call(this);

@@ -16,11 +16,11 @@ (function() {

gitlab.users.all(function(users) {
var user, _i, _len, _results;
_results = [];
for (_i = 0, _len = users.length; _i < _len; _i++) {
user = users[_i];
_results.push(console.log("#" + user.id + ": " + user.email + ", " + user.name + ", " + user.created_at));
var i, len, results, user;
results = [];
for (i = 0, len = users.length; i < len; i++) {
user = users[i];
results.push(console.log("#" + user.id + ": " + user.email + ", " + user.name + ", " + user.created_at));
}
return _results;
return results;
});
}).call(this);

@@ -16,11 +16,11 @@ (function() {

gitlab.projects.all(function(projects) {
var _i, _len, _project, _results;
_results = [];
for (_i = 0, _len = projects.length; _i < _len; _i++) {
_project = projects[_i];
_results.push((function() {
var _project, i, len, results;
results = [];
for (i = 0, len = projects.length; i < len; i++) {
_project = projects[i];
results.push((function() {
var project;
project = _project;
return gitlab.projects.hooks.list(project.id, function(hooks) {
var hook, url, _j, _len1;
var hook, j, len1, url;
url = "" + credentials.service_hook_base + project.path_with_namespace;

@@ -30,4 +30,4 @@ if (hooks.length > 1) {

} else if (hooks.length === 1) {
for (_j = 0, _len1 = hooks.length; _j < _len1; _j++) {
hook = hooks[_j];
for (j = 0, len1 = hooks.length; j < len1; j++) {
hook = hooks[j];
if (hook.url !== url) {

@@ -48,5 +48,5 @@ gitlab.projects.hooks.remove(project.id, hook.id, function(ret) {

}
return _results;
return results;
});
}).call(this);
(function() {
var debug,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };

@@ -8,6 +8,6 @@ debug = require('debug')('gitlab:ApiBase');

module.exports.ApiBase = (function() {
function ApiBase(_at_options) {
this.options = _at_options;
this.init = __bind(this.init, this);
this.handleOptions = __bind(this.handleOptions, this);
function ApiBase(options) {
this.options = options;
this.init = bind(this.init, this);
this.handleOptions = bind(this.handleOptions, this);
this.handleOptions();

@@ -19,5 +19,5 @@ this.init();

ApiBase.prototype.handleOptions = function() {
var _base;
if ((_base = this.options).verbose == null) {
_base.verbose = false;
var base;
if ((base = this.options).verbose == null) {
base.verbose = false;
}

@@ -24,0 +24,0 @@ return debug("handleOptions()");

(function() {
var ApiBase, debug, querystring, slumber,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;

@@ -15,15 +15,15 @@ debug = require('debug')('gitlab:ApiBaseHTTP');

module.exports.ApiBaseHTTP = (function(_super) {
__extends(ApiBaseHTTP, _super);
module.exports.ApiBaseHTTP = (function(superClass) {
extend(ApiBaseHTTP, superClass);
function ApiBaseHTTP() {
this.patch = __bind(this.patch, this);
this.put = __bind(this.put, this);
this.post = __bind(this.post, this);
this["delete"] = __bind(this["delete"], this);
this.get = __bind(this.get, this);
this.fn_wrapper = __bind(this.fn_wrapper, this);
this.prepare_opts = __bind(this.prepare_opts, this);
this.init = __bind(this.init, this);
this.handleOptions = __bind(this.handleOptions, this);
this.patch = bind(this.patch, this);
this.put = bind(this.put, this);
this.post = bind(this.post, this);
this["delete"] = bind(this["delete"], this);
this.get = bind(this.get, this);
this.fn_wrapper = bind(this.fn_wrapper, this);
this.prepare_opts = bind(this.prepare_opts, this);
this.init = bind(this.init, this);
this.handleOptions = bind(this.handleOptions, this);
return ApiBaseHTTP.__super__.constructor.apply(this, arguments);

@@ -33,6 +33,6 @@ }

ApiBaseHTTP.prototype.handleOptions = function() {
var _base, _base1, _base2;
var base, base1, base2;
ApiBaseHTTP.__super__.handleOptions.apply(this, arguments);
if ((_base = this.options).base_url == null) {
_base.base_url = '';
if ((base = this.options).base_url == null) {
base.base_url = '';
}

@@ -45,7 +45,7 @@ if (!this.options.url) {

}
if ((_base1 = this.options).slumber == null) {
_base1.slumber = {};
if ((base1 = this.options).slumber == null) {
base1.slumber = {};
}
if ((_base2 = this.options.slumber).append_slash == null) {
_base2.append_slash = false;
if ((base2 = this.options.slumber).append_slash == null) {
base2.append_slash = false;
}

@@ -70,3 +70,5 @@ this.options.url = this.options.url.replace(/\/api\/v3/, '');

}
opts.__query.private_token = this.options.token;
opts.headers = {
'PRIVATE-TOKEN': this.options.token
};
return opts;

@@ -78,6 +80,6 @@ };

return function(err, response, ret) {
var arity, _ref;
var arity, ref;
if (err) {
debug('an error has occured', err);
if ((400 <= (_ref = err.statusCode) && _ref <= 499)) {
if ((400 <= (ref = err.statusCode) && ref <= 499)) {
throw "Authorisation error. " + err.statusCode + ". Check your key.";

@@ -84,0 +86,0 @@ }

(function() {
var ApiBaseHTTP, debug,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;

@@ -11,7 +11,7 @@ debug = require('debug')('gitlab:ApiV3');

module.exports.ApiV3 = (function(_super) {
__extends(ApiV3, _super);
module.exports.ApiV3 = (function(superClass) {
extend(ApiV3, superClass);
function ApiV3() {
this.handleOptions = __bind(this.handleOptions, this);
this.handleOptions = bind(this.handleOptions, this);
return ApiV3.__super__.constructor.apply(this, arguments);

@@ -18,0 +18,0 @@ }

(function() {
var debug,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };

@@ -8,6 +8,6 @@ debug = require('debug')('gitlab:BaseModel');

module.exports = (function() {
function exports(_at_client) {
this.client = _at_client;
this._init = __bind(this._init, this);
this.load = __bind(this.load, this);
function exports(client) {
this.client = client;
this._init = bind(this._init, this);
this.load = bind(this.load, this);
this._init();

@@ -14,0 +14,0 @@ }

(function() {
var BaseModel, Groups,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
BaseModel = require('../BaseModel');
Groups = (function(_super) {
__extends(Groups, _super);
Groups = (function(superClass) {
extend(Groups, superClass);
function Groups() {
this.addMember = __bind(this.addMember, this);
this.listMembers = __bind(this.listMembers, this);
this.listProjects = __bind(this.listProjects, this);
this.show = __bind(this.show, this);
this.all = __bind(this.all, this);
this.init = __bind(this.init, this);
this.search = bind(this.search, this);
this.addProject = bind(this.addProject, this);
this.create = bind(this.create, this);
this.addMember = bind(this.addMember, this);
this.listMembers = bind(this.listMembers, this);
this.listProjects = bind(this.listProjects, this);
this.show = bind(this.show, this);
this.all = bind(this.all, this);
this.init = bind(this.init, this);
return Groups.__super__.constructor.apply(this, arguments);

@@ -71,9 +74,3 @@ }

})(this);
return this.get("groups", params, (function(_this) {
return function(data) {
if (fn) {
return fn(data);
}
};
})(this));
return this.get("groups", params, cb);
};

@@ -131,6 +128,6 @@

return function() {
var access_level, k, _ref;
_ref = _this.access_levels;
for (k in _ref) {
access_level = _ref[k];
var access_level, k, ref;
ref = _this.access_levels;
for (k in ref) {
access_level = ref[k];
if (accessLevel === access_level) {

@@ -157,2 +154,45 @@ return true;

Groups.prototype.create = function(params, fn) {
if (params == null) {
params = {};
}
if (fn == null) {
fn = null;
}
this.debug("Groups::create()");
return this.post("groups", params, function(data) {
if (fn) {
return fn(data);
}
});
};
Groups.prototype.addProject = function(groupId, projectId, fn) {
if (fn == null) {
fn = null;
}
this.debug("Groups::addProject(" + groupId + ", " + projectId + ")");
return this.post("groups/" + (parseInt(groupId)) + "/projects/" + (parseInt(projectId)), null, function(data) {
if (fn) {
return fn(data);
}
});
};
Groups.prototype.search = function(nameOrPath, fn) {
var params;
if (fn == null) {
fn = null;
}
this.debug("Groups::search(" + nameOrPath + ")");
params = {
search: nameOrPath
};
return this.get("groups", params, function(data) {
if (fn) {
return fn(data);
}
});
};
return Groups;

@@ -159,0 +199,0 @@

(function() {
var BaseModel, IssueNotes, Utils,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;

@@ -11,7 +11,7 @@ BaseModel = require('../BaseModel');

IssueNotes = (function(_super) {
__extends(IssueNotes, _super);
IssueNotes = (function(superClass) {
extend(IssueNotes, superClass);
function IssueNotes() {
this.all = __bind(this.all, this);
this.all = bind(this.all, this);
return IssueNotes.__super__.constructor.apply(this, arguments);

@@ -18,0 +18,0 @@ }

(function() {
var BaseModel, Issues,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
BaseModel = require('../BaseModel');
Issues = (function(_super) {
__extends(Issues, _super);
Issues = (function(superClass) {
extend(Issues, superClass);
function Issues() {
this.edit = __bind(this.edit, this);
this.create = __bind(this.create, this);
this.show = __bind(this.show, this);
this.all = __bind(this.all, this);
this.edit = bind(this.edit, this);
this.create = bind(this.create, this);
this.show = bind(this.show, this);
this.all = bind(this.all, this);
return Issues.__super__.constructor.apply(this, arguments);

@@ -18,0 +18,0 @@ }

(function() {
var BaseModel, Labels, Utils,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;

@@ -11,7 +11,7 @@ BaseModel = require('../BaseModel');

Labels = (function(_super) {
__extends(Labels, _super);
Labels = (function(superClass) {
extend(Labels, superClass);
function Labels() {
this.create = __bind(this.create, this);
this.create = bind(this.create, this);
return Labels.__super__.constructor.apply(this, arguments);

@@ -18,0 +18,0 @@ }

(function() {
var BaseModel, Notes, Utils,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;

@@ -11,7 +11,7 @@ BaseModel = require('../BaseModel');

Notes = (function(_super) {
__extends(Notes, _super);
Notes = (function(superClass) {
extend(Notes, superClass);
function Notes() {
this.create = __bind(this.create, this);
this.create = bind(this.create, this);
return Notes.__super__.constructor.apply(this, arguments);

@@ -18,0 +18,0 @@ }

(function() {
var BaseModel, ProjectKeys, Utils,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;

@@ -11,9 +11,9 @@ BaseModel = require('../BaseModel');

ProjectKeys = (function(_super) {
__extends(ProjectKeys, _super);
ProjectKeys = (function(superClass) {
extend(ProjectKeys, superClass);
function ProjectKeys() {
this.addKey = __bind(this.addKey, this);
this.getKey = __bind(this.getKey, this);
this.listKeys = __bind(this.listKeys, this);
this.addKey = bind(this.addKey, this);
this.getKey = bind(this.getKey, this);
this.listKeys = bind(this.listKeys, this);
return ProjectKeys.__super__.constructor.apply(this, arguments);

@@ -20,0 +20,0 @@ }

(function() {
var BaseModel, ProjectHooks, Utils,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;

@@ -11,11 +11,11 @@ BaseModel = require('../BaseModel');

ProjectHooks = (function(_super) {
__extends(ProjectHooks, _super);
ProjectHooks = (function(superClass) {
extend(ProjectHooks, superClass);
function ProjectHooks() {
this.remove = __bind(this.remove, this);
this.update = __bind(this.update, this);
this.add = __bind(this.add, this);
this.show = __bind(this.show, this);
this.list = __bind(this.list, this);
this.remove = bind(this.remove, this);
this.update = bind(this.update, this);
this.add = bind(this.add, this);
this.show = bind(this.show, this);
this.list = bind(this.list, this);
return ProjectHooks.__super__.constructor.apply(this, arguments);

@@ -22,0 +22,0 @@ }

(function() {
var BaseModel, ProjectIssues, Utils,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;

@@ -11,8 +11,8 @@ BaseModel = require('../BaseModel');

ProjectIssues = (function(_super) {
__extends(ProjectIssues, _super);
ProjectIssues = (function(superClass) {
extend(ProjectIssues, superClass);
function ProjectIssues() {
this.list = __bind(this.list, this);
this.init = __bind(this.init, this);
this.list = bind(this.list, this);
this.init = bind(this.init, this);
return ProjectIssues.__super__.constructor.apply(this, arguments);

@@ -19,0 +19,0 @@ }

(function() {
var BaseModel, ProjectLabels, Utils,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;

@@ -11,7 +11,7 @@ BaseModel = require('../BaseModel');

ProjectLabels = (function(_super) {
__extends(ProjectLabels, _super);
ProjectLabels = (function(superClass) {
extend(ProjectLabels, superClass);
function ProjectLabels() {
this.all = __bind(this.all, this);
this.all = bind(this.all, this);
return ProjectLabels.__super__.constructor.apply(this, arguments);

@@ -18,0 +18,0 @@ }

(function() {
var BaseModel, ProjectMembers, Utils,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;

@@ -11,11 +11,11 @@ BaseModel = require('../BaseModel');

ProjectMembers = (function(_super) {
__extends(ProjectMembers, _super);
ProjectMembers = (function(superClass) {
extend(ProjectMembers, superClass);
function ProjectMembers() {
this.remove = __bind(this.remove, this);
this.update = __bind(this.update, this);
this.add = __bind(this.add, this);
this.show = __bind(this.show, this);
this.list = __bind(this.list, this);
this.remove = bind(this.remove, this);
this.update = bind(this.update, this);
this.add = bind(this.add, this);
this.show = bind(this.show, this);
this.list = bind(this.list, this);
return ProjectMembers.__super__.constructor.apply(this, arguments);

@@ -22,0 +22,0 @@ }

(function() {
var BaseModel, ProjectMergeRequests, Utils,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;

@@ -11,11 +11,11 @@ BaseModel = require('../BaseModel');

ProjectMergeRequests = (function(_super) {
__extends(ProjectMergeRequests, _super);
ProjectMergeRequests = (function(superClass) {
extend(ProjectMergeRequests, superClass);
function ProjectMergeRequests() {
this.comment = __bind(this.comment, this);
this.update = __bind(this.update, this);
this.add = __bind(this.add, this);
this.show = __bind(this.show, this);
this.list = __bind(this.list, this);
this.comment = bind(this.comment, this);
this.update = bind(this.update, this);
this.add = bind(this.add, this);
this.show = bind(this.show, this);
this.list = bind(this.list, this);
return ProjectMergeRequests.__super__.constructor.apply(this, arguments);

@@ -22,0 +22,0 @@ }

(function() {
var BaseModel, ProjectMilestones, Utils,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;

@@ -11,10 +11,10 @@ BaseModel = require('../BaseModel');

ProjectMilestones = (function(_super) {
__extends(ProjectMilestones, _super);
ProjectMilestones = (function(superClass) {
extend(ProjectMilestones, superClass);
function ProjectMilestones() {
this.update = __bind(this.update, this);
this.add = __bind(this.add, this);
this.show = __bind(this.show, this);
this.list = __bind(this.list, this);
this.update = bind(this.update, this);
this.add = bind(this.add, this);
this.show = bind(this.show, this);
this.list = bind(this.list, this);
return ProjectMilestones.__super__.constructor.apply(this, arguments);

@@ -21,0 +21,0 @@ }

(function() {
var BaseModel, ProjectRepository, Utils,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;

@@ -11,20 +11,20 @@ BaseModel = require('../BaseModel');

ProjectRepository = (function(_super) {
__extends(ProjectRepository, _super);
ProjectRepository = (function(superClass) {
extend(ProjectRepository, superClass);
function ProjectRepository() {
this.updateFile = __bind(this.updateFile, this);
this.createFile = __bind(this.createFile, this);
this.showFile = __bind(this.showFile, this);
this.listTree = __bind(this.listTree, this);
this.diffCommit = __bind(this.diffCommit, this);
this.showCommit = __bind(this.showCommit, this);
this.listCommits = __bind(this.listCommits, this);
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);
this.listBranches = __bind(this.listBranches, this);
this.updateFile = bind(this.updateFile, this);
this.createFile = bind(this.createFile, this);
this.showFile = bind(this.showFile, this);
this.listTree = bind(this.listTree, this);
this.diffCommit = bind(this.diffCommit, this);
this.showCommit = bind(this.showCommit, this);
this.listCommits = bind(this.listCommits, this);
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);
this.listBranches = bind(this.listBranches, this);
return ProjectRepository.__super__.constructor.apply(this, arguments);

@@ -167,3 +167,3 @@ }

this.debug("Projects::diffCommit()");
return this.get("projects/" + (Utils.parseProjectId(projectId)) + "/repository/branches/" + sha, (function(_this) {
return this.get("projects/" + (Utils.parseProjectId(projectId)) + "/repository/commits/" + sha + "/diff", (function(_this) {
return function(data) {

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

(function() {
var BaseModel, Projects, Utils,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;

@@ -11,15 +11,17 @@ BaseModel = require('../BaseModel');

Projects = (function(_super) {
__extends(Projects, _super);
Projects = (function(superClass) {
extend(Projects, superClass);
function Projects() {
this.listTags = __bind(this.listTags, this);
this.listCommits = __bind(this.listCommits, this);
this.listMembers = __bind(this.listMembers, this);
this.editMember = __bind(this.editMember, this);
this.addMember = __bind(this.addMember, this);
this.create = __bind(this.create, this);
this.show = __bind(this.show, this);
this.all = __bind(this.all, this);
this.init = __bind(this.init, this);
this.search = bind(this.search, this);
this.remove = bind(this.remove, this);
this.listTags = bind(this.listTags, this);
this.listCommits = bind(this.listCommits, this);
this.listMembers = bind(this.listMembers, this);
this.editMember = bind(this.editMember, this);
this.addMember = bind(this.addMember, this);
this.create = bind(this.create, this);
this.show = bind(this.show, this);
this.all = bind(this.all, this);
this.init = bind(this.init, this);
return Projects.__super__.constructor.apply(this, arguments);

@@ -189,2 +191,37 @@ }

Projects.prototype.remove = function(projectId, fn) {
if (fn == null) {
fn = null;
}
this.debug("Projects::remove()");
return this["delete"]("projects/" + (Utils.parseProjectId(projectId)), (function(_this) {
return function(data) {
if (fn) {
return fn(data);
}
};
})(this));
};
Projects.prototype.search = function(projectName, params, fn) {
if (params == null) {
params = {};
}
if (fn == null) {
fn = null;
}
if ('function' === typeof params) {
fn = params;
params = {};
}
this.debug("Projects::search()");
return this.get("projects/search/" + projectName, params, (function(_this) {
return function(data) {
if (fn) {
return fn(data);
}
};
})(this));
};
return Projects;

@@ -191,0 +228,0 @@

(function() {
var BaseModel, Users,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty;
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
BaseModel = require('../BaseModel');
Users = (function(_super) {
__extends(Users, _super);
Users = (function(superClass) {
extend(Users, superClass);
function Users() {
this.session = __bind(this.session, this);
this.create = __bind(this.create, this);
this.show = __bind(this.show, this);
this.current = __bind(this.current, this);
this.all = __bind(this.all, this);
this.search = bind(this.search, this);
this.session = bind(this.session, this);
this.create = bind(this.create, this);
this.show = bind(this.show, this);
this.current = bind(this.current, this);
this.all = bind(this.all, this);
this.init = bind(this.init, this);
return Users.__super__.constructor.apply(this, arguments);
}
Users.prototype.init = function() {
return this.keys = this.load('UserKeys');
};
Users.prototype.all = function(params, fn) {

@@ -60,9 +66,3 @@ var cb, data;

})(this);
return this.get("users", params, (function(_this) {
return function(data) {
if (fn) {
return fn(data);
}
};
})(this));
return this.get("users", params, cb);
};

@@ -128,2 +128,18 @@

Users.prototype.search = function(emailOrUsername, fn) {
var params;
if (fn == null) {
fn = null;
}
this.debug("Users::search(" + emailOrUsername + ")");
params = {
search: emailOrUsername
};
return this.get("users", params, function(data) {
if (fn) {
return fn(data);
}
});
};
return Users;

@@ -130,0 +146,0 @@

{
"name": "gitlab",
"version": "1.3.0",
"version": "1.4.0",
"description": "GitLab API Nodejs library.",

@@ -11,4 +11,4 @@ "main": "lib/index.js",

"scripts": {
"test": "./node_modules/mocha/bin/mocha tests",
"build": "./node_modules/coffee-script/bin/cake build"
"test": "./node_modules/.bin/mocha tests",
"build": "./node_modules/.bin/cake build"
},

@@ -21,6 +21,6 @@ "repository": {

"debug": "*",
"slumber": ">=0.5.0"
"slumber": ">=0.7.0"
},
"devDependencies": {
"coffee-script": "*",
"coffee-script": ">=1.9.1",
"mocha": "",

@@ -27,0 +27,0 @@ "proxyquire": "~1.0.1",

@@ -6,7 +6,4 @@ node-gitlab

[![Dependency Status](https://david-dm.org/node-gitlab/node-gitlab.png?theme=shields.io)](https://david-dm.org/node-gitlab/node-gitlab)
[![authors](https://sourcegraph.com/api/repos/github.com/node-gitlab/node-gitlab/badges/authors.png)](https://sourcegraph.com/github.com/node-gitlab/node-gitlab)
[![library users](https://sourcegraph.com/api/repos/github.com/node-gitlab/node-gitlab/badges/library-users.png)](https://sourcegraph.com/github.com/node-gitlab/node-gitlab)
[![Total views](https://sourcegraph.com/api/repos/github.com/node-gitlab/node-gitlab/counters/views.png)](https://sourcegraph.com/github.com/node-gitlab/node-gitlab)
[![Views in the last 24 hours](https://sourcegraph.com/api/repos/github.com/node-gitlab/node-gitlab/counters/views-24h.png)](https://sourcegraph.com/github.com/node-gitlab/node-gitlab)
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/node-gitlab/node-gitlab/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
[![Code Climate](https://codeclimate.com/github/node-gitlab/node-gitlab/badges/gpa.svg)](https://codeclimate.com/github/node-gitlab/node-gitlab)

@@ -17,3 +14,3 @@ [![NPM Badge](https://nodei.co/npm/gitlab.png?downloads=true&stars=true)](https://npmjs.org/package/gitlab)

[GitLab](https://github.com/gitlabhq/gitlabhq) API Nodejs library.
It wraps the HTTP api library described [here](https://github.com/node-gitlab/gitlabhq/tree/master/doc/api).
It wraps the HTTP api library described [here](https://github.com/gitlabhq/gitlabhq/tree/master/doc/api).

@@ -110,2 +107,6 @@ Maintained by [Manfred Touron](https://github.com/moul) and [Dave Irvine](https://github.com/dave-irvine)

- [Jose Jiménez](https://github.com/jjimenezlopez)
- [huhgawz](https://github.com/huhgawz)
- [Connor Weng](https://github.com/ConnorWeng)
- [Felix Fichte](https://github.com/spruce)
- [Steve Norman](https://github.com/stevenorman)

@@ -121,5 +122,25 @@ License

1.3.0 (2015-02-09)
[1.4.0](https://github.com/node-gitlab/node-gitlab/tree/v1.4.0) (2015-08-11)
------------------
- Now using headers for PRIVATE-TOKEN
- Add `Groups.create`, `Groups.addProject` and `Groups.search` methods
- Add `Projects.remove` and `Projects.search` methods
- Add `UserKeys` resource
- Add `Users.search` method
- Rename `ProjectMielstones.get` to `ProjectMilestones.all`
- Handling pagination on multiple new `.all()` methods
- Various stability and performance fixes
Thanks to [@huhgawz](https://github.com/huhgawz),
[@ConnorWeng](https://github.com/ConnorWeng), [@langma](https://github.com/langma),
[@spruce](https://github.com/spruce), [@stevenorman](https://github.com/stevenorman)
and [@nogs](https://github.com/nogs)
[Full commits list](https://github.com/node-gitlab/node-gitlab/compare/v1.3.0...develop)
[1.3.0](https://github.com/node-gitlab/node-gitlab/tree/v1.3.0) (2015-02-09)
------------------
- Now handling notes

@@ -132,3 +153,3 @@ - Now handling lables

1.2.0 (2014-12-24)
[1.2.0](https://github.com/node-gitlab/node-gitlab/tree/v1.2.0) (2014-12-24)
------------------

@@ -142,3 +163,3 @@

1.1.0 (2014-11-04)
[1.1.0](https://github.com/node-gitlab/node-gitlab/tree/v1.1.0) (2014-11-04)
------------------

@@ -151,3 +172,3 @@

1.0.0 (2014-08-19)
[1.0.0](https://github.com/node-gitlab/node-gitlab/tree/v1.0.0) (2014-08-19)
------------------

@@ -157,1 +178,6 @@

- Now we have a CHANGELOG
[POC](https://github.com/node-gitlab/node-gitlab/tree/e7a5eedea4c27aed8bd567a3c455ec311b915d60) (2012-12-11)
----------------
- POC
(function() {
var Mock,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
Mock = (function() {
function Mock() {
this.beforeEach = __bind(this.beforeEach, this);
this.update_path = __bind(this.update_path, this);
this.setup = __bind(this.setup, this);
this.beforeEach = bind(this.beforeEach, this);
this.update_path = bind(this.update_path, this);
this.setup = bind(this.setup, this);
var project;

@@ -66,4 +66,4 @@ this.path = '';

Mock.prototype.update_path = function(_at_path) {
this.path = _at_path;
Mock.prototype.update_path = function(path1) {
this.path = path1;
return this;

@@ -101,10 +101,10 @@ };

Mock.prototype.beforeEach = function() {
var method, _i, _len, _ref, _results;
_ref = ['get', 'delete', 'post', 'put', 'patch'];
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
method = _ref[_i];
_results.push(this[method] = this.defaults[method]);
var i, len, method, ref, results;
ref = ['get', 'delete', 'post', 'put', 'patch'];
results = [];
for (i = 0, len = ref.length; i < len; i++) {
method = ref[i];
results.push(this[method] = this.defaults[method]);
}
return _results;
return results;
};

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

@@ -56,5 +56,5 @@ (function() {

before(function() {
var i, _i, _results;
_results = [];
for (i = _i = 0; _i <= 102; i = ++_i) {
var i, j, results;
results = [];
for (i = j = 0; j <= 102; i = ++j) {
if (i < 1) {

@@ -70,8 +70,8 @@ arrayOf1.push({});

if (i < 101) {
_results.push(arrayOf101.push({}));
results.push(arrayOf101.push({}));
} else {
_results.push(void 0);
results.push(void 0);
}
}
return _results;
return results;
});

@@ -78,0 +78,0 @@ it("should use GET verb", function() {

@@ -72,6 +72,6 @@ (function() {

return gitlab.projects.all(function(projects) {
var project, _i, _len;
var i, len, project;
assert(projects.length > 0);
for (_i = 0, _len = projects.length; _i < _len; _i++) {
project = projects[_i];
for (i = 0, len = projects.length; i < len; i++) {
project = projects[i];
validate_project(project);

@@ -78,0 +78,0 @@ }

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

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