Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

alice-runtime

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alice-runtime - npm Package Compare versions

Comparing version 0.1.19 to 0.2.0

lib/entity/api/command/create.js

11

index.js

@@ -6,2 +6,3 @@ const {

const utility = require("./lib/utility");
const entity = require("./lib/entity");

@@ -55,2 +56,3 @@ const {

queryDataIndex,
countDataIndex,
} = require("./lib/get-data-events");

@@ -143,2 +145,6 @@

const {
frontendApi,
} = require("./lib/frontend-api");
// ----------------------------------------------------------

@@ -190,2 +196,3 @@ // Module Export

queryDataIndex,
countDataIndex,

@@ -263,5 +270,9 @@ // create-data-trigger

// frontend API
frontendApi,
// rest
utility,
entity,
DataCluster,
};

12

lib/emit-command.js

@@ -186,2 +186,3 @@ // const ftDev = require("ftws-node-dev-tools");

paused = null,
backupCommand = null,
subscription = [],

@@ -253,2 +254,12 @@ callbackFrom = false,

// create command as handled + don't execute or re execute it (don't set handled if command already exists)
if (backupCommand) {
addInsertData.handled = true;
commandData.handled = true;
// todo -> create test
}
else {
addUpdateData.handled = false;
}
const filter = {

@@ -259,3 +270,2 @@ _id: commandId,

$set: {
handled: false,
payload,

@@ -262,0 +272,0 @@ ...addUpdateData,

@@ -5,2 +5,3 @@ const ftDev = require("ftws-node-dev-tools");

const R = require("ramda");
const dc = require("node-dev-console");
const utility = require("./utility");

@@ -184,2 +185,3 @@ const hasValue = R.complement(R.isNil);

* @param {number} limit
* @param {object|null} sort
* @return {Promise<[]|*>}

@@ -192,10 +194,15 @@ */

limit = 0,
sort = null,
} = {}) => {
// debug("queryDataIndex().findOne(%s)", jsonString(query));
if (R.isNil(sort)) {
sort = {
sequenceNumber: 1
};
}
let indexResult = getCollectionDataIndex().find(
query,
{
sort: {
sequenceNumber: 1
}
sort,
});

@@ -226,2 +233,12 @@ if (skip > 0) {

/**
*
* @param {Object} query
* @return {Promise<[]|*>}
*/
const countDataIndex = async (query) => {
// dc.j(query, "countDataIndex().query");
return await getCollectionDataIndex().countDocuments(query);
};
module.exports = {

@@ -236,4 +253,5 @@ getDataEventStream,

queryDataIndex,
countDataIndex,
// makeDataStreamId: makeStreamId,
// getLastDataEventSequenceNumber: getLastDataEvent
};

@@ -33,2 +33,7 @@ const R = require("ramda");

const isCallbackFromEmpty = command => R.isEmpty(getCallbackFrom(command));
const isMultiInvokeCommand = R.propEq("multiInvoke", true);
const aggregateExists = R.allPass([
R.complement(R.equals(false)),
R.complement(R.propEq("event", "Deleted"))
]);

@@ -149,2 +154,4 @@ /**

isCallbackFromEmpty,
isMultiInvokeCommand,
aggregateExists,
makeSubscriptionId,

@@ -151,0 +158,0 @@ parse,

5

package.json
{
"name": "alice-runtime",
"description": "The alice runtime is under heavy development. Expect many and uncommented breaking changes!",
"version": "0.1.19",
"version": "0.2.0",
"scripts": {

@@ -26,3 +26,4 @@ "test": "set DEV_CONSOLE_FORCE_OFF=1&& npx mocha --ui bdd ./test/**/*.test.js",

"supports-color": "^7.1.0",
"uuid": "^8.1.0"
"uuid": "^8.1.0",
"yup": "^0.29.1"
},

@@ -29,0 +30,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc