
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
This SDK can be used to write Marjory application and use advanced feature of the Marjory platform.
You can add the SDK to your project using npm:
npm install marjory
Then you can import the SDK in your application:
import Marjory from "marjory";
The SDK will be automatically initialized with the default configuration when your application will run on Marjory platform.
Each application have a dedicated database. To manipulate it, you have access to several functions.
import Marjory from "marjory";
const myCollection = await Marjory.Db.collection("<collection_name>");
import Marjory from 'marjory';
const myCollection = await Marjory.Db.collection("<collection_name>");
const resultFind = await myCollection.find(...);
const resultFindOne = await myCollection.findOne(...);
const resultCount = await myCollection.countDocuments(...);
import Marjory from 'marjory';
const myCollection = await Marjory.Db.collection("<collection_name>");
const resultInsertOne = await myCollection.insertOne(...);
const resultInsertMany = await myCollection.insertMany(...);
If you want to insert multiple documents at the same time, you can use the bulkWrite function:
import Marjory from "marjory";
const myCollection = await Marjory.Db.collection("<collection_name>");
const resultBulkWrite = await myCollection.bulkWrite([
{ insertOne: { document: { a: 1 } } },
{ insertOne: { document: { a: 2 } } },
{ insertOne: { document: { a: 3 } } },
{ updateOne: { filter: { a: 2 }, update: { $set: { a: 5 } } } },
{ deleteOne: { filter: { c: 1 } } },
{ replaceOne: { filter: { c: 3 }, replacement: { c: 4 } } },
]);
import Marjory from 'marjory';
const myCollection = await Marjory.Db.collection("<collection_name>");
const resultUpdateOne = await myCollection.updateOne(...)
const resultUpdateMany = await myCollection.updateMany(...)
const resultFindOneAndUpdate = await myCollection.findOneAndUpdate(...)
const resultFindOneAndReplace = await myCollection.findOneAndReplace(...)
const resultReplaceOne = await myCollection.replaceOne(...)
import Marjory from 'marjory';
const myCollection = await Marjory.Db.collection("<collection_name>");
const resultDeletetOne = await myCollection.deleteOne(...);
const resultDeleteMany = await myCollection.deleteMany(...);
import Marjory from 'marjory';
const myCollection = await Marjory.Db.collection("<collection_name>");
const resultAggregate = await myCollection.aggregate(...);
You can retrieve variables declared inside your deployment.yml file and configured using marjory configure command.
import Marjory from "marjory";
const variableValue = Marjory.variables["<variable_name>"];
import Marjory from "marjory";
const detailsObject = {}; // For example stack trace object
await Marjory.Logger.trace("message", detailsObject); // equivalent to debug in javascript
await Marjory.Logger.info("message", detailsObject);
await Marjory.Logger.warn("message", detailsObject);
await Marjory.Logger.error("message", detailsObject);
In mostly cases during the webservice and scheduled functions, you will generate events. This method can throw event.
import Marjory from "marjory";
const eventPayload = {};
await Marjory.Events.send("<event_name>", eventPayload);
You can retrieve context information of the execution of you function.
import Marjory from "marjory";
const contextValue = Marjory.context["<context_property>"];
You can use the SDK to upload and download files.
import Marjory from "marjory";
const buffer = Buffer.from("<file_content>", "utf-8");
await Marjory.sdk.Files.upload("<file_name>", buffer);
import Marjory from "marjory";
const buffer = Buffer.from("<file_content>", "utf-8");
const myFile = await Marjory.sdk.Files.upload("<file_name>", buffer);
const myBuffer = await Marjory.sdk.Files.download(myFile);
If you have any issue, please contact us at support@marjory.io
FAQs
marjory sdk
The npm package marjory receives a total of 0 weekly downloads. As such, marjory popularity was classified as not popular.
We found that marjory 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.