Comparing version 2.0.0 to 2.0.1
10
index.js
@@ -25,5 +25,5 @@ 'use strict' | ||
function Instance(id, emitter, middlewares) { | ||
function Instance(id, emitter, middlewares, initState) { | ||
this.id = id | ||
this.actualState = this.model.states[INITIAL_STATE] | ||
this.actualState = initState | ||
this.middlewares = [] | ||
@@ -48,5 +48,5 @@ this.internalEmitter = emitter | ||
Flow.prototype.newInstance = function (id) { | ||
console.log('CREANDO NUEVA INSTANCIA') | ||
return new Promise((resolve, reject) => { | ||
var newInstance = new externals.Instance(id, this.internalEmitter, this.middlewares) | ||
var newInstance = new externals.Instance(id, this.internalEmitter, this.middlewares, this.model.states[INITIAL_STATE]) | ||
console.log('CREANDO NUEVA INSTANCIA ' + JSON.stringify(newInstance)) | ||
client.set(id, newInstance, this.model.ttl, (err) => { | ||
@@ -82,3 +82,3 @@ if (err) { | ||
} else { | ||
console.log('INSTANCIA ENCONTRADA') | ||
console.log('INSTANCIA ENCONTRADA ' + JSON.stringify(cached.item)) | ||
resolve(cached.item) | ||
@@ -85,0 +85,0 @@ } |
{ | ||
"name": "flowx", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
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
10570