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

gitlab

Package Overview
Dependencies
Maintainers
1
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 0.2.2 to 0.2.5

examples/list-users-v3.coffee

2

examples/example.credentials.js

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

// Generated by CoffeeScript 1.6.2
// Generated by CoffeeScript 1.6.3
(function() {

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

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

// Generated by CoffeeScript 1.6.2
// Generated by CoffeeScript 1.6.3
(function() {

@@ -19,3 +19,2 @@ var Gitlab, credentials, gitlab;

var project, _i, _len, _results;
_results = [];

@@ -22,0 +21,0 @@ for (_i = 0, _len = projects.length; _i < _len; _i++) {

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

// Generated by CoffeeScript 1.6.2
// Generated by CoffeeScript 1.6.3
(function() {

@@ -19,3 +19,2 @@ var Gitlab, credentials, gitlab;

var user, _i, _len, _results;
_results = [];

@@ -22,0 +21,0 @@ for (_i = 0, _len = users.length; _i < _len; _i++) {

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

// Generated by CoffeeScript 1.6.2
// Generated by CoffeeScript 1.6.3
(function() {

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

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

// Generated by CoffeeScript 1.6.2
// Generated by CoffeeScript 1.6.3
(function() {

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

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

// Generated by CoffeeScript 1.6.2
// Generated by CoffeeScript 1.6.3
(function() {

@@ -19,5 +19,4 @@ var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },

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

@@ -30,3 +29,2 @@ }

var args, name, _ref, _ref1;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];

@@ -39,3 +37,2 @@ name = (typeof this !== "undefined" && this !== null ? (_ref = this.constructor) != null ? typeof _ref.toString === "function" ? (_ref1 = _ref.toString().match(/function\s*(\w+)/)) != null ? _ref1[1] : void 0 : void 0 : void 0 : void 0) || 'ApiBase';

var args;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];

@@ -42,0 +39,0 @@ if (this.options.verbose !== false) {

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

// Generated by CoffeeScript 1.6.2
// Generated by CoffeeScript 1.6.3
(function() {

@@ -24,3 +24,4 @@ var ApiBase, querystring, _ref,

this._translateUrl = __bind(this._translateUrl, this);
this.handleOptions = __bind(this.handleOptions, this); _ref = ApiBaseHTTP.__super__.constructor.apply(this, arguments);
this.handleOptions = __bind(this.handleOptions, this);
_ref = ApiBaseHTTP.__super__.constructor.apply(this, arguments);
return _ref;

@@ -30,13 +31,12 @@ }

ApiBaseHTTP.prototype.handleOptions = function() {
var host, key, value, _base, _base1, _base10, _base2, _base3, _base4, _base5, _base6, _base7, _base8, _base9, _ref1, _ref10, _ref11, _ref12, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
var host, key, value, _base, _base1, _base10, _base2, _base3, _base4, _base5, _base6, _base7, _base8, _base9, _ref1;
ApiBaseHTTP.__super__.handleOptions.apply(this, arguments);
if ((_ref1 = (_base = this.options).debug) == null) {
if ((_base = this.options).debug == null) {
_base.debug = false;
}
if (this.options.url != null) {
_ref2 = require('url').parse(this.options.url);
for (key in _ref2) {
value = _ref2[key];
if ((_ref3 = (_base1 = this.options)[key]) == null) {
_ref1 = require('url').parse(this.options.url);
for (key in _ref1) {
value = _ref1[key];
if ((_base1 = this.options)[key] == null) {
_base1[key] = value;

@@ -46,30 +46,29 @@ }

}
if ((_ref4 = (_base2 = this.options).host) == null) {
if ((_base2 = this.options).host == null) {
_base2.host = this.options.hostname;
}
host = this.options.host.split(':');
if ((_ref5 = (_base3 = this.options).hostname) == null) {
if ((_base3 = this.options).hostname == null) {
_base3.hostname = host[0];
}
if ((_ref6 = (_base4 = this.options).port) == null) {
if ((_base4 = this.options).port == null) {
_base4.port = host[1];
}
if ((_ref7 = (_base5 = this.options).username) == null) {
if ((_base5 = this.options).username == null) {
_base5.username = null;
}
if ((_ref8 = (_base6 = this.options).protocol) == null) {
if ((_base6 = this.options).protocol == null) {
_base6.protocol = 'http:';
}
if ((_ref9 = (_base7 = this.options).port) == null) {
if ((_base7 = this.options).port == null) {
_base7.port = this.options.protocol === 'https:' ? 443 : 80;
}
this.options.port = parseInt(this.options.port);
if ((_ref10 = (_base8 = this.options).path) == null) {
if ((_base8 = this.options).path == null) {
_base8.path = '/';
}
if ((_ref11 = (_base9 = this.options).pathname) == null) {
if ((_base9 = this.options).pathname == null) {
_base9.pathname = this.options.path;
}
this.options.host = "" + this.options.hostname + ":" + this.options.port;
if ((_ref12 = (_base10 = this.options).base_url) == null) {
if ((_base10 = this.options).base_url == null) {
_base10.base_url = '';

@@ -82,3 +81,2 @@ }

var url;
if (params == null) {

@@ -96,3 +94,2 @@ params = {};

var options;
if (params == null) {

@@ -118,3 +115,2 @@ params = {};

var options;
if (fn == null) {

@@ -132,3 +128,2 @@ fn = null;

var options;
if (data == null) {

@@ -150,3 +145,2 @@ data = {};

var options;
if (data == null) {

@@ -167,24 +161,23 @@ data = {};

ApiBaseHTTP.prototype._request_options = function(options) {
var _base, _base1, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
if ((_ref1 = options.host) == null) {
options.host = this.options.hostname;
var _base, _base1;
if (options.host == null) {
options.host = this.options.host;
}
if ((_ref2 = options.protocol) == null) {
if (options.protocol == null) {
options.protocol = this.options.protocol;
}
if ((_ref3 = options.port) == null) {
if (options.port == null) {
options.port = this.options.port;
}
if ((_ref4 = options.method) == null) {
if (options.method == null) {
options.method = 'GET';
}
if ((_ref5 = options.headers) == null) {
if (options.headers == null) {
options.headers = {};
}
if ((_ref6 = (_base = options.headers).host) == null) {
if ((_base = options.headers).host == null) {
_base.host = this.options.hostname;
}
if (this.options.username != null) {
if ((_ref7 = (_base1 = options.header).Authorization) == null) {
if ((_base1 = options.header).Authorization == null) {
_base1.Authorization = 'Basic ' + new Buffer("" + this.options.username + ":" + this.options.password).toString('base64');

@@ -198,3 +191,2 @@ }

var e, response;
if (fn == null) {

@@ -215,9 +207,7 @@ fn = null;

ApiBaseHTTP.prototype._request = function(options, fn) {
var httpClient, post_data, request, _base, _base1, _ref1, _ref2, _ref3,
var httpClient, post_data, request, _base, _base1,
_this = this;
if (fn == null) {
fn = null;
}
console.log(options);
this.debug(options.path);

@@ -238,9 +228,9 @@ this._request_options(options);

post_data = require('querystring').stringify(options.data);
if ((_ref1 = options.headers) == null) {
if (options.headers == null) {
options.headers = {};
}
if ((_ref2 = (_base = options.headers)['Content-Length']) == null) {
if ((_base = options.headers)['Content-Length'] == null) {
_base['Content-Length'] = post_data.length;
}
if ((_ref3 = (_base1 = options.headers)['Content-Type']) == null) {
if ((_base1 = options.headers)['Content-Type'] == null) {
_base1['Content-Type'] = 'application/x-www-form-urlencoded';

@@ -256,3 +246,2 @@ }

var buffer;
buffer = '';

@@ -259,0 +248,0 @@ response.on('data', function(chunk) {

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

// Generated by CoffeeScript 1.6.2
// Generated by CoffeeScript 1.6.3
(function() {

@@ -14,3 +14,4 @@ var ApiBaseHTTP, _ref,

function ApiV2() {
this.handleOptions = __bind(this.handleOptions, this); _ref = ApiV2.__super__.constructor.apply(this, arguments);
this.handleOptions = __bind(this.handleOptions, this);
_ref = ApiV2.__super__.constructor.apply(this, arguments);
return _ref;

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

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

// Generated by CoffeeScript 1.6.2
// Generated by CoffeeScript 1.6.3
(function() {

@@ -14,3 +14,4 @@ var ApiBaseHTTP, _ref,

function ApiV3() {
this.handleOptions = __bind(this.handleOptions, this); _ref = ApiV3.__super__.constructor.apply(this, arguments);
this.handleOptions = __bind(this.handleOptions, this);
_ref = ApiV3.__super__.constructor.apply(this, arguments);
return _ref;

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

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

// Generated by CoffeeScript 1.6.2
// Generated by CoffeeScript 1.6.3
(function() {

@@ -3,0 +3,0 @@ var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };

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

// Generated by CoffeeScript 1.6.2
// Generated by CoffeeScript 1.6.3
(function() {

@@ -18,3 +18,4 @@ var BaseModel, ProjectHooks, _ref,

this.show = __bind(this.show, this);
this.list = __bind(this.list, this); _ref = ProjectHooks.__super__.constructor.apply(this, arguments);
this.list = __bind(this.list, this);
_ref = ProjectHooks.__super__.constructor.apply(this, arguments);
return _ref;

@@ -25,3 +26,2 @@ }

var _this = this;
if (fn == null) {

@@ -40,3 +40,2 @@ fn = null;

var _this = this;
if (fn == null) {

@@ -56,3 +55,2 @@ fn = null;

_this = this;
if (fn == null) {

@@ -75,3 +73,2 @@ fn = null;

_this = this;
if (fn == null) {

@@ -94,3 +91,2 @@ fn = null;

_this = this;
if (fn == null) {

@@ -97,0 +93,0 @@ fn = null;

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

// Generated by CoffeeScript 1.6.2
// Generated by CoffeeScript 1.6.3
(function() {

@@ -18,3 +18,4 @@ var BaseModel, ProjectMembers, _ref,

this.show = __bind(this.show, this);
this.list = __bind(this.list, this); _ref = ProjectMembers.__super__.constructor.apply(this, arguments);
this.list = __bind(this.list, this);
_ref = ProjectMembers.__super__.constructor.apply(this, arguments);
return _ref;

@@ -25,3 +26,2 @@ }

var _this = this;
if (fn == null) {

@@ -40,3 +40,2 @@ fn = null;

var _this = this;
if (fn == null) {

@@ -56,3 +55,2 @@ fn = null;

_this = this;
if (accessLevel == null) {

@@ -79,3 +77,2 @@ accessLevel = 30;

_this = this;
if (accessLevel == null) {

@@ -100,3 +97,2 @@ accessLevel = 30;

var _this = this;
if (fn == null) {

@@ -103,0 +99,0 @@ fn = null;

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

// Generated by CoffeeScript 1.6.2
// Generated by CoffeeScript 1.6.3
(function() {

@@ -18,3 +18,4 @@ var BaseModel, ProjectMergeRequests, _ref,

this.show = __bind(this.show, this);
this.list = __bind(this.list, this); _ref = ProjectMergeRequests.__super__.constructor.apply(this, arguments);
this.list = __bind(this.list, this);
_ref = ProjectMergeRequests.__super__.constructor.apply(this, arguments);
return _ref;

@@ -25,3 +26,2 @@ }

var _this = this;
if (page == null) {

@@ -53,3 +53,2 @@ page = 1;

var _this = this;
if (fn == null) {

@@ -69,3 +68,2 @@ fn = null;

_this = this;
if (fn == null) {

@@ -92,3 +90,2 @@ fn = null;

_this = this;
if (fn == null) {

@@ -111,3 +108,2 @@ fn = null;

_this = this;
if (fn == null) {

@@ -114,0 +110,0 @@ fn = null;

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

// Generated by CoffeeScript 1.6.2
// Generated by CoffeeScript 1.6.3
(function() {

@@ -16,2 +16,3 @@ var BaseModel, Projects, _ref,

this.listMembers = __bind(this.listMembers, this);
this.editMember = __bind(this.editMember, this);
this.addMember = __bind(this.addMember, this);

@@ -21,3 +22,4 @@ this.create = __bind(this.create, this);

this.all = __bind(this.all, this);
this.init = __bind(this.init, this); _ref = Projects.__super__.constructor.apply(this, arguments);
this.init = __bind(this.init, this);
_ref = Projects.__super__.constructor.apply(this, arguments);
return _ref;

@@ -32,5 +34,3 @@ }

Projects.prototype.all = function(params, fn) {
var _ref1,
_this = this;
var _this = this;
if (params == null) {

@@ -47,3 +47,3 @@ params = {};

this.debug("Projects::all()");
if ((_ref1 = params.per_page) == null) {
if (params.per_page == null) {
params.per_page = 100;

@@ -60,3 +60,2 @@ }

var _this = this;
if (fn == null) {

@@ -103,2 +102,17 @@ fn = null;

Projects.prototype.editMember = function(params, fn) {
if (params == null) {
params = {};
}
if (fn == null) {
fn = null;
}
this.debug("Projects::editMember()");
return this.put("projects/" + params.id + "/members/" + params.user_id, params, function(data) {
if (fn) {
return fn(data);
}
});
};
Projects.prototype.listMembers = function(params, fn) {

@@ -121,3 +135,2 @@ if (params == null) {

var _this = this;
if (params == null) {

@@ -124,0 +137,0 @@ params = {};

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

// Generated by CoffeeScript 1.6.2
// Generated by CoffeeScript 1.6.3
(function() {

@@ -17,3 +17,4 @@ var BaseModel, Users, _ref,

this.show = __bind(this.show, this);
this.all = __bind(this.all, this); _ref = Users.__super__.constructor.apply(this, arguments);
this.all = __bind(this.all, this);
_ref = Users.__super__.constructor.apply(this, arguments);
return _ref;

@@ -24,3 +25,2 @@ }

var _this = this;
if (fn == null) {

@@ -39,3 +39,2 @@ fn = null;

var _this = this;
if (fn == null) {

@@ -69,3 +68,2 @@ fn = null;

var params;
if (fn == null) {

@@ -72,0 +70,0 @@ fn = null;

{
"name": "gitlab",
"version": "0.2.2",
"version": "0.2.5",
"description": "gitlab api nodejs library",

@@ -5,0 +5,0 @@ "main": "index.js",

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