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

gitlab-restapi

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitlab-restapi - npm Package Compare versions

Comparing version 1.1.2 to 1.1.5

2

package.json
{
"name": "gitlab-restapi",
"version": "1.1.2",
"version": "1.1.5",
"description": "Integration with GitLab REST API",

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

@@ -72,2 +72,12 @@ # Integration with GitLab REST API

GitLab.Options can specify your method for fetching data.
For nodes 18+ - this is the own node fetch, for younger versions (unless otherwise specified) - the internal mechanism
```javascript
new GitLab.Options({
privateToken: process.env.GIT_TOKEN,
projectId: process.env.GIT_PID,
fetchMethod: fetch // axios, fetch, node-fetch, GitLab.Request, etc...
})
```
### List of [Jobs](https://docs.gitlab.com/ee/api/jobs.html) methods:

@@ -74,0 +84,0 @@

@@ -26,4 +26,3 @@ /*

*/
#methods = {
};
#methods = {};

@@ -104,5 +103,6 @@ get methods() {

if (response.ok) return new Class(await response.json());
else if (response.statusText && response.statusText === 'OK') return new Class(response.data);
else {
const e = await response.json();
console.error('WARNING:', e.message + ' : ' + url)
const e = response.statusText && response.data ? response.data : await response.json();
console.error('WARNING:', JSON.stringify({...e, url}))
}

@@ -109,0 +109,0 @@ } catch (e) {

@@ -52,4 +52,5 @@ /*

code: res.statusCode,
method: options.method,
url
}));
//return resolve(new Error(`HTTP status code ${res.statusMessage} ${res.statusCode} `))
}

@@ -56,0 +57,0 @@ const data = []

@@ -23,3 +23,3 @@ /*

projectId: process.env.GIT_PID,
//fetchMethod: new GitLab.Request()
fetchMethod: GitLab.Request // axios, fetch, node-fetch, etc...
}));

@@ -26,0 +26,0 @@

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