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.
@antstanley/cosmos-helper
Advanced tools
Simple helper library for ComosDB
Methods
setConfig
.setConfig (config)
Sets client configuration data. Expected schema. Must be invoked before any other methods.
{
endpoint: "https://<CosmosDB-Account-Name>.documents.azure.com:443/,
primaryKey: "<key used to authenticate with CosmosDB>",
database: "<database name>",
collection: "<default collection name>"
}
insert
.insert(collection, payload, callback)
Insert single document into CosmosDB.
(err,result)
, successful insert will respond with (null,documentID)
insertBulk
.insertBulk(collection, payloadArray, callback)
Insert multiple documents into CosmosDB.
(err,result)
, successful insert will respond with (null,[array of documentID's])
update
.update(collection, payload, callback)
Update single document in CosmosDB.
payload.id
to identify the document to be updated.(err,result)
, successful insert will respond with (null,documentID)
updateBulk
.updateBulk(collection, payloadArray, callback)
Update single document in CosmosDB.
id
property to identify the document to be updated.(err,result)
, successful insert will respond with (null,[array of documentID's])
replace
.replace(collection, payload, callback)
Replace single document in CosmosDB.
payload.id
to identify the document to be replaced.(err,result)
, successful insert will respond with (null,documentID)
query
.query(collection, query, callback)
Query a collection within a CosmosDB database.
Sample schema
{
query: 'SELECT * FROM root WHERE id=@id',
parameters: [{name: '@id', value: '<query variable>'}]
}
(err,result)
, successful insert will respond with (null,[Array of results that match the query])
FAQs
Helper library for CosmosDB
The npm package @antstanley/cosmos-helper receives a total of 0 weekly downloads. As such, @antstanley/cosmos-helper popularity was classified as not popular.
We found that @antstanley/cosmos-helper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.