Comparing version 0.1.24 to 0.1.25
@@ -9,5 +9,5 @@ import { Document } from "./Document"; | ||
toObject(doc: Document, handler?: any, f?: reob.TypeClass<any>, serializationPath?: reob.SerializationPath, request?: reob.Request): any; | ||
private toObjectRecursive<T>(doc, parent, f, handler, request); | ||
private toObjectRecursive<T>(doc, parent, parentPropertyName, f, handler, request); | ||
toDocument(object: Object, includeContext?: boolean, omitPropertiesPrivateToServer?: boolean): Document; | ||
private toDocumentRecursive(object, expectedClass?, includeContext?, omitPropertiesPrivateToServer?); | ||
} |
@@ -64,3 +64,3 @@ "use strict"; | ||
else | ||
o = this.toObjectRecursive(doc, undefined, f, handler, request); | ||
o = this.toObjectRecursive(doc, undefined, undefined, f, handler, request); | ||
if (handler && serializationPath) { | ||
@@ -72,3 +72,3 @@ reob.SerializationPath.setObjectContext(o, serializationPath, handler, request); | ||
}; | ||
Serializer.prototype.toObjectRecursive = function (doc, parent, f, handler, request) { | ||
Serializer.prototype.toObjectRecursive = function (doc, parent, parentPropertyName, f, handler, request) { | ||
var o; | ||
@@ -81,3 +81,3 @@ if (!doc) | ||
//console.log("using the custom toObject function of class "+omm.className(f)); | ||
o = f["toObject"](doc); | ||
o = f["toObject"](doc, this, parent, parentPropertyName); | ||
} | ||
@@ -120,3 +120,3 @@ else { | ||
var entry = value[i]; | ||
entry = this.toObjectRecursive(entry, o, propertyClass, handler, request); | ||
entry = this.toObjectRecursive(entry, o, propertyName, propertyClass, handler, request); | ||
result[i] = entry; | ||
@@ -128,3 +128,3 @@ } | ||
else { | ||
o[objectNameOfTheProperty] = this.toObjectRecursive(value, o, propertyClass, handler, request); | ||
o[objectNameOfTheProperty] = this.toObjectRecursive(value, o, propertyName, propertyClass, handler, request); | ||
} | ||
@@ -161,3 +161,3 @@ } | ||
if (objectClass && typeof objectClass.toDocument == "function") { | ||
result = objectClass.toDocument(object); | ||
result = objectClass.toDocument(object, this, includeContext, omitPropertiesPrivateToServer); | ||
} | ||
@@ -164,0 +164,0 @@ else if (!object || typeof object == "string" || typeof object == "number" || typeof object == "date" || typeof object == "boolean") { |
@@ -87,3 +87,2 @@ /** | ||
this.express.get('/*', function (req, res, next) { | ||
console.log("requested file", file); | ||
//This is the current file they have requested | ||
@@ -93,2 +92,4 @@ var file = req.params[0]; | ||
// file = indexFileName; | ||
if (reob.isVerbose()) | ||
console.log("Requested file", file); | ||
var fileName = path.resolve(_this.webRootPath, file); | ||
@@ -95,0 +96,0 @@ fs.exists(fileName, function (exists) { |
{ | ||
"name": "reob", | ||
"description": "Remote objects - Create backends for one page web apps with ease. Uses mongo and express.", | ||
"version": "0.1.24", | ||
"version": "0.1.25", | ||
"repository": "https://github.com/bvanheukelom/reob", | ||
@@ -34,3 +34,3 @@ "license": "MIT", | ||
"jsondiffpatch": "^0.1.43", | ||
"mongodb": "^2.1.18", | ||
"mongodb": "^2.2.26", | ||
"node-uuid": "^1.4.7", | ||
@@ -37,0 +37,0 @@ "web-methods": "*" |
Sorry, the diff of this file is not supported yet
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
533525
4
5009
Updatedmongodb@^2.2.26