
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
linshare-api-client
Advanced tools
JS library for Linshare APIs
NPM:
npm install linagora/linshare-api-client
Bower:
bower install linshare-api-client
const { Client } = require('linshare-api-client');
const client = new Client({
baseUrl: 'https://files.linshare.local/linshare/webservice/rest',
auth: {
type: 'basic',
username: '<username>',
password: '<password>'
// OR by JWT
// type: 'jwt',
// token: '<token>'
}
});
client.user.workgroup.list()
.then(data => console.log(data))
.catch(err => console.error(err));
On browser:
const Client = window.LinshareApiClient.Client;
...
Get authorized user
client.user.authentication.authorized().then(...)
Create document in a node of work group from URL
client.user.workgroup.createDocumentFromUrl('work-group-uuid', documentInfo, options)
.then(...)
documentInfo
: an object contains
options
(optional): { parent: 'parentNodeUuid', async: true/false, strict: true/false }
Delete a node in workgroup
client.user.workgroup.deleteNode('work-group-uuid', 'node-uuid')
.then(...)
List workgroups
client.user.workgroup.list().then(...)
List nodes in a workgroup
client.user.workgroup.listNodes(workgroupUuid, options).then(...)
options
(optional): { parent: 'parentNodeUuid', type: 'FOLDER | DOCUMENT' }
Update a node in workgroup
client.user.workgroup.updateNode('work-group-uuid', 'node-uuid', modified)
.then(...)
Get a document
client.user.documents.get('documentUuid').then(...)
List documents
client.user.documents.list().then(...)
Create a document
Upload a file to My space
var options = {
async: false,
onUploadProgress: function(progressEvent) {
var processedPercent = Math.round((progressEvent.loaded * 100) / progressEvent.total);
console.log('Uploading...', processedPercent);
}
};
var formData = new FormData();
formData.append('file', file);
formData.append('filesize', fileSize);
client.user.documents.create(formData, options).then(...)
Share documents
client.user.shares.shareDocuments({
documents: ['documentUuid1', 'documentUuid2'],
recipients: [{
mail: 'user1@domain.com'
}, {
mail: 'user2@domain.com'
}]
}).then(...)
Download document
Accept different response type with default value being blob
. You are advised to use different response types based on running environment:
blob
is for browserarrayBuffer
is for nodejs environmentclient.user.workgroup.downloadDocument('work-group-uuid', 'node-uuid', { responseType: 'blob' })
.then(function(blob) {
const file = new File([blob], 'documentname');
})
Get a node in workgroup
client.user.workgroup.getNode('work-group-uuid', 'node-uuid')
.then(...)
Get a member of a shared space node
client.user.sharedSpaceNodes.findMemberByAccountUuid('shared-space-node-uuid', 'member-uuid')
.then(...)
Get a shared space role by uuid
client.user.sharedSpaceRoles.findAllPermissions('shared-space-role-uuid')
.then(...)
Assume that you are in master
branch and you have write access to the origin
remote, type the following command to release a new version:
./scripts/release.sh x.y.z
In case your Git remote is NOT origin
:
./scripts/release.sh x.y.z my-remote
FAQs
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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.