|
|
@ -93,10 +93,10 @@ var getHbsFile, getFile, toRelativePath, cleanupAncestors,
|
|
|
|
layout = model.layout;
|
|
|
|
layout = model.layout;
|
|
|
|
mainUnit = model.name;
|
|
|
|
mainUnit = model.name;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
log.warn(
|
|
|
|
//log.warn(
|
|
|
|
'[' + requestId + '] multiple layouts ' + mainUnit + ':' +
|
|
|
|
// '[' + requestId + '] multiple layouts ' + mainUnit + ':' +
|
|
|
|
layout + ' vs ' + model.name + ':' + model.layout
|
|
|
|
// layout + ' vs ' + model.name + ':' + model.layout
|
|
|
|
);
|
|
|
|
//);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -152,8 +152,8 @@ var getHbsFile, getFile, toRelativePath, cleanupAncestors,
|
|
|
|
initLookUp(definitions);
|
|
|
|
initLookUp(definitions);
|
|
|
|
var model = definitions[lookUpTable[unit]];
|
|
|
|
var model = definitions[lookUpTable[unit]];
|
|
|
|
if (!model) {
|
|
|
|
if (!model) {
|
|
|
|
log.warn('[' + requestId + '] unit "' + unit + '" does not exits');
|
|
|
|
//log.warn('[' + requestId + '] unit "' + unit + '" does not exits');
|
|
|
|
throw '[' + requestId + '] unit "' + unit + '" does not exits';
|
|
|
|
//throw '[' + requestId + '] unit "' + unit + '" does not exits';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return model;
|
|
|
|
return model;
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -219,7 +219,7 @@ var getHbsFile, getFile, toRelativePath, cleanupAncestors,
|
|
|
|
|
|
|
|
|
|
|
|
var path = definitionFile.getPath();
|
|
|
|
var path = definitionFile.getPath();
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|
log.debug('[' + requestId + '] reading file "' + path + '"');
|
|
|
|
//log.debug('[' + requestId + '] reading file "' + path + '"');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
unitModel.definition = require(path);
|
|
|
|
unitModel.definition = require(path);
|
|
|
|
|
|
|
|
|
|
|
@ -351,10 +351,10 @@ var getHbsFile, getFile, toRelativePath, cleanupAncestors,
|
|
|
|
while (len--) {
|
|
|
|
while (len--) {
|
|
|
|
if (toDelete[units[len]]) {
|
|
|
|
if (toDelete[units[len]]) {
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|
log.debug(
|
|
|
|
//log.debug(
|
|
|
|
'[' + requestId + '] unit "' + units[len] +
|
|
|
|
// '[' + requestId + '] unit "' + units[len] +
|
|
|
|
'" is overridden by "' + toDelete[units[len]] + '"'
|
|
|
|
// '" is overridden by "' + toDelete[units[len]] + '"'
|
|
|
|
);
|
|
|
|
//);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
units.splice(len, 1);
|
|
|
|
units.splice(len, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -412,10 +412,10 @@ var getHbsFile, getFile, toRelativePath, cleanupAncestors,
|
|
|
|
var selfFile = new File(getUnitPath(unitName) + slashPath + selfFileName);
|
|
|
|
var selfFile = new File(getUnitPath(unitName) + slashPath + selfFileName);
|
|
|
|
if (selfFile.isExists()) {
|
|
|
|
if (selfFile.isExists()) {
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|
log.debug(
|
|
|
|
//log.debug(
|
|
|
|
'[' + requestId + '] for unit "' + unitName + '" file resolved : "'
|
|
|
|
// '[' + requestId + '] for unit "' + unitName + '" file resolved : "'
|
|
|
|
+ slashPath + selfFileName + '" -> "' + selfFile.getPath() + '"'
|
|
|
|
// + slashPath + selfFileName + '" -> "' + selfFile.getPath() + '"'
|
|
|
|
);
|
|
|
|
//);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return selfFile;
|
|
|
|
return selfFile;
|
|
|
@ -434,19 +434,19 @@ var getHbsFile, getFile, toRelativePath, cleanupAncestors,
|
|
|
|
var file = new File(getUnitPath(ancestorName) + slashPath + fileName);
|
|
|
|
var file = new File(getUnitPath(ancestorName) + slashPath + fileName);
|
|
|
|
if (file.isExists()) {
|
|
|
|
if (file.isExists()) {
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|
log.debug(
|
|
|
|
//log.debug(
|
|
|
|
'[' + requestId + '] for unit "' + unitName + '" file resolved : "'
|
|
|
|
// '[' + requestId + '] for unit "' + unitName + '" file resolved : "'
|
|
|
|
+ slashPath + selfFileName + '" -> "' + file.getPath() + '"'
|
|
|
|
// + slashPath + selfFileName + '" -> "' + file.getPath() + '"'
|
|
|
|
);
|
|
|
|
//);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return file;
|
|
|
|
return file;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|
log.debug(
|
|
|
|
//log.debug(
|
|
|
|
'[' + requestId + '] for unit "' + unitName + '" (non-excising) file resolved : "'
|
|
|
|
// '[' + requestId + '] for unit "' + unitName + '" (non-excising) file resolved : "'
|
|
|
|
+ slashPath + selfFileName + '" -> "' + selfFile.getPath() + '"'
|
|
|
|
// + slashPath + selfFileName + '" -> "' + selfFile.getPath() + '"'
|
|
|
|
);
|
|
|
|
//);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return selfFile;
|
|
|
|
return selfFile;
|
|
|
|
};
|
|
|
|
};
|
|
|
|