Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
frontend-gitlab
Advanced tools
GitLab api node module that does not require server-side dependencies.
GitLab api node module that does not require server side dependencies.
The goal is to make a very light weight set of functions to access the gitlab api.
There's a mix of focused requests and more broad custom functions. And you can use composition to use credentials over and over. So import only the ones that you need.
Here's a couple of examples:
import {getIssues} from 'frontend-gitlab/requests/issues';
getIssues({url:'http://foo.gitlab.com', token:'abc123'})();
That will return promise that will resolve with a list of project issues.
A slightly more complicated example shows the value of composition:
import {getProjectIssues} from 'frontend-gitlab/requests/issues';
const projectIssues = getProjectIssues({url:'http://foo.gitlab.com', token:'abc123'});
//Return the closed issues
projectIssues(0, {'state':'closed'})
//Return the open issues
projectIssues(0, {'state':'open'})
You can also mix and match
import gitlab from 'frontend-gitlab';
import {projectIssues, getProjectIssues} from 'frontend-gitlab/requests/issues';
const creds = gitlab({url:'http://foo.gitlab.com', token:'abc123'})
creds(getIssues);
creds(getProjectIssues, 0, {
'state':'open'
});
In this case, all you need to do is pass the function along with its arguments and you only need to add the credentials once.
This is a work in progress, so there are very little prebuilt functions. However, you should be able to do anything you want by creating a custom request with a few inputs.
Just get the path for the request you are making, pass a request type if needed and then an object for the parameters.
import {request} from 'frontend-gitlab/requests/custom'
const requester = request({url:'http://foo.gitlab.com', token:'abc123'});
// Default request type is GET
requester('projects/0/issues', {
params: {
'state':'closed'
}
})
// Omit the options object if a simple git request:
fetchContributors = (projectNumber) => {
return requester(`/projects/${projectNumber}/repository/contributors`)
}
// POST or any other method can be specified
requester('projects/0/issues', {
requestType: {
method: "POST"
},
params: {
title: 'New Issue',
labels: 'iteration-1',
assignee_id: 1
}
})
Everything returns a promise, so use as you would for any other request.
FAQs
GitLab api node module that does not require server-side dependencies.
The npm package frontend-gitlab receives a total of 4 weekly downloads. As such, frontend-gitlab popularity was classified as not popular.
We found that frontend-gitlab demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.