Comparing version 1.2.4 to 1.2.5
@@ -140,2 +140,38 @@ 'use strict'; | ||
var res = pathToJson(dir, paths); | ||
var dottiesParts = []; | ||
res.forEach(function (r) { | ||
var parts = r.dottiedBase.split('.'); | ||
parts.forEach(function (p, i) { | ||
if (!dottiesParts[i]) { | ||
return dottiesParts[i] = { count: 1, name: p }; | ||
} | ||
if (dottiesParts[i].name !== p) { | ||
dottiesParts[i].count++; | ||
} | ||
}); | ||
}); | ||
var toRemove = ''; | ||
for (var pi = 0, plen = dottiesParts.length; pi < plen; pi++) { | ||
if (dottiesParts[pi].count === 1) { | ||
toRemove += dottiesParts[pi].name; | ||
} else { | ||
break; | ||
} | ||
} | ||
if (toRemove.length > 0) { | ||
res.forEach(function (r) { | ||
if (r.dottiedBase === toRemove) { | ||
r.dottiedBase = ''; | ||
} else { | ||
r.dottiedBase = r.dottiedBase.substring(toRemove.length + 1); | ||
} | ||
}); | ||
} | ||
callback(null, res); | ||
@@ -142,0 +178,0 @@ }); |
{ | ||
"author": "adrai", | ||
"name": "cqrs-saga", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"private": false, | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -0,1 +1,4 @@ | ||
## [v1.2.5](https://github.com/adrai/node-cqrs-saga/compare/v1.2.4...v1.2.5) | ||
- optimize structureParser | ||
## [v1.2.4](https://github.com/adrai/node-cqrs-saga/compare/v1.2.3...v1.2.4) | ||
@@ -2,0 +5,0 @@ - added convenience information on sagaModel (actionOnCommit) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
3983
256330