-
Notifications
You must be signed in to change notification settings - Fork 0
/
TransformOperationExecutor.js.map
1 lines (1 loc) · 28.4 KB
/
TransformOperationExecutor.js.map
1
{"version":3,"sources":["../../src/TransformOperationExecutor.ts"],"names":[],"mappings":";;AACA,qCAAiD;AAGjD,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,+EAAc,CAAA;IACd,+EAAc,CAAA;IACd,+EAAc,CAAA;AAClB,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B;AAED;IAQI,4EAA4E;IAC5E,cAAc;IACd,4EAA4E;IAE5E,oCAAoB,kBAAsC,EACtC,OAA8B;QAD9B,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,YAAO,GAAP,OAAO,CAAuB;QAXlD,4EAA4E;QAC5E,qBAAqB;QACrB,4EAA4E;QAEpE,wBAAmB,GAAG,IAAI,GAAG,EAA2C,CAAC;IAQjF,CAAC;IAED,4EAA4E;IAC5E,iBAAiB;IACjB,4EAA4E;IAE5E,8CAAS,GAAT,UAAU,MAA2B,EAC3B,KAA0B,EAC1B,UAAoB,EACpB,SAAmB,EACnB,KAAc,EACd,KAAiB;QAL3B,iBA+JC;QA1JS,sBAAA,EAAA,SAAiB;QAEvB,EAAE,CAAC,CAAC,KAAK,YAAY,KAAK,IAAI,KAAK,YAAY,GAAG,CAAC,CAAC,CAAC;YACjD,IAAM,UAAQ,GAAG,SAAS,IAAI,IAAI,CAAC,kBAAkB,KAAK,kBAAkB,CAAC,cAAc,CAAC,CAAC,CAAC,IAAK,SAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC3H,KAAe,CAAC,OAAO,CAAC,UAAC,QAAQ,EAAE,KAAK;gBACrC,IAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;gBACrD,EAAE,CAAC,CAAC,CAAC,KAAI,CAAC,OAAO,CAAC,mBAAmB,IA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,KAAa,EAAE,KAAa;QAC7C,IAAI,QAAQ,GAAG,IAAI,CAAC;QACpB,EAAE,CAAC,CAAC,QAAQ,IAAI,KAAK,CAAC;YAClB,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,KAAK,CAAC;QAC7C,EAAE,CAAC,CAAC,QAAQ,IAAI,KAAK,CAAC;YAClB,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC;QAE5C,MAAM,CAAC,QAAQ,CAAC;IACpB,CAAC;IAEO,gDAAW,GAAnB,UAAoB,MAAgB;QAChC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;YACR,MAAM,CAAC,IAAI,CAAC;QAEhB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,UAAA,WAAW,IAAI,OAAA,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAlC,CAAkC,CAAC,CAAC;IACvF,CAAC;IAEL,iCAAC;AAAD,CAxUA,AAwUC,IAAA;AAxUY,gEAA0B","file":"TransformOperationExecutor.js","sourcesContent":["import {ClassTransformOptions} from \"./ClassTransformOptions\";\r\nimport {defaultMetadataStorage} from \"./storage\";\r\nimport {TypeOptions} from \"./metadata/ExposeExcludeOptions\";\r\n\r\nexport enum TransformationType {\r\n PLAIN_TO_CLASS,\r\n CLASS_TO_PLAIN,\r\n CLASS_TO_CLASS\r\n}\r\n\r\nexport class TransformOperationExecutor {\r\n\r\n // -------------------------------------------------------------------------\r\n // Private Properties\r\n // -------------------------------------------------------------------------\r\n\r\n private transformedTypesMap = new Map<Object, {level: number, object: Object}>();\r\n\r\n // -------------------------------------------------------------------------\r\n // Constructor\r\n // -------------------------------------------------------------------------\r\n\r\n constructor(private transformationType: TransformationType,\r\n private options: ClassTransformOptions) {\r\n }\r\n\r\n // -------------------------------------------------------------------------\r\n // Public Methods\r\n // -------------------------------------------------------------------------\r\n\r\n transform(source: Object|Object[]|any,\r\n value: Object|Object[]|any,\r\n targetType: Function,\r\n arrayType: Function,\r\n isMap: boolean,\r\n level: number = 0) {\r\n\r\n if (value instanceof Array || value instanceof Set) {\r\n const newValue = arrayType && this.transformationType === TransformationType.PLAIN_TO_CLASS ? new (arrayType as any)() : [];\r\n (value as any[]).forEach((subValue, index) => {\r\n const subSource = source ? source[index] : undefined;\r\n if (!this.options.enableCircularCheck || !this.isCircular(subValue, level)) {\r\n const value = this.transform(subSource, subValue, targetType, undefined, subValue instanceof Map, level + 1);\r\n if (newValue instanceof Set) {\r\n newValue.add(value);\r\n } else {\r\n newValue.push(value);\r\n }\r\n } else if (this.transformationType === TransformationType.CLASS_TO_CLASS) {\r\n if (newValue instanceof Set) {\r\n newValue.add(subValue);\r\n } else {\r\n newValue.push(subValue);\r\n }\r\n }\r\n });\r\n return newValue;\r\n\r\n } else if (targetType === String && !isMap) {\r\n return String(value);\r\n\r\n } else if (targetType === Number && !isMap) {\r\n return Number(value);\r\n\r\n } else if (targetType === Boolean && !isMap) {\r\n return Boolean(value);\r\n\r\n } else if ((targetType === Date || value instanceof Date) && !isMap) {\r\n if (value instanceof Date) {\r\n return new Date(value.valueOf());\r\n }\r\n if (value === null || value === undefined)\r\n return value;\r\n\r\n return new Date(value);\r\n\r\n } else if (value instanceof Object) {\r\n\r\n // try to guess the type\r\n if (!targetType && value.constructor !== Object/* && TransformationType === TransformationType.CLASS_TO_PLAIN*/) targetType = value.constructor;\r\n if (!targetType && source) targetType = source.constructor;\r\n\r\n if (this.options.enableCircularCheck) {\r\n // add transformed type to prevent circular references\r\n this.transformedTypesMap.set(value, {level: level, object: value});\r\n }\r\n\r\n const keys = this.getKeys(targetType, value);\r\n let newValue: any = source ? source : {};\r\n if (!source && (this.transformationType === TransformationType.PLAIN_TO_CLASS || this.transformationType === TransformationType.CLASS_TO_CLASS)) {\r\n if (isMap) {\r\n newValue = new Map();\r\n } else if (targetType) {\r\n newValue = new (targetType as any)();\r\n } else {\r\n newValue = {};\r\n }\r\n }\r\n\r\n // traverse over keys\r\n for (let key of keys) {\r\n\r\n let valueKey = key, newValueKey = key, propertyName = key;\r\n if (!this.options.ignoreDecorators && targetType) {\r\n if (this.transformationType === TransformationType.PLAIN_TO_CLASS) {\r\n const exposeMetadata = defaultMetadataStorage.findExposeMetadataByCustomName(targetType, key);\r\n if (exposeMetadata) {\r\n propertyName = exposeMetadata.propertyName;\r\n newValueKey = exposeMetadata.propertyName;\r\n }\r\n\r\n } else if (this.transformationType === TransformationType.CLASS_TO_PLAIN || this.transformationType === TransformationType.CLASS_TO_CLASS) {\r\n const exposeMetadata = defaultMetadataStorage.findExposeMetadata(targetType, key);\r\n if (exposeMetadata && exposeMetadata.options && exposeMetadata.options.name)\r\n newValueKey = exposeMetadata.options.name;\r\n }\r\n }\r\n\r\n // get a subvalue\r\n let subValue: any = undefined;\r\n if (value instanceof Map) {\r\n subValue = value.get(valueKey);\r\n } else if (value[valueKey] instanceof Function) {\r\n subValue = value[valueKey]();\r\n } else {\r\n subValue = value[valueKey];\r\n }\r\n\r\n // determine a type\r\n let type: any = undefined, isSubValueMap = subValue instanceof Map;\r\n if (targetType && isMap) {\r\n type = targetType;\r\n\r\n } else if (targetType) {\r\n const metadata = defaultMetadataStorage.findTypeMetadata(targetType, propertyName);\r\n if (metadata) {\r\n const options: TypeOptions = {newObject: newValue, object: value, property: propertyName};\r\n type = metadata.typeFunction(options);\r\n isSubValueMap = isSubValueMap || metadata.reflectedType === Map;\r\n } else if (this.options.targetMaps) { // try to find a type in target maps\r\n this.options.targetMaps\r\n .filter(map => map.target === targetType && !!map.properties[propertyName])\r\n .forEach(map => type = map.properties[propertyName]);\r\n }\r\n }\r\n\r\n // if value is an array try to get its custom array type\r\n const arrayType = value[valueKey] instanceof Array ? this.getReflectedType(targetType, propertyName) : undefined;\r\n // const subValueKey = TransformationType === TransformationType.PLAIN_TO_CLASS && newKeyName ? newKeyName : key;\r\n const subSource = source ? source[valueKey] : undefined;\r\n\r\n // if its deserialization then type if required\r\n // if we uncomment this types like string[] will not work\r\n // if (this.transformationType === TransformationType.PLAIN_TO_CLASS && !type && subValue instanceof Object && !(subValue instanceof Date))\r\n // throw new Error(`Cannot determine type for ${(targetType as any).name }.${propertyName}, did you forget to specify a @Type?`);\r\n\r\n // if newValue is a source object that has method that match newKeyName then skip it\r\n if (newValue.constructor.prototype) {\r\n const descriptor = Object.getOwnPropertyDescriptor(newValue.constructor.prototype, newValueKey);\r\n if ((this.transformationType === TransformationType.PLAIN_TO_CLASS || this.transformationType === TransformationType.CLASS_TO_CLASS)\r\n && (newValue[newValueKey] instanceof Function || (descriptor && !descriptor.set))) // || TransformationType === TransformationType.CLASS_TO_CLASS\r\n continue;\r\n }\r\n\r\n if (!this.options.enableCircularCheck || !this.isCircular(subValue, level)) {\r\n let transformKey = this.transformationType === TransformationType.PLAIN_TO_CLASS ? newValueKey : key;\r\n let finalValue = this.transform(subSource, subValue, type, arrayType, isSubValueMap, level + 1);\r\n finalValue = this.applyCustomTransformations(finalValue, targetType, transformKey, value, this.transformationType);\r\n if (newValue instanceof Map) {\r\n newValue.set(newValueKey, finalValue);\r\n } else {\r\n newValue[newValueKey] = finalValue;\r\n }\r\n } else if (this.transformationType === TransformationType.CLASS_TO_CLASS) {\r\n let finalValue = subValue;\r\n finalValue = this.applyCustomTransformations(finalValue, targetType, key, value, this.transformationType);\r\n if (newValue instanceof Map) {\r\n newValue.set(newValueKey, finalValue);\r\n } else {\r\n newValue[newValueKey] = finalValue;\r\n }\r\n }\r\n\r\n }\r\n return newValue;\r\n\r\n } else {\r\n return value;\r\n }\r\n }\r\n\r\n private applyCustomTransformations(value: any, target: Function, key: string, obj: any, transformationType: TransformationType) {\r\n let metadatas = defaultMetadataStorage.findTransformMetadatas(target, key, this.transformationType);\r\n\r\n // apply versioning options\r\n if (this.options.version !== undefined) {\r\n metadatas = metadatas.filter(metadata => {\r\n if (!metadata.options)\r\n return true;\r\n\r\n return this.checkVersion(metadata.options.since, metadata.options.until);\r\n });\r\n }\r\n\r\n // apply grouping options\r\n if (this.options.groups && this.options.groups.length) {\r\n metadatas = metadatas.filter(metadata => {\r\n if (!metadata.options)\r\n return true;\r\n\r\n return this.checkGroups(metadata.options.groups);\r\n });\r\n } else {\r\n metadatas = metadatas.filter(metadata => {\r\n return !metadata.options || !metadata.options.groups || !metadata.options.groups.length;\r\n });\r\n }\r\n\r\n metadatas.forEach(metadata => {\r\n value = metadata.transformFn(value, obj, transformationType);\r\n });\r\n\r\n return value;\r\n }\r\n\r\n // preventing circular references\r\n private isCircular(object: Object, level: number) {\r\n const transformed = this.transformedTypesMap.get(object);\r\n return transformed !== undefined && transformed.level < level;\r\n }\r\n\r\n private getReflectedType(target: Function, propertyName: string) {\r\n if (!target) return undefined;\r\n const meta = defaultMetadataStorage.findTypeMetadata(target, propertyName);\r\n return meta ? meta.reflectedType : undefined;\r\n }\r\n\r\n private getKeys(target: Function, object: Object): string[] {\r\n\r\n // determine exclusion strategy\r\n let strategy = defaultMetadataStorage.getStrategy(target);\r\n if (strategy === \"none\")\r\n strategy = this.options.strategy || \"exposeAll\"; // exposeAll is default strategy\r\n\r\n // get all keys that need to expose\r\n let keys: any[] = [];\r\n if (strategy === \"exposeAll\") {\r\n if (object instanceof Map) {\r\n keys = Array.from(object.keys());\r\n } else {\r\n keys = Object.keys(object);\r\n }\r\n }\r\n\r\n if (!this.options.ignoreDecorators && target) {\r\n\r\n // add all exposed to list of keys\r\n let exposedProperties = defaultMetadataStorage.getExposedProperties(target, this.transformationType);\r\n if (this.transformationType === TransformationType.PLAIN_TO_CLASS) {\r\n exposedProperties = exposedProperties.map(key => {\r\n const exposeMetadata = defaultMetadataStorage.findExposeMetadata(target, key);\r\n if (exposeMetadata && exposeMetadata.options && exposeMetadata.options.name) {\r\n return exposeMetadata.options.name;\r\n }\r\n\r\n return key;\r\n });\r\n }\r\n keys = keys.concat(exposedProperties);\r\n\r\n // exclude excluded properties\r\n const excludedProperties = defaultMetadataStorage.getExcludedProperties(target, this.transformationType);\r\n if (excludedProperties.length > 0) {\r\n keys = keys.filter(key => {\r\n return excludedProperties.indexOf(key) === -1;\r\n });\r\n }\r\n\r\n // apply versioning options\r\n if (this.options.version !== undefined) {\r\n keys = keys.filter(key => {\r\n const exposeMetadata = defaultMetadataStorage.findExposeMetadata(target, key);\r\n if (!exposeMetadata || !exposeMetadata.options)\r\n return true;\r\n\r\n return this.checkVersion(exposeMetadata.options.since, exposeMetadata.options.until);\r\n });\r\n }\r\n\r\n // apply grouping options\r\n if (this.options.groups && this.options.groups.length) {\r\n keys = keys.filter(key => {\r\n const exposeMetadata = defaultMetadataStorage.findExposeMetadata(target, key);\r\n if (!exposeMetadata || !exposeMetadata.options)\r\n return true;\r\n\r\n return this.checkGroups(exposeMetadata.options.groups);\r\n });\r\n } else {\r\n keys = keys.filter(key => {\r\n const exposeMetadata = defaultMetadataStorage.findExposeMetadata(target, key);\r\n return !exposeMetadata || !exposeMetadata.options || !exposeMetadata.options.groups || !exposeMetadata.options.groups.length;\r\n });\r\n }\r\n }\r\n\r\n // exclude prefixed properties\r\n if (this.options.excludePrefixes && this.options.excludePrefixes.length) {\r\n keys = keys.filter(key => this.options.excludePrefixes.every(prefix => {\r\n return key.substr(0, prefix.length) !== prefix;\r\n }));\r\n }\r\n\r\n // make sure we have unique keys\r\n keys = keys.filter((key, index, self) => {\r\n return self.indexOf(key) === index;\r\n });\r\n\r\n return keys;\r\n }\r\n\r\n private checkVersion(since: number, until: number) {\r\n let decision = true;\r\n if (decision && since)\r\n decision = this.options.version >= since;\r\n if (decision && until)\r\n decision = this.options.version < until;\r\n\r\n return decision;\r\n }\r\n\r\n private checkGroups(groups: string[]) {\r\n if (!groups)\r\n return true;\r\n\r\n return this.options.groups.some(optionGroup => groups.indexOf(optionGroup) !== -1);\r\n }\r\n\r\n}\r\n"],"sourceRoot":"."}