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

@sdc224/gitlab-api

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sdc224/gitlab-api - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

4

dist/index.esm.js
/*!
* @sdc224/gitlab-api v1.1.0
* @sdc224/gitlab-api v1.1.1
* (c) Sourodeep Chatterjee. All Rights Reserved

@@ -255,3 +255,2 @@ * Released under the MIT License.

jest.setTimeout(30000);
var Projects = function (config, controller) {

@@ -352,3 +351,2 @@ var prepareProjectQueryURL = function (requestObject, optionalUrl) {

};
jest.setTimeout(5000);

@@ -355,0 +353,0 @@ var Gitlab = function (constructorObject) {

/*!
* @sdc224/gitlab-api v1.1.0
* @sdc224/gitlab-api v1.1.1
* (c) Sourodeep Chatterjee. All Rights Reserved

@@ -263,3 +263,2 @@ * Released under the MIT License.

jest.setTimeout(30000);
var Projects = function (config, controller) {

@@ -360,3 +359,2 @@ var prepareProjectQueryURL = function (requestObject, optionalUrl) {

};
jest.setTimeout(5000);

@@ -363,0 +361,0 @@ var Gitlab = function (constructorObject) {

/*!
* @sdc224/gitlab-api v1.1.0
* @sdc224/gitlab-api v1.1.1
* (c) Sourodeep Chatterjee. All Rights Reserved

@@ -263,3 +263,2 @@ * Released under the MIT License.

jest.setTimeout(30000);
var Projects = function (config, controller) {

@@ -360,3 +359,2 @@ var prepareProjectQueryURL = function (requestObject, optionalUrl) {

};
jest.setTimeout(5000);

@@ -363,0 +361,0 @@ var Gitlab = function (constructorObject) {

/*!
* @sdc224/gitlab-api v1.1.0
* @sdc224/gitlab-api v1.1.1
* (c) Sourodeep Chatterjee. All Rights Reserved

@@ -21,2 +21,2 @@ * Released under the MIT License.

***************************************************************************** */
function h(e,t,n,r){return new(n||(n=Promise))((function(o,u){function i(e){try{s(r.next(e))}catch(e){u(e)}}function a(e){try{s(r.throw(e))}catch(e){u(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}s((r=r.apply(e,t||[])).next())}))}function m(e,t){var n,r,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(u){return function(a){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,a])}}}var v=function(e){return e===Object(e)&&!Array.isArray(e)&&"function"!=typeof e},y=function(e){if(v(e)){var t={};return Object.keys(e).forEach((function(n){var r;t[(r=n,r.replace(/([-_][a-z])/gi,(function(e){return e.toUpperCase().replace("-","").replace("_","")})))]=y(e[n])})),t}return Array.isArray(e)?e.map((function(e){return y(e)})):e},b=function(e){if(v(e)){var t={};return Object.keys(e).forEach((function(n){var r;t[(r=n,r.replace(/[A-Z]/g,(function(e){return"_"+e.toLowerCase()})))]=b(e[n])})),t}return Array.isArray(e)?e.map((function(e){return b(e)})):e},g=function(e,t){switch(t){case"camel":return y(e);case"snake":return b(e);default:throw new Error("Please pass correct type to convert")}},k=function(e){var t=Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&");return t.length>0?"?"+t:""};jest.setTimeout(3e4);var w=function(e,t){var n=function(t,n){void 0===n&&(n=""),n.length>0&&(n="/"+n);var r=e.getEndpointSchema("projects");return{endpointSchema:r,params:""+r.path+k(t)+n}},r=function(e,n,r){return h(void 0,void 0,void 0,(function(){var o;return m(this,(function(u){switch(u.label){case 0:return o=null,console.log(n),"get"!==e.method?[3,2]:[4,t.get(n)];case 1:return o=u.sent(),[3,5];case 2:return"post"!==e.method?[3,4]:[4,t.post(n,r)];case 3:return o=u.sent(),[3,5];case 4:throw new Error("Incorrect Method Called");case 5:return[2,o.data]}}))}))};return{all:function(e){return h(void 0,void 0,void 0,(function(){var t,o,u,i,a;return m(this,(function(s){switch(s.label){case 0:return t={},e&&(t=g(e,"snake")),o=n(t),u=o.endpointSchema,i=o.params,[4,r(u,i)];case 1:return a=s.sent(),[2,g(a,"camel")]}}))}))},user:function(e){return h(void 0,void 0,void 0,(function(){var t,o,u,i,a;return m(this,(function(s){switch(s.label){case 0:if(!e.userId||"string"!=typeof e.userId)throw new Error("User ID must be there!");return t=g(e,"snake"),o=n(t),u=o.endpointSchema,i=o.params,[4,r(u,i)];case 1:return a=s.sent(),[2,g(a,"camel")]}}))}))},starredByUser:function(t){return h(void 0,void 0,void 0,(function(){var n,o,u,i,a;return m(this,(function(s){switch(s.label){case 0:if(!t.userId||"string"!=typeof t.userId)throw new Error("User ID must be there!");return n=g(t,"snake"),o=function(t,n){void 0===n&&(n=""),n.length>0&&(n="/"+n);var r=t.user_id;delete t.user_id;var o=e.getEndpointSchema("users");return{endpointSchema:o,params:o.path+"/"+r+"/starred_projects"+k(t)}}(n),u=o.endpointSchema,i=o.params,[4,r(u,i)];case 1:return a=s.sent(),[2,g(a,"camel")]}}))}))}}};jest.setTimeout(5e3);e.default=function(e){var t=function(e){var t=o,n=a;if(!e)throw new Error("You have to pass API Token atleast to get this running");return n.tokenValue=e.token,e.host&&(t.host=e.host),e.version&&(t.apiVersion=e.version),e.timeout&&(t.timeout=e.timeout),e.tokenType&&(n.tokenType=e.tokenType),{configObject:t,authenticationObject:n}}(e),n=t.configObject,r=t.authenticationObject,u=function(e,t,n,r,o){"/"!==e[e.length-1]&&(e+="/"),"/"!==r[r.length-1]&&(r+="/");var u={host:e,baseURL:e+r+t,apiUrl:r,apiVersion:t,timeout:n,endpoints:o};return{getHost:function(){return u.host},getBaseURL:function(){return u.baseURL},getAPIVersion:function(){return u.apiVersion},getTimeout:function(){return u.timeout},getEndpoints:function(){return u.endpoints},getEndpointSchema:function(e){return u.endpoints[e]},getConfig:function(){return u},setHost:function(e){return u.host=e},setAPIVersion:function(e){return u.apiVersion=e},setTimeout:function(e){return u.timeout=e},setEndpoints:function(e){return u.endpoints=e}}}(n.host,n.apiVersion,n.timeout,n.apiUrl,n.endpoints),i=function(e,t){return d(e,t)}(u,s(r.tokenType,r.tokenValue));return{Projects:w(u,i)}},Object.defineProperty(e,"__esModule",{value:!0})}));
function h(e,t,n,r){return new(n||(n=Promise))((function(o,u){function i(e){try{s(r.next(e))}catch(e){u(e)}}function a(e){try{s(r.throw(e))}catch(e){u(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}s((r=r.apply(e,t||[])).next())}))}function m(e,t){var n,r,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(u){return function(a){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,a])}}}var v=function(e){return e===Object(e)&&!Array.isArray(e)&&"function"!=typeof e},y=function(e){if(v(e)){var t={};return Object.keys(e).forEach((function(n){var r;t[(r=n,r.replace(/([-_][a-z])/gi,(function(e){return e.toUpperCase().replace("-","").replace("_","")})))]=y(e[n])})),t}return Array.isArray(e)?e.map((function(e){return y(e)})):e},b=function(e){if(v(e)){var t={};return Object.keys(e).forEach((function(n){var r;t[(r=n,r.replace(/[A-Z]/g,(function(e){return"_"+e.toLowerCase()})))]=b(e[n])})),t}return Array.isArray(e)?e.map((function(e){return b(e)})):e},g=function(e,t){switch(t){case"camel":return y(e);case"snake":return b(e);default:throw new Error("Please pass correct type to convert")}},k=function(e){var t=Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&");return t.length>0?"?"+t:""},w=function(e,t){var n=function(t,n){void 0===n&&(n=""),n.length>0&&(n="/"+n);var r=e.getEndpointSchema("projects");return{endpointSchema:r,params:""+r.path+k(t)+n}},r=function(e,n,r){return h(void 0,void 0,void 0,(function(){var o;return m(this,(function(u){switch(u.label){case 0:return o=null,console.log(n),"get"!==e.method?[3,2]:[4,t.get(n)];case 1:return o=u.sent(),[3,5];case 2:return"post"!==e.method?[3,4]:[4,t.post(n,r)];case 3:return o=u.sent(),[3,5];case 4:throw new Error("Incorrect Method Called");case 5:return[2,o.data]}}))}))};return{all:function(e){return h(void 0,void 0,void 0,(function(){var t,o,u,i,a;return m(this,(function(s){switch(s.label){case 0:return t={},e&&(t=g(e,"snake")),o=n(t),u=o.endpointSchema,i=o.params,[4,r(u,i)];case 1:return a=s.sent(),[2,g(a,"camel")]}}))}))},user:function(e){return h(void 0,void 0,void 0,(function(){var t,o,u,i,a;return m(this,(function(s){switch(s.label){case 0:if(!e.userId||"string"!=typeof e.userId)throw new Error("User ID must be there!");return t=g(e,"snake"),o=n(t),u=o.endpointSchema,i=o.params,[4,r(u,i)];case 1:return a=s.sent(),[2,g(a,"camel")]}}))}))},starredByUser:function(t){return h(void 0,void 0,void 0,(function(){var n,o,u,i,a;return m(this,(function(s){switch(s.label){case 0:if(!t.userId||"string"!=typeof t.userId)throw new Error("User ID must be there!");return n=g(t,"snake"),o=function(t,n){void 0===n&&(n=""),n.length>0&&(n="/"+n);var r=t.user_id;delete t.user_id;var o=e.getEndpointSchema("users");return{endpointSchema:o,params:o.path+"/"+r+"/starred_projects"+k(t)}}(n),u=o.endpointSchema,i=o.params,[4,r(u,i)];case 1:return a=s.sent(),[2,g(a,"camel")]}}))}))}}};e.default=function(e){var t=function(e){var t=o,n=a;if(!e)throw new Error("You have to pass API Token atleast to get this running");return n.tokenValue=e.token,e.host&&(t.host=e.host),e.version&&(t.apiVersion=e.version),e.timeout&&(t.timeout=e.timeout),e.tokenType&&(n.tokenType=e.tokenType),{configObject:t,authenticationObject:n}}(e),n=t.configObject,r=t.authenticationObject,u=function(e,t,n,r,o){"/"!==e[e.length-1]&&(e+="/"),"/"!==r[r.length-1]&&(r+="/");var u={host:e,baseURL:e+r+t,apiUrl:r,apiVersion:t,timeout:n,endpoints:o};return{getHost:function(){return u.host},getBaseURL:function(){return u.baseURL},getAPIVersion:function(){return u.apiVersion},getTimeout:function(){return u.timeout},getEndpoints:function(){return u.endpoints},getEndpointSchema:function(e){return u.endpoints[e]},getConfig:function(){return u},setHost:function(e){return u.host=e},setAPIVersion:function(e){return u.apiVersion=e},setTimeout:function(e){return u.timeout=e},setEndpoints:function(e){return u.endpoints=e}}}(n.host,n.apiVersion,n.timeout,n.apiUrl,n.endpoints),i=function(e,t){return d(e,t)}(u,s(r.tokenType,r.tokenValue));return{Projects:w(u,i)}},Object.defineProperty(e,"__esModule",{value:!0})}));
{
"name": "@sdc224/gitlab-api",
"version": "1.1.0",
"version": "1.1.1",
"description": "A Repository for using Gitlab API in NodeJS",

@@ -5,0 +5,0 @@ "cdn": "dist/index.umd.js",

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