vue-server
Advanced tools
Comparing version 0.6.1 to 0.6.2
{ | ||
"name": "vue-server", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "Vue.js server side version", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,2 +13,3 @@ var utils = require('./../utils.js'); | ||
'Error executing expression: ' + value.toString() + ' [' + e.toString() + ']', | ||
common.getVmInitPath(vm), | ||
common.onLogMessage(vm) | ||
@@ -47,3 +48,7 @@ ); | ||
} catch (e) { | ||
vm.__states.$logger.warn('Error executing filter:', e.toString(), common.onLogMessage(vm)); | ||
vm.__states.$logger.warn( | ||
'Error executing filter:', e.toString(), | ||
common.getVmInitPath(vm), | ||
common.onLogMessage(vm) | ||
); | ||
} | ||
@@ -131,3 +136,7 @@ | ||
if (!filter) { | ||
vm.__states.$logger.warn('Unknown filter "' + meta.name + '"', common.onLogMessage(vm)); | ||
vm.__states.$logger.warn( | ||
'Unknown filter "' + meta.name + '"', | ||
common.getVmInitPath(vm), | ||
common.onLogMessage(vm) | ||
); | ||
filter = replacement; | ||
@@ -232,2 +241,15 @@ } | ||
return result; | ||
}, | ||
getVmInitPath: function (vm, path) { | ||
if (!path) { | ||
path = vm.__states.initName; | ||
} else { | ||
path = vm.__states.initName + '/' + path; | ||
} | ||
if (vm.__states.parent) { | ||
return this.getVmInitPath(vm.__states.parent, path); | ||
} else { | ||
return '[' + path + ']'; | ||
} | ||
} | ||
@@ -234,0 +256,0 @@ }; |
@@ -92,3 +92,3 @@ var utils = require('./../utils.js'); | ||
// That shoild be $root VM | ||
// That should be $root VM | ||
if (!vm.__states.parent) { | ||
@@ -101,2 +101,3 @@ if (!tpl) { | ||
vm.__states.mixin = globals.mixin; | ||
vm.__states.initName = '$root'; | ||
} | ||
@@ -191,2 +192,3 @@ | ||
'activateBe can\'t be fired on "v-for"-ed or "v-repeat"-ed instances', | ||
common.getVmInitPath(vm), | ||
common.onLogMessage(vm) | ||
@@ -252,2 +254,4 @@ ); | ||
newVm.__states.initName = options.componentName; | ||
// Needed for async component support | ||
@@ -542,3 +546,7 @@ // Async component is not created immediately | ||
} else { | ||
vm.__states.$logger.warn('The "data" option type is not valid', common.onLogMessage(vm)); | ||
vm.__states.$logger.warn( | ||
'The "data" option type is not valid', | ||
common.getVmInitPath(vm), | ||
common.onLogMessage(vm) | ||
); | ||
} | ||
@@ -675,3 +683,5 @@ } | ||
vm.__states.$logger.warn( | ||
'Missing required prop: ' + propName, common.onLogMessage(vm) | ||
'Missing required prop: ' + propName, | ||
common.getVmInitPath(vm), | ||
common.onLogMessage(vm) | ||
); | ||
@@ -689,2 +699,3 @@ return; | ||
descriptor.type.name + ', got ' + typeError.type, | ||
common.getVmInitPath(vm), | ||
common.onLogMessage(vm) | ||
@@ -698,4 +709,7 @@ ); | ||
if (rawValue && descriptor.validator && !descriptor.validator(value)) { | ||
vm.__states.$logger.warn('Invalid prop: custom validator check failed for "' + propName + | ||
'"', common.onLogMessage(vm)); | ||
vm.__states.$logger.warn( | ||
'Invalid prop: custom validator check failed for "' + propName + '"', | ||
common.getVmInitPath(vm), | ||
common.onLogMessage(vm) | ||
); | ||
return; | ||
@@ -853,3 +867,4 @@ } | ||
hasProps: false, | ||
hasWithData: false | ||
hasWithData: false, | ||
initName: '_vm' | ||
}, extra); | ||
@@ -856,0 +871,0 @@ }, |
317844
7824