Comparing version 3.0.6 to 4.0.0
21
index.js
@@ -7,3 +7,3 @@ 'use strict' | ||
const Catbox = require('catbox') | ||
const CatboxMemory = require('catbox-memory') | ||
const CatboxRethinkdb = require('catbox-rethinkdb') | ||
@@ -16,4 +16,11 @@ let externals = {} | ||
const client = new Catbox.Client(CatboxMemory) | ||
const catboxOptions = { | ||
host: process.env.RETHINKDB_HOST || 'rethinkdb', | ||
port: process.env.RETHINKDB_PORT || 28015, | ||
db: process.env.RETHINKDB_DB || 'flowx-db', | ||
table: process.env.RETHINKDB_FLOWXTABLE || 'flowx-table' | ||
} | ||
const client = new Catbox.Client(CatboxRethinkdb, catboxOptions) | ||
module.exports.new = () => { | ||
@@ -53,3 +60,3 @@ return new Promise((resolve, reject) => { | ||
const newInstance = new externals.Instance(id, this.internalEmitter, this.middlewares, newState) | ||
console.log('CREANDO NUEVA INSTANCIA ' + JSON.stringify(newInstance)) | ||
console.log('Creating new instance ' + JSON.stringify(newInstance)) | ||
client.set(id, newInstance, this.model.ttl, (err) => { | ||
@@ -85,3 +92,3 @@ if (err) { | ||
} else { | ||
console.log('INSTANCIA ENCONTRADA ' + JSON.stringify(cached.item)) | ||
console.log('Instance found ' + JSON.stringify(cached.item)) | ||
resolve(cached.item) | ||
@@ -113,6 +120,6 @@ } | ||
} | ||
console.log('No se pudo encontrar el estado en las transiciones') | ||
console.log('State not found') | ||
return resolve(transitionName) | ||
} else { | ||
console.log('No se pudo encontrar ninguna transición') | ||
console.log('Transition not found') | ||
return resolve(transitionName) | ||
@@ -147,3 +154,3 @@ } | ||
client.set(instance.id, instance, this.model.ttl, (err) => { | ||
console.log('EL NUEVO ESTADO ' + JSON.stringify(instance)) | ||
console.log('New state: ' + JSON.stringify(instance)) | ||
if (err) { | ||
@@ -150,0 +157,0 @@ reject(err) |
{ | ||
"name": "flowx", | ||
"version": "3.0.6", | ||
"version": "4.0.0", | ||
"description": "", | ||
@@ -23,4 +23,5 @@ "main": "index.js", | ||
"catbox-memory": "^2.0.4", | ||
"catbox-rethinkdb": "^1.2.0", | ||
"lodash": "^4.17.4" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12056
227
5
4
+ Addedcatbox-rethinkdb@^1.2.0
+ Addedcatbox-rethinkdb@1.2.0(transitive)
+ Addedhoek@2.16.3(transitive)
+ Addedrethinkdbdash@2.3.31(transitive)