Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@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
.insert(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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.