@fluid-experimental/property-properties 0.59.3003 → 0.59.4000-71128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -99,7 +99,7 @@ class PropertyTemplateWrapper {
99
99
  // This function could be moved somewhere else, an enum could be made if this information is widely needed.
100
100
  const isCreationType = (typeid) => {
101
101
  const creationTypes = ['ContainerProperty', 'NodeProperty', 'Enum', 'BinaryProperty', 'Binary', 'RepositoryReferenceProperty'];
102
- return creationTypes.indexOf(typeid) !== -1;
102
+ return creationTypes.includes(typeid);
103
103
  };
104
104
  if (isCreationType(in_typeid)) {
105
105
  const currentCreationType = this._objectCreationType;
@@ -1 +1 @@
1
- {"version":3,"file":"propertyTemplateWrapper.js","sourceRoot":"","sources":["../src/propertyTemplateWrapper.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;GAIG;AACH,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;AAExE,MAAM,6BAA6B,GAAG;IAClC,cAAc,EAAE,IAAI;IACpB,mBAAmB,EAAE,IAAI;IACzB,cAAc,EAAE,IAAI;IACpB,MAAM,EAAE,IAAI;CACf,CAAC;AACF;;;;GAIG;AACH,MAAM,qBAAqB,GAAG,CAAC,SAAS,EAAE,EAAE;IACxC,OAAO,CAAC,6BAA6B,CAAC,SAAS,CAAC,CAAC;AACrD,CAAC,CAAC;AAEF,MAAa,uBAAuB;IAChC;;;;;;;;;OASG;IACH,YAAY,iBAAiB,EAAE,QAAQ;QACnC,oDAAoD;QACpD,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAE3C;;WAEG;QACH,IAAI,CAAC,yBAAyB,GAAG,SAAS,CAAC;QAE3C,2D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C;iBAC5D;gBAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;oBACxC,MAAM,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;oBAC/B,MAAM,EAAE,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACvB,IAAI,oBAAoB,CAAC,EAAE,CAAC,EAAE;wBAC1B,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,oBAAoB,CAAC,EAAE,CAAC,CAAC,CAAC;wBACxD,OAAO,oBAAoB,CAAC,EAAE,CAAC,CAAC;qBACnC;iBACJ;gBAED,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;gBACvD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;oBAC1C,MAAM,cAAc,GAAG,oBAAoB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC7D,IAAI,cAAc,EAAE;wBAChB,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;qBACnC;iBACJ;aACJ;YAED,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;gBACvB,KAAK,CAAC,SAAS,CAAC,GAAG,UAAU,CAAC;aACjC;QACL,CAAC,CAAC;QAEF,kBAAkB,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,YAAY,CAAC,CAAC;QACtE,kBAAkB,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,WAAW,CAAC,CAAC;IACzE,CAAC;CACJ;AAzSD,0DAySC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Declaration of the PropertyTemplateWrapper module\n * PropertyTemplateWrapper is used to wrap a property template and perform internal optimizations\n */\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst _ = require('lodash');\nconst { ContainerProperty } = require('./properties/containerProperty');\n\nconst reservedTypesWithoutTemplates = {\n 'BaseProperty': true,\n 'ContainerProperty': true,\n 'NodeProperty': true,\n 'Enum': true,\n};\n/**\n * Utility function that validates if the typeid is a reserved type without a template.\n * @param {string} in_typeid The typeid to validate.\n * @return {boolean} True if the typeid is a reserved type without a template, false otherwise.\n */\nconst hasAssociatedTemplate = (in_typeid) => {\n return !reservedTypesWithoutTemplates[in_typeid];\n};\n\nexport class PropertyTemplateWrapper {\n /**\n * Constructor for creating a PropertyTemplateWrapper based on the given template.\n * @param {PropertyTemplate} in_remoteTemplate A property template\n * @param {string} in_scope The scope of the template\n *\n * @constructor\n * @package\n * @alias property-properties.PropertyTemplateWrapper\n * @category Properties\n */\n constructor(in_remoteTemplate, in_scope) {\n /** The property template this object is wrapping */\n this._propertyTemplate = in_remoteTemplate;\n\n /** A property template created from this.propertyTemplate with the addition of all information\n * from templates this template inherits from.\n */\n this._compiledPropertyTemplate = undefined;\n\n /* What type of base object is created for this template */\n this._objectCreationType = undefined;\n\n /* The scope of this template */\n this._scope = in_scope;\n }\n\n /**\n * To get the property template that this is wrapping.\n * @return {property-properties.PropertyTemplate} The template this wrapper contains\n * @package\n */\n getPropertyTemplate() {\n return this._propertyTemplate;\n }\n\n /**\n * Gets the compiled template or creates it then returns it.\n * @param {property-properties.PropertyFactory} in_propertyFactory The assosiated PropertyFactory.\n * @return {property-properties.PropertyTemplate} The compiled template\n * A compiled template is the template which is actually used for creating objects.\n * It has all information from parent Templates, and other changes.\n * @package\n */\n getCompiledTemplate(in_propertyFactory) {\n if (this._compiledPropertyTemplate === undefined) {\n this._compiledPropertyTemplate = this._contructCompiledTemplate(in_propertyFactory);\n }\n return this._compiledPropertyTemplate;\n }\n\n /**\n * Returns if the compiled template has been created.\n * @return {boolean} if the compiled template has been created\n * @package\n */\n hasCompiledTemplate() {\n return !!this._compiledPropertyTemplate;\n }\n\n /**\n * To get the creation type of the template this wraps.\n * @return {string} A typeid which represents the creation type of this template\n * @package\n */\n getCreationType() {\n return this._objectCreationType;\n }\n\n /**\n * If current creation type is undefined, sets it to in_typeid if in_typeid is a creation type.\n * If current creation type is defined, throws if in_typeid is a creation type.\n *\n * @param {string} in_typeid A typeid\n * @package\n */\n setCreationType(in_typeid) {\n // This function could be moved somewhere else, an enum could be made if this information is widely needed.\n const isCreationType = (typeid) => {\n const creationTypes =\n ['ContainerProperty', 'NodeProperty', 'Enum', 'BinaryProperty', 'Binary', 'RepositoryReferenceProperty'];\n return creationTypes.indexOf(typeid) !== -1;\n };\n\n if (isCreationType(in_typeid)) {\n const currentCreationType = this._objectCreationType;\n if (currentCreationType === undefined) {\n this._objectCreationType = in_typeid;\n } else if (currentCreationType !== in_typeid) {\n throw new Error(MSG.ONLY_ONE_CREATION_TYPE + currentCreationType + ', ' + in_typeid);\n }\n }\n }\n\n /**\n * Contructs the compiled template from the template this wraps\n * @param {property-properties.PropertyFactory} in_propertyFactory The associated PropertyFactory.\n * @return {property-properties.PropertyTemplate} The compiled template\n * A compiled template is the template which is actually used for creating objects.\n * It has all information from parent Templates, and other changes.\n * @package\n */\n _contructCompiledTemplate(in_propertyFactory) {\n const originalTemplate = this.getPropertyTemplate();\n\n this.setCreationType(originalTemplate.typeid);\n\n /* Because we treat templates and contructor functions for base types the same way :( */\n if (_.isFunction(originalTemplate)) {\n return originalTemplate;\n }\n\n let parentTemplateIds = originalTemplate.inherits;\n\n /* template.inherits can be a string, if so convert it to array of strings */\n if (typeof parentTemplateIds === 'string') {\n parentTemplateIds = [parentTemplateIds];\n }\n\n /* Cloning the original template to avoid modifying it */\n const template = originalTemplate.clone();\n\n /* Copy the proccesed list of parents to not modify the original */\n const typeInheritence = parentTemplateIds ? parentTemplateIds.slice() : [];\n\n /* Look ups to efficiently check what properties/constants parents have */\n const parentsPropertiesById = {};\n const parentsConstantsById = {};\n\n if (parentTemplateIds !== undefined) {\n for (let i = 0; i < parentTemplateIds.length; ++i) {\n const parentTemplateId = parentTemplateIds[i];\n this.setCreationType(parentTemplateId);\n\n if (hasAssociatedTemplate(parentTemplateId)) {\n const parentTemplateWrapper = in_propertyFactory._getWrapper(parentTemplateId, undefined, this._scope);\n if (parentTemplateWrapper) {\n const parentTemplate = parentTemplateWrapper.getCompiledTemplate(in_propertyFactory);\n const parentCreationType = parentTemplateWrapper.getCreationType();\n\n if (parentCreationType !== 'ContainerProperty') {\n this.setCreationType(parentCreationType);\n }\n\n if (parentTemplate.inherits) {\n typeInheritence.concat(parentTemplateId);\n }\n\n /* Fills parentsPropertiesById and makes sure there are no two properties or constants with the same id */\n if (parentTemplate.hasNestedProperties()) {\n const parentProperties = parentTemplate.properties;\n for (let j = 0; j < parentProperties.length; ++j) {\n const parentProperty = parentProperties[j];\n /* Two parents has child property with same id */\n if (parentsPropertiesById[parentProperty.id] || parentsConstantsById[parentProperty.id]) {\n throw new Error(MSG.OVERWRITING_ID + parentProperty.id);\n }\n parentsPropertiesById[parentProperty.id] = parentProperty;\n }\n }\n\n /* Fills parentsConsantsById and makes sure there are no two properties or constants with the same id */\n if (parentTemplate.hasNestedConstants()) {\n const parentConstants = parentTemplate.constants;\n for (let j = 0; j < parentConstants.length; ++j) {\n const parentConstant = parentConstants[j];\n /* Two parents has child property with same id */\n if (parentsConstantsById[parentConstant.id] || parentsPropertiesById[parentConstant.id]) {\n throw new Error(MSG.OVERWRITING_ID + parentConstant.id);\n }\n parentsConstantsById[parentConstant.id] = parentConstant;\n }\n }\n }\n }\n }\n }\n\n if (this._objectCreationType === undefined) {\n this.setCreationType('ContainerProperty');\n }\n\n /* Merges properties from parents into the properties of the child */\n const constructSubProperties = (in_template, in_parentsPropertiesById, fieldName) => {\n const propertyKeys = Object.keys(in_parentsPropertiesById);\n\n if (in_template[fieldName] === undefined && propertyKeys.length !== 0) {\n in_template[fieldName] = [];\n }\n\n const properties = in_template[fieldName] || [];\n\n for (let i = 0; i < properties.length; ++i) {\n const property = properties[i];\n const id = property.id;\n if (in_parentsPropertiesById[id]) {\n this._mergeProperty(property, in_parentsPropertiesById[id]);\n delete in_parentsPropertiesById[id];\n }\n }\n\n for (let i = 0; i < propertyKeys.length; ++i) {\n const insertProperty = in_parentsPropertiesById[propertyKeys[i]];\n if (insertProperty) {\n properties.push(insertProperty);\n }\n }\n\n if (properties.length > 0) {\n template[fieldName] = properties;\n }\n };\n\n constructSubProperties(template, parentsPropertiesById, 'properties');\n constructSubProperties(template, parentsConstantsById, 'constants');\n\n if (typeInheritence.length > 0) {\n template.inherits = typeInheritence;\n }\n\n return template;\n }\n\n /**\n * A helper function which merges a child and parent property.\n * The changes are applied directly to the in_childProperty.\n * @param {object} in_childProperty The child's property defition.\n * @param {object} in_parentProperty The parent's property defition.\n * @package\n */\n _mergeProperty(in_childProperty, in_parentProperty) {\n const mergeField = (child, parent, fieldName, defaultValue) => {\n if (child[fieldName] === undefined) {\n if (parent[fieldName] !== undefined) {\n child[fieldName] = parent[fieldName];\n }\n } else if (child[fieldName] !== parent[fieldName] &&\n (child[fieldName] !== defaultValue || parent[fieldName] !== undefined)) {\n throw new Error(MSG.OVERRIDEN_PROP_MUST_HAVE_SAME_FIELD_VALUES_AS_BASE_TYPE + fieldName +\n ' as the base type: ' + child.id + ': ' + child[fieldName] + ' != ' + parent[fieldName]);\n }\n };\n\n mergeField(in_childProperty, in_parentProperty, 'context', 'single');\n mergeField(in_childProperty, in_parentProperty, 'contextKeyType', 'string');\n mergeField(in_childProperty, in_parentProperty, 'length', 0);\n mergeField(in_childProperty, in_parentProperty, 'optional', false);\n mergeField(in_childProperty, in_parentProperty, 'typeid', undefined);\n\n if (in_parentProperty.typedValue !== undefined) {\n if (in_childProperty.typedValue === undefined) {\n in_childProperty.typedValue = in_parentProperty.typedValue;\n }\n }\n\n if (in_parentProperty.value !== undefined) {\n if (in_childProperty.value === undefined) {\n in_childProperty.value = in_parentProperty.value;\n }\n }\n\n const mergeSubProperties = (child, parent, fieldName) => {\n const parentPropertiesById = {};\n let parentProperties = parent[fieldName];\n let properties = child[fieldName] || [];\n if (parentProperties) {\n for (let j = 0; j < parentProperties.length; ++j) {\n const parentProperty = parentProperties[j];\n parentPropertiesById[parentProperty.id] = parentProperty;\n }\n\n for (let i = 0; i < properties.length; ++i) {\n const property = properties[i];\n const id = property.id;\n if (parentPropertiesById[id]) {\n this._mergeProperty(property, parentPropertiesById[id]);\n delete parentPropertiesById[id];\n }\n }\n\n const propertyKeys = Object.keys(parentPropertiesById);\n for (let i = 0; i < propertyKeys.length; ++i) {\n const insertProperty = parentPropertiesById[propertyKeys[i]];\n if (insertProperty) {\n properties.push(insertProperty);\n }\n }\n }\n\n if (properties.length > 0) {\n child[fieldName] = properties;\n }\n };\n\n mergeSubProperties(in_childProperty, in_parentProperty, 'properties');\n mergeSubProperties(in_childProperty, in_parentProperty, 'constants');\n }\n}\n"]}
1
+ {"version":3,"file":"propertyTemplateWrapper.js","sourceRoot":"","sources":["../src/propertyTemplateWrapper.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;GAIG;AACH,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;AAExE,MAAM,6BAA6B,GAAG;IAClC,cAAc,EAAE,IAAI;IACpB,mBAAmB,EAAE,IAAI;IACzB,cAAc,EAAE,IAAI;IACpB,MAAM,EAAE,IAAI;CACf,CAAC;AACF;;;;GAIG;AACH,MAAM,qBAAqB,GAAG,CAAC,SAAS,EAAE,EAAE;IACxC,OAAO,CAAC,6BAA6B,CAAC,SAAS,CAAC,CAAC;AACrD,CAAC,CAAC;AAEF,MAAa,uBAAuB;IAChC;;;;;;;;;OASG;IACH,YAAY,iBAAiB,EAAE,QAAQ;QACnC,oDAAoD;QACpD,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,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3C,oBAAoB,CAAC,cAAc,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC;iBAC5D;gBAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;oBACxC,MAAM,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;oBAC/B,MAAM,EAAE,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACvB,IAAI,oBAAoB,CAAC,EAAE,CAAC,EAAE;wBAC1B,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,oBAAoB,CAAC,EAAE,CAAC,CAAC,CAAC;wBACxD,OAAO,oBAAoB,CAAC,EAAE,CAAC,CAAC;qBACnC;iBACJ;gBAED,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;gBACvD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;oBAC1C,MAAM,cAAc,GAAG,oBAAoB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC7D,IAAI,cAAc,EAAE;wBAChB,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;qBACnC;iBACJ;aACJ;YAED,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;gBACvB,KAAK,CAAC,SAAS,CAAC,GAAG,UAAU,CAAC;aACjC;QACL,CAAC,CAAC;QAEF,kBAAkB,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,YAAY,CAAC,CAAC;QACtE,kBAAkB,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,WAAW,CAAC,CAAC;IACzE,CAAC;CACJ;AAzSD,0DAySC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Declaration of the PropertyTemplateWrapper module\n * PropertyTemplateWrapper is used to wrap a property template and perform internal optimizations\n */\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst _ = require('lodash');\nconst { ContainerProperty } = require('./properties/containerProperty');\n\nconst reservedTypesWithoutTemplates = {\n 'BaseProperty': true,\n 'ContainerProperty': true,\n 'NodeProperty': true,\n 'Enum': true,\n};\n/**\n * Utility function that validates if the typeid is a reserved type without a template.\n * @param {string} in_typeid The typeid to validate.\n * @return {boolean} True if the typeid is a reserved type without a template, false otherwise.\n */\nconst hasAssociatedTemplate = (in_typeid) => {\n return !reservedTypesWithoutTemplates[in_typeid];\n};\n\nexport class PropertyTemplateWrapper {\n /**\n * Constructor for creating a PropertyTemplateWrapper based on the given template.\n * @param {PropertyTemplate} in_remoteTemplate A property template\n * @param {string} in_scope The scope of the template\n *\n * @constructor\n * @package\n * @alias property-properties.PropertyTemplateWrapper\n * @category Properties\n */\n constructor(in_remoteTemplate, in_scope) {\n /** The property template this object is wrapping */\n this._propertyTemplate = in_remoteTemplate;\n\n /** A property template created from this.propertyTemplate with the addition of all information\n * from templates this template inherits from.\n */\n this._compiledPropertyTemplate = undefined;\n\n /* What type of base object is created for this template */\n this._objectCreationType = undefined;\n\n /* The scope of this template */\n this._scope = in_scope;\n }\n\n /**\n * To get the property template that this is wrapping.\n * @return {property-properties.PropertyTemplate} The template this wrapper contains\n * @package\n */\n getPropertyTemplate() {\n return this._propertyTemplate;\n }\n\n /**\n * Gets the compiled template or creates it then returns it.\n * @param {property-properties.PropertyFactory} in_propertyFactory The assosiated PropertyFactory.\n * @return {property-properties.PropertyTemplate} The compiled template\n * A compiled template is the template which is actually used for creating objects.\n * It has all information from parent Templates, and other changes.\n * @package\n */\n getCompiledTemplate(in_propertyFactory) {\n if (this._compiledPropertyTemplate === undefined) {\n this._compiledPropertyTemplate = this._contructCompiledTemplate(in_propertyFactory);\n }\n return this._compiledPropertyTemplate;\n }\n\n /**\n * Returns if the compiled template has been created.\n * @return {boolean} if the compiled template has been created\n * @package\n */\n hasCompiledTemplate() {\n return !!this._compiledPropertyTemplate;\n }\n\n /**\n * To get the creation type of the template this wraps.\n * @return {string} A typeid which represents the creation type of this template\n * @package\n */\n getCreationType() {\n return this._objectCreationType;\n }\n\n /**\n * If current creation type is undefined, sets it to in_typeid if in_typeid is a creation type.\n * If current creation type is defined, throws if in_typeid is a creation type.\n *\n * @param {string} in_typeid A typeid\n * @package\n */\n setCreationType(in_typeid) {\n // This function could be moved somewhere else, an enum could be made if this information is widely needed.\n const isCreationType = (typeid) => {\n const creationTypes =\n ['ContainerProperty', 'NodeProperty', 'Enum', 'BinaryProperty', 'Binary', 'RepositoryReferenceProperty'];\n return creationTypes.includes(typeid);\n };\n\n if (isCreationType(in_typeid)) {\n const currentCreationType = this._objectCreationType;\n if (currentCreationType === undefined) {\n this._objectCreationType = in_typeid;\n } else if (currentCreationType !== in_typeid) {\n throw new Error(MSG.ONLY_ONE_CREATION_TYPE + currentCreationType + ', ' + in_typeid);\n }\n }\n }\n\n /**\n * Contructs the compiled template from the template this wraps\n * @param {property-properties.PropertyFactory} in_propertyFactory The associated PropertyFactory.\n * @return {property-properties.PropertyTemplate} The compiled template\n * A compiled template is the template which is actually used for creating objects.\n * It has all information from parent Templates, and other changes.\n * @package\n */\n _contructCompiledTemplate(in_propertyFactory) {\n const originalTemplate = this.getPropertyTemplate();\n\n this.setCreationType(originalTemplate.typeid);\n\n /* Because we treat templates and contructor functions for base types the same way :( */\n if (_.isFunction(originalTemplate)) {\n return originalTemplate;\n }\n\n let parentTemplateIds = originalTemplate.inherits;\n\n /* template.inherits can be a string, if so convert it to array of strings */\n if (typeof parentTemplateIds === 'string') {\n parentTemplateIds = [parentTemplateIds];\n }\n\n /* Cloning the original template to avoid modifying it */\n const template = originalTemplate.clone();\n\n /* Copy the proccesed list of parents to not modify the original */\n const typeInheritence = parentTemplateIds ? parentTemplateIds.slice() : [];\n\n /* Look ups to efficiently check what properties/constants parents have */\n const parentsPropertiesById = {};\n const parentsConstantsById = {};\n\n if (parentTemplateIds !== undefined) {\n for (let i = 0; i < parentTemplateIds.length; ++i) {\n const parentTemplateId = parentTemplateIds[i];\n this.setCreationType(parentTemplateId);\n\n if (hasAssociatedTemplate(parentTemplateId)) {\n const parentTemplateWrapper = in_propertyFactory._getWrapper(parentTemplateId, undefined, this._scope);\n if (parentTemplateWrapper) {\n const parentTemplate = parentTemplateWrapper.getCompiledTemplate(in_propertyFactory);\n const parentCreationType = parentTemplateWrapper.getCreationType();\n\n if (parentCreationType !== 'ContainerProperty') {\n this.setCreationType(parentCreationType);\n }\n\n if (parentTemplate.inherits) {\n typeInheritence.concat(parentTemplateId);\n }\n\n /* Fills parentsPropertiesById and makes sure there are no two properties or constants with the same id */\n if (parentTemplate.hasNestedProperties()) {\n const parentProperties = parentTemplate.properties;\n for (let j = 0; j < parentProperties.length; ++j) {\n const parentProperty = parentProperties[j];\n /* Two parents has child property with same id */\n if (parentsPropertiesById[parentProperty.id] || parentsConstantsById[parentProperty.id]) {\n throw new Error(MSG.OVERWRITING_ID + parentProperty.id);\n }\n parentsPropertiesById[parentProperty.id] = parentProperty;\n }\n }\n\n /* Fills parentsConsantsById and makes sure there are no two properties or constants with the same id */\n if (parentTemplate.hasNestedConstants()) {\n const parentConstants = parentTemplate.constants;\n for (let j = 0; j < parentConstants.length; ++j) {\n const parentConstant = parentConstants[j];\n /* Two parents has child property with same id */\n if (parentsConstantsById[parentConstant.id] || parentsPropertiesById[parentConstant.id]) {\n throw new Error(MSG.OVERWRITING_ID + parentConstant.id);\n }\n parentsConstantsById[parentConstant.id] = parentConstant;\n }\n }\n }\n }\n }\n }\n\n if (this._objectCreationType === undefined) {\n this.setCreationType('ContainerProperty');\n }\n\n /* Merges properties from parents into the properties of the child */\n const constructSubProperties = (in_template, in_parentsPropertiesById, fieldName) => {\n const propertyKeys = Object.keys(in_parentsPropertiesById);\n\n if (in_template[fieldName] === undefined && propertyKeys.length !== 0) {\n in_template[fieldName] = [];\n }\n\n const properties = in_template[fieldName] || [];\n\n for (let i = 0; i < properties.length; ++i) {\n const property = properties[i];\n const id = property.id;\n if (in_parentsPropertiesById[id]) {\n this._mergeProperty(property, in_parentsPropertiesById[id]);\n delete in_parentsPropertiesById[id];\n }\n }\n\n for (let i = 0; i < propertyKeys.length; ++i) {\n const insertProperty = in_parentsPropertiesById[propertyKeys[i]];\n if (insertProperty) {\n properties.push(insertProperty);\n }\n }\n\n if (properties.length > 0) {\n template[fieldName] = properties;\n }\n };\n\n constructSubProperties(template, parentsPropertiesById, 'properties');\n constructSubProperties(template, parentsConstantsById, 'constants');\n\n if (typeInheritence.length > 0) {\n template.inherits = typeInheritence;\n }\n\n return template;\n }\n\n /**\n * A helper function which merges a child and parent property.\n * The changes are applied directly to the in_childProperty.\n * @param {object} in_childProperty The child's property defition.\n * @param {object} in_parentProperty The parent's property defition.\n * @package\n */\n _mergeProperty(in_childProperty, in_parentProperty) {\n const mergeField = (child, parent, fieldName, defaultValue) => {\n if (child[fieldName] === undefined) {\n if (parent[fieldName] !== undefined) {\n child[fieldName] = parent[fieldName];\n }\n } else if (child[fieldName] !== parent[fieldName] &&\n (child[fieldName] !== defaultValue || parent[fieldName] !== undefined)) {\n throw new Error(MSG.OVERRIDEN_PROP_MUST_HAVE_SAME_FIELD_VALUES_AS_BASE_TYPE + fieldName +\n ' as the base type: ' + child.id + ': ' + child[fieldName] + ' != ' + parent[fieldName]);\n }\n };\n\n mergeField(in_childProperty, in_parentProperty, 'context', 'single');\n mergeField(in_childProperty, in_parentProperty, 'contextKeyType', 'string');\n mergeField(in_childProperty, in_parentProperty, 'length', 0);\n mergeField(in_childProperty, in_parentProperty, 'optional', false);\n mergeField(in_childProperty, in_parentProperty, 'typeid', undefined);\n\n if (in_parentProperty.typedValue !== undefined) {\n if (in_childProperty.typedValue === undefined) {\n in_childProperty.typedValue = in_parentProperty.typedValue;\n }\n }\n\n if (in_parentProperty.value !== undefined) {\n if (in_childProperty.value === undefined) {\n in_childProperty.value = in_parentProperty.value;\n }\n }\n\n const mergeSubProperties = (child, parent, fieldName) => {\n const parentPropertiesById = {};\n let parentProperties = parent[fieldName];\n let properties = child[fieldName] || [];\n if (parentProperties) {\n for (let j = 0; j < parentProperties.length; ++j) {\n const parentProperty = parentProperties[j];\n parentPropertiesById[parentProperty.id] = parentProperty;\n }\n\n for (let i = 0; i < properties.length; ++i) {\n const property = properties[i];\n const id = property.id;\n if (parentPropertiesById[id]) {\n this._mergeProperty(property, parentPropertiesById[id]);\n delete parentPropertiesById[id];\n }\n }\n\n const propertyKeys = Object.keys(parentPropertiesById);\n for (let i = 0; i < propertyKeys.length; ++i) {\n const insertProperty = parentPropertiesById[propertyKeys[i]];\n if (insertProperty) {\n properties.push(insertProperty);\n }\n }\n }\n\n if (properties.length > 0) {\n child[fieldName] = properties;\n }\n };\n\n mergeSubProperties(in_childProperty, in_parentProperty, 'properties');\n mergeSubProperties(in_childProperty, in_parentProperty, 'constants');\n }\n}\n"]}
@@ -2,7 +2,6 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- /* globals targets */
6
5
  /* eslint-disable no-unused-expressions */
7
6
  /* eslint-disable consistent-return */
8
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"containerProperty.spec.js","sourceRoot":"","sources":["../../../src/test/properties/containerProperty.spec.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,qBAAqB;AACrB,0CAA0C;AAC1C,sCAAsC;AACtC;;;GAGG;AAEH,MAAM,GAAG,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC;AACzE,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC;AAEzD,QAAQ,CAAC,mBAAmB,EAAE;IAC1B,UAAU,CAAC,GAAG,EAAE;QACZ,eAAe,CAAC,MAAM,EAAE,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,WAAW,EAAE;QAClB,EAAE,CAAC,gEAAgE,E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G;gBACrB,MAAM,EAAE,oCAAoC;gBAC5C,UAAU,EAAE;oBACR,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;oBAC3C,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;oBAC3D,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE;iBACrE;aACJ,CAAC;YAEF,eAAe,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;YAE9C,MAAM,QAAQ,GAAG,eAAe,CAAC,MAAM,CAAC,oCAAoC,CAAC,CAAC;YAE9E,MAAM,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,gCAAgC,GAAG,KAAK,CAAC,CAAC;QACrG,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/* globals targets */\n/* eslint-disable no-unused-expressions */\n/* eslint-disable consistent-return */\n/**\n * @fileoverview In this file, we will test the functions related Container property object\n * this will also tests parts of Property Factory that creates Container property\n */\n\nconst MSG = require('@fluid-experimental/property-common').constants.MSG;\nconst PropertyFactory = require('../..').PropertyFactory;\n\ndescribe('ContainerProperty', function() {\n beforeEach(() => {\n PropertyFactory._clear();\n });\n\n describe('Changeset', function() {\n it('should not add created properties to the changeset on creation', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32' },\n { id: 'bool', typeid: 'Bool' },\n { id: 'string', typeid: 'String' },\n ],\n };\n\n const changeset = {\n Uint32: { num: 0 },\n Bool: { bool: false },\n String: { string: '' },\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n\n expect(instance._serialize(false, false)).to.deep.equal(changeset);\n expect(instance._serialize(true, false)).to.be.empty;\n });\n\n it('should add optional properties that have default values to the changeset on creation', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32', value: 111, optional: true },\n { id: 'bool', typeid: 'Bool', value: true, optional: true },\n { id: 'string', typeid: 'String', value: 'basic', optional: true },\n ],\n };\n\n const changeset = {\n insert: {\n Uint32: { num: 111 },\n Bool: { bool: true },\n String: { string: 'basic' },\n },\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n\n expect(instance._serialize(true, false)).to.deep.equal(changeset);\n });\n\n it('should not add optional properties that do not have default values to the changeset on creation', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32', optional: true },\n { id: 'bool', typeid: 'Bool', optional: true },\n { id: 'string', typeid: 'String', optional: true },\n ],\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n\n expect(instance._serialize(true, false)).to.be.empty;\n });\n });\n\n describe('Optional Properties', function() {\n it('should not exist on creation if no value is specified', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32', optional: true },\n { id: 'bool', typeid: 'Bool', optional: true },\n { id: 'string', typeid: 'String', optional: true },\n ],\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n expect(instance.get('num')).to.be.undefined;\n expect(instance.get('bool')).to.be.undefined;\n expect(instance.get('string')).to.be.undefined;\n });\n\n it('should exist on creation if value is specified', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32', value: 111, optional: true },\n { id: 'bool', typeid: 'Bool', value: true, optional: true },\n { id: 'string', typeid: 'String', value: 'basic', optional: true },\n ],\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n expect(instance.get('num').getValue()).to.equal(111);\n expect(instance.get('bool').getValue()).to.equal(true);\n expect(instance.get('string').getValue()).to.equal('basic');\n });\n\n it('can be inserted', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32', optional: true },\n { id: 'bool', typeid: 'Bool', optional: true },\n { id: 'string', typeid: 'String', optional: true },\n ],\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n\n const num = PropertyFactory.create('Uint32');\n num.setValue(111);\n\n const string = PropertyFactory.create('String');\n string.setValue('basic');\n\n const bool = PropertyFactory.create('Bool');\n bool.setValue(true);\n\n instance.insert('num', num);\n instance.insert('bool', bool);\n instance.insert('string', string);\n\n expect(instance.get('num').getValue()).to.equal(111);\n expect(instance.get('bool').getValue()).to.equal(true);\n expect(instance.get('string').getValue()).to.equal('basic');\n });\n\n it('can be removed', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32', value: 111, optional: true },\n { id: 'bool', typeid: 'Bool', value: true, optional: true },\n { id: 'string', typeid: 'String', value: 'basic', optional: true },\n ],\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n\n instance.remove('num');\n instance.remove('bool');\n instance.remove('string');\n\n expect(instance.get('num')).to.be.undefined;\n expect(instance.get('bool')).to.be.undefined;\n expect(instance.get('string')).to.be.undefined;\n });\n\n it('throws error if inserted property has unknown id', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32', value: 111, optional: true },\n { id: 'bool', typeid: 'Bool', value: true, optional: true },\n { id: 'string', typeid: 'String', value: 'basic', optional: true },\n ],\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n const prop = PropertyFactory.create('String');\n\n expect(() => { instance.insert('badId', prop); }).to.throw(MSG.CANNOT_INSERT_UNKNOWN_PROPERTY + 'badId');\n });\n\n it('throws error if inserted property typeid does not match corresponding typeid', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32', optional: true },\n { id: 'bool', typeid: 'Bool', optional: true },\n { id: 'string', typeid: 'String', optional: true },\n ],\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n const prop = PropertyFactory.create('String');\n\n expect(() => { instance.insert('num', prop); }).to.throw(MSG.MISMATCHING_PROPERTY_TYPEID);\n });\n\n it('throws error if attempting to remove a not optional property', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32', value: 111 },\n { id: 'bool', typeid: 'Bool', value: true, optional: true },\n { id: 'string', typeid: 'String', value: 'basic', optional: true },\n ],\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n\n expect(() => { instance.remove('num'); }).to.throw(MSG.CANNOT_REMOVE_NONE_OPTIONAL_PROP + 'num');\n });\n });\n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sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/* eslint-disable no-unused-expressions */\n/* eslint-disable consistent-return */\n/**\n * @fileoverview In this file, we will test the functions related Container property object\n * this will also tests parts of Property Factory that creates Container property\n */\n\nconst MSG = require('@fluid-experimental/property-common').constants.MSG;\nconst PropertyFactory = require('../..').PropertyFactory;\n\ndescribe('ContainerProperty', function() {\n beforeEach(() => {\n PropertyFactory._clear();\n });\n\n describe('Changeset', function() {\n it('should not add created properties to the changeset on creation', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32' },\n { id: 'bool', typeid: 'Bool' },\n { id: 'string', typeid: 'String' },\n ],\n };\n\n const changeset = {\n Uint32: { num: 0 },\n Bool: { bool: false },\n String: { string: '' },\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n\n expect(instance._serialize(false, false)).to.deep.equal(changeset);\n expect(instance._serialize(true, false)).to.be.empty;\n });\n\n it('should add optional properties that have default values to the changeset on creation', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32', value: 111, optional: true },\n { id: 'bool', typeid: 'Bool', value: true, optional: true },\n { id: 'string', typeid: 'String', value: 'basic', optional: true },\n ],\n };\n\n const changeset = {\n insert: {\n Uint32: { num: 111 },\n Bool: { bool: true },\n String: { string: 'basic' },\n },\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n\n expect(instance._serialize(true, false)).to.deep.equal(changeset);\n });\n\n it('should not add optional properties that do not have default values to the changeset on creation', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32', optional: true },\n { id: 'bool', typeid: 'Bool', optional: true },\n { id: 'string', typeid: 'String', optional: true },\n ],\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n\n expect(instance._serialize(true, false)).to.be.empty;\n });\n });\n\n describe('Optional Properties', function() {\n it('should not exist on creation if no value is specified', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32', optional: true },\n { id: 'bool', typeid: 'Bool', optional: true },\n { id: 'string', typeid: 'String', optional: true },\n ],\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n expect(instance.get('num')).to.be.undefined;\n expect(instance.get('bool')).to.be.undefined;\n expect(instance.get('string')).to.be.undefined;\n });\n\n it('should exist on creation if value is specified', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32', value: 111, optional: true },\n { id: 'bool', typeid: 'Bool', value: true, optional: true },\n { id: 'string', typeid: 'String', value: 'basic', optional: true },\n ],\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n expect(instance.get('num').getValue()).to.equal(111);\n expect(instance.get('bool').getValue()).to.equal(true);\n expect(instance.get('string').getValue()).to.equal('basic');\n });\n\n it('can be inserted', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32', optional: true },\n { id: 'bool', typeid: 'Bool', optional: true },\n { id: 'string', typeid: 'String', optional: true },\n ],\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n\n const num = PropertyFactory.create('Uint32');\n num.setValue(111);\n\n const string = PropertyFactory.create('String');\n string.setValue('basic');\n\n const bool = PropertyFactory.create('Bool');\n bool.setValue(true);\n\n instance.insert('num', num);\n instance.insert('bool', bool);\n instance.insert('string', string);\n\n expect(instance.get('num').getValue()).to.equal(111);\n expect(instance.get('bool').getValue()).to.equal(true);\n expect(instance.get('string').getValue()).to.equal('basic');\n });\n\n it('can be removed', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32', value: 111, optional: true },\n { id: 'bool', typeid: 'Bool', value: true, optional: true },\n { id: 'string', typeid: 'String', value: 'basic', optional: true },\n ],\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n\n instance.remove('num');\n instance.remove('bool');\n instance.remove('string');\n\n expect(instance.get('num')).to.be.undefined;\n expect(instance.get('bool')).to.be.undefined;\n expect(instance.get('string')).to.be.undefined;\n });\n\n it('throws error if inserted property has unknown id', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32', value: 111, optional: true },\n { id: 'bool', typeid: 'Bool', value: true, optional: true },\n { id: 'string', typeid: 'String', value: 'basic', optional: true },\n ],\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n const prop = PropertyFactory.create('String');\n\n expect(() => { instance.insert('badId', prop); }).to.throw(MSG.CANNOT_INSERT_UNKNOWN_PROPERTY + 'badId');\n });\n\n it('throws error if inserted property typeid does not match corresponding typeid', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32', optional: true },\n { id: 'bool', typeid: 'Bool', optional: true },\n { id: 'string', typeid: 'String', optional: true },\n ],\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n const prop = PropertyFactory.create('String');\n\n expect(() => { instance.insert('num', prop); }).to.throw(MSG.MISMATCHING_PROPERTY_TYPEID);\n });\n\n it('throws error if attempting to remove a not optional property', function() {\n const DefaultPrimitive = {\n typeid: 'SimpleTest:OptionalPrimitive-1.0.0',\n properties: [\n { id: 'num', typeid: 'Uint32', value: 111 },\n { id: 'bool', typeid: 'Bool', value: true, optional: true },\n { id: 'string', typeid: 'String', value: 'basic', optional: true },\n ],\n };\n\n PropertyFactory._reregister(DefaultPrimitive);\n\n const instance = PropertyFactory.create('SimpleTest:OptionalPrimitive-1.0.0');\n\n expect(() => { instance.remove('num'); }).to.throw(MSG.CANNOT_REMOVE_NONE_OPTIONAL_PROP + 'num');\n });\n });\n});\n"]}
@@ -2,7 +2,6 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- /* globals assert */
6
5
  /* eslint-disable no-unused-expressions */
7
6
  /* eslint-disable max-nested-callbacks */
8
7
  /* eslint-disable max-len */
@@ -1 +1 @@
1
- {"version":3,"file":"propertyUtils.spec.js","sourceRoot":"","sources":["../../src/test/propertyUtils.spec.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAoB;AACpB,0CAA0C;AAC1C,yCAAyC;AACzC,4BAA4B;AAE5B;;;GAGG;AAEH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAC1C,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAExC,QAAQ,CAAC,eAAe,EAAE;IACtB,QAAQ,CAAC,gCAAgC,EAAE;QACvC,EAAE,CAAC,6DAA6D,EAAE;YAC9D,IAAI,YAAY,GAAG;gBACf,MAAM,EAAE,8BAA8B;gBACtC,UAAU,EAAE;oBACR,EAAE,EAAE,EAA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C,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC;QAC5C,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/* globals assert */\n/* eslint-disable no-unused-expressions */\n/* eslint-disable max-nested-callbacks */\n/* eslint-disable max-len */\n\n/**\n * @fileoverview In this file, we will test the utils\n * described in /src/utils.js\n */\n\nconst _ = require('lodash');\nconst { PropertyFactory } = require('..');\nconst { PropertyUtils } = require('..');\n\ndescribe('PropertyUtils', function() {\n describe('PropertyUtils.gatherProperties', function() {\n it('should return a list of properties that match the predicate', function() {\n var testTemplate = {\n typeid: 'autodesk.test:testProp-1.0.0',\n properties: [\n { id: 'a', typeid: 'Float64' },\n { id: 'b', typeid: 'String' },\n {\n id: 'nested', properties: [\n { id: 'c', typeid: 'Float64' },\n { id: 'd', typeid: 'String' },\n ],\n },\n ],\n };\n PropertyFactory.register(testTemplate);\n var myProperty = PropertyFactory.create('autodesk.test:testProp-1.0.0');\n myProperty.get('a').setValue(3);\n myProperty.get('b').setValue('Hello');\n myProperty.get('nested').get('c').setValue(42);\n myProperty.get('nested').get('d').setValue('Hello again!');\n\n var result = PropertyUtils.gatherProperties(myProperty, function(property) {\n return _.isNumber(property.value);\n });\n expect(result['a']).to.exist;\n expect(result['b']).to.not.exist;\n expect(result['nested.c']).to.exist;\n expect(result['nested.d']).to.not.exist;\n });\n });\n});\n"]}
1
+ {"version":3,"file":"propertyUtils.spec.js","sourceRoot":"","sources":["../../src/test/propertyUtils.spec.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,0CAA0C;AAC1C,yCAAyC;AACzC,4BAA4B;AAE5B;;;GAGG;AAEH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,eAAe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,CAAC,KAAK,CAAC,CAAC;YACtC,CAAC,CAAC,CAAC;YACH,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;YAC7B,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC;YACjC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;YACpC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC;QAC5C,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/* eslint-disable no-unused-expressions */\n/* eslint-disable max-nested-callbacks */\n/* eslint-disable max-len */\n\n/**\n * @fileoverview In this file, we will test the utils\n * described in /src/utils.js\n */\n\nconst _ = require('lodash');\nconst { PropertyFactory } = require('..');\nconst { PropertyUtils } = require('..');\n\ndescribe('PropertyUtils', function() {\n describe('PropertyUtils.gatherProperties', function() {\n it('should return a list of properties that match the predicate', function() {\n var testTemplate = {\n typeid: 'autodesk.test:testProp-1.0.0',\n properties: [\n { id: 'a', typeid: 'Float64' },\n { id: 'b', typeid: 'String' },\n {\n id: 'nested', properties: [\n { id: 'c', typeid: 'Float64' },\n { id: 'd', typeid: 'String' },\n ],\n },\n ],\n };\n PropertyFactory.register(testTemplate);\n var myProperty = PropertyFactory.create('autodesk.test:testProp-1.0.0');\n myProperty.get('a').setValue(3);\n myProperty.get('b').setValue('Hello');\n myProperty.get('nested').get('c').setValue(42);\n myProperty.get('nested').get('d').setValue('Hello again!');\n\n var result = PropertyUtils.gatherProperties(myProperty, function(property) {\n return _.isNumber(property.value);\n });\n expect(result['a']).to.exist;\n expect(result['b']).to.not.exist;\n expect(result['nested.c']).to.exist;\n expect(result['nested.d']).to.not.exist;\n });\n });\n});\n"]}
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../src/test/global.d.ts","../../../property-common/dist/constants.d.ts","../../../property-common/dist/consoleUtils.d.ts","../../../property-common/dist/chronometer.d.ts","../../../property-common/dist/joinPaths.d.ts","../../../property-common/dist/guidUtils.d.ts","../../../property-common/dist/error_objects/flaggedError.d.ts","../../../property-common/dist/error_objects/operationError.d.ts","../../../property-common/dist/error_objects/httpError.d.ts","../../../property-common/dist/error_objects/httpErrorNoStack.d.ts","../../../property-common/dist/error_objects/index.d.ts","../../../property-common/dist/deferredPromise.d.ts","../../../property-common/dist/deterministicRandomGenerator.d.ts","../../../property-common/dist/hashCalculator.d.ts","../../../property-common/dist/datastructures/collection.d.ts","../../../property-common/dist/datastructures/sortedCollection.d.ts","../../../property-common/dist/datastructures/integer64.d.ts","../../../property-common/dist/datastructures/dataArray.d.ts","../../../property-common/dist/datastructures/index.d.ts","../../../../../../node_modules/@types/events/index.d.ts","../../../property-common/dist/index.d.ts","../propertyFactory.d.ts","../propertyUtils.d.ts","../../../property-changeset/dist/changeset_operations/operationTypes.d.ts","../../../property-changeset/dist/changeset_operations/arrayChangesetIterator.d.ts","../../../property-changeset/dist/changeset_operations/array.d.ts","../../../property-changeset/dist/changeset_operations/changesetConflictTypes.d.ts","../../../property-changeset/dist/changeset_operations/indexedCollection.d.ts","../../../property-changeset/dist/changeset.d.ts","../../../property-changeset/dist/helpers/typeidHelper.d.ts","../../../property-changeset/dist/pathHelper.d.ts","../../../property-changeset/dist/rebase.d.ts","../../../property-changeset/dist/templateSchema.d.ts","../../../property-changeset/dist/validationResultBuilder.d.ts","../../../property-changeset/dist/templateValidator.d.ts","../../../property-changeset/dist/utils.d.ts","../../../property-changeset/dist/index.d.ts","../properties/baseProperty.d.ts","../properties/abstractStaticCollectionProperty.d.ts","../properties/indexedCollectionBaseProperty.d.ts","../properties/containerProperty.d.ts","../properties/mapProperty.d.ts","../properties/nodeProperty.d.ts","../properties/arrayProperty.d.ts","../properties/setProperty.d.ts","../properties/valueArrayProperty.d.ts","../properties/stringProperty.d.ts","../properties/valueProperty.d.ts","../properties/referenceProperty.d.ts","../properties/referenceArrayProperty.d.ts","../properties/valueMapProperty.d.ts","../properties/referenceMapProperty.d.ts","../properties/enumArrayProperty.d.ts","../properties/intProperties.d.ts","../properties/enumProperty.d.ts","../enableValidations.d.ts","../index.d.ts","../../src/test/validation/goodPointId.js","../../src/test/validation/badPrimitiveTypeid.js","../../src/test/validation/goodColorId.js","../../src/test/validation/badMissingSemverInTypeid.js","../../src/test/validation/goodColorPalette.js","../../src/test/propertyFactory.spec.js","../../src/test/propertyTemplateWrapper.spec.js","../../../../../../node_modules/@types/lodash/common/common.d.ts","../../../../../../node_modules/@types/lodash/common/array.d.ts","../../../../../../node_modules/@types/lodash/common/collection.d.ts","../../../../../../node_modules/@types/lodash/common/date.d.ts","../../../../../../node_modules/@types/lodash/common/function.d.ts","../../../../../../node_modules/@types/lodash/common/lang.d.ts","../../../../../../node_modules/@types/lodash/common/math.d.ts","../../../../../../node_modules/@types/lodash/common/number.d.ts","../../../../../../node_modules/@types/lodash/common/object.d.ts","../../../../../../node_modules/@types/lodash/common/seq.d.ts","../../../../../../node_modules/@types/lodash/common/string.d.ts","../../../../../../node_modules/@types/lodash/common/util.d.ts","../../../../../../node_modules/@types/lodash/index.d.ts","../../src/test/propertyUtils.spec.js","../../src/test/validation/reversibleChangeSetTestData.js","../../src/test/reversibleChangeset.spec.js","../../../../../../node_modules/@types/node/assert.d.ts","../../../../../../node_modules/@types/node/globals.d.ts","../../../../../../node_modules/@types/node/async_hooks.d.ts","../../../../../../node_modules/@types/node/buffer.d.ts","../../../../../../node_modules/@types/node/child_process.d.ts","../../../../../../node_modules/@types/node/cluster.d.ts","../../../../../../node_modules/@types/node/console.d.ts","../../../../../../node_modules/@types/node/constants.d.ts","../../../../../../node_modules/@types/node/crypto.d.ts","../../../../../../node_modules/@types/node/dgram.d.ts","../../../../../../node_modules/@types/node/dns.d.ts","../../../../../../node_modules/@types/node/domain.d.ts","../../../../../../node_modules/@types/node/events.d.ts","../../../../../../node_modules/@types/node/fs.d.ts","../../../../../../node_modules/@types/node/fs/promises.d.ts","../../../../../../node_modules/@types/node/http.d.ts","../../../../../../node_modules/@types/node/http2.d.ts","../../../../../../node_modules/@types/node/https.d.ts","../../../../../../node_modules/@types/node/inspector.d.ts","../../../../../../node_modules/@types/node/module.d.ts","../../../../../../node_modules/@types/node/net.d.ts","../../../../../../node_modules/@types/node/os.d.ts","../../../../../../node_modules/@types/node/path.d.ts","../../../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../../../node_modules/@types/node/process.d.ts","../../../../../../node_modules/@types/node/punycode.d.ts","../../../../../../node_modules/@types/node/querystring.d.ts","../../../../../../node_modules/@types/node/readline.d.ts","../../../../../../node_modules/@types/node/repl.d.ts","../../../../../../node_modules/@types/node/stream.d.ts","../../../../../../node_modules/@types/node/string_decoder.d.ts","../../../../../../node_modules/@types/node/timers.d.ts","../../../../../../node_modules/@types/node/tls.d.ts","../../../../../../node_modules/@types/node/trace_events.d.ts","../../../../../../node_modules/@types/node/tty.d.ts","../../../../../../node_modules/@types/node/url.d.ts","../../../../../../node_modules/@types/node/util.d.ts","../../../../../../node_modules/@types/node/v8.d.ts","../../../../../../node_modules/@types/node/vm.d.ts","../../../../../../node_modules/@types/node/wasi.d.ts","../../../../../../node_modules/@types/node/worker_threads.d.ts","../../../../../../node_modules/@types/node/zlib.d.ts","../../../../../../node_modules/@types/node/globals.global.d.ts","../../../../../../node_modules/@types/node/index.d.ts","../../../../../../node_modules/@types/nock/index.d.ts","../../../../../../node_modules/@types/sinon/ts3.1/index.d.ts","../../src/test/setup.js","../../src/test/utils.spec.js","../../src/test/properties/arrayProperty.spec.js","../../src/test/properties/baseProperty.spec.js","../../src/test/properties/containerProperty.spec.js","../../src/test/properties/customArrayProperty.spec.js","../../src/test/properties/enumArrayProperty.spec.js","../../src/test/properties/enumProperty.spec.js","../properties/floatProperties.d.ts","../../src/test/properties/float32.spec.js","../../src/test/properties/int64ArrayProperty.spec.js","../../src/test/properties/int64MapProperty.spec.js","../../src/test/properties/int64Property.spec.js","../../src/test/properties/isLeafNode.spec.js","../../src/test/properties/mapProperty.spec.js","../properties/namedNodeProperty.d.ts","../../src/test/properties/namedNodeProperty.spec.js","../../src/test/properties/nodeProperty.spec.js","../../src/test/properties/referenceProperty.spec.js","../../src/test/properties/relationshipProperty.spec.js","../../src/test/properties/setProperty.spec.js","../../src/test/properties/stringProperty.spec.js","../../src/test/properties/uint64Property.spec.js","../../src/test/properties/valueMapProperty.spec.js","../../src/test/properties/valueProperty.spec.js","../../../../../../node_modules/@types/mocha/index.d.ts"],"fileInfos":[{"version":"89f78430e422a0f06d13019d60d5a45b37ec2d28e67eb647f73b1b0d19a46b72","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"abba1071bfd89e55e88a054b0c851ea3e8a494c340d0f3fab19eb18f6afb0c9e","affectsGlobalScope":true},{"version":"927cb2b60048e1395b183bf74b2b80a75bdb1dbe384e1d9fac654313ea2fb136","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"4378fc8122ec9d1a685b01eb66c46f62aba6b239ca7228bb6483bcf8259ee493","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},{"version":"88aaf14515ff5bd8228528dce7ff080db4cceef68ee69d49c29bd273e00e4ede","affectsGlobalScope":true},"361fba27bac29f3eba1b8b3b472f08a83c7cdc3692869012775d1adfb3884de8","9f5c1dcc9b637bd7f937572897913c03cfcd0021bb78a8405fee100d30c2e3fb","7711200210618bc724e56d56025d4c69f5bc98d3b393ad22f7379d0f61617281","99f44cf20700ade12dbb65ca287c0d96ec1269d9d41916a02dbf1767f73f5f6f","423e72d2635e810ea54946e4a8588f64bf320e98e3937b8c4bde53752abd31cb","24412421e05e07d5fe02c41c17487dbe66641b8db7f0f01caee191f622ccdd54","6df2518e7eefc7ae6feba7962122fcb048b2d41cbb729fba9c0969c92e810475","82f986b48fe26ccf5fb9aa1140680d571d5d6bf73e1eb3d62822cf39eaafa435","3e48960bbe9a0ea0cea1fe9676525f9467e669d11f49491fa654061917e6c90b","0995bd5ad1a2152508876ee7a6f9b29dfddc4cf6172cb452470e346925c27f89","edc83dec2d53eb070c5dc86f0b41a2bbd2e75d529097e1be86fa8e1cf1fbad1f","fc734d62257760825514155d4d6d2e341983ffedca33f10d587337638e804669","6729a25a1febcd4621ade6bd8988d4c5e05befc27747d237b390099525100d14","b34cacdcbc4ebdcb9e6e9ddb4e130fff7859d76b022bab2c096024c06a0b4c96","b6d168c6be5ca0c1d074af6d52b6927096ae5170f24d16c384b973346fde7c5b","02e5ba55c358984378b56e924cde6f23847bfa6685373d6c680c15aa3caeac0c","2828c8c2e41695b3125e42a9635ee6374ec5978365b3e61db527a29c043941c2","f46e3d81a2823884724a5a87675830a32902706a990cb4065c39ae3061b32bed","400db42c3a46984118bff14260d60cec580057dc1ab4c2d7310beb643e4f5935","5402fb57754f557a3f2891886b127b1ab6388509153fe15472d5fe18ad7df3e9","f7d1f482f508048543289ccd70e3c9415ede4c472a31293d53de935c659c7e0e","6a5140a9d4eb36cee7a51ffe629701f8e8bbd9cfd9ad2f20c87592019f9fdcfc","eae9ad23597af5ac54f91efac6486eacf994957236dcbf230ac67dab40023e5b","521e70241ef4038881395d05db810a4f0dd00b2071cb1955a0e7b284616170c6","27d1fd06fe7757c14d217eada132f52a56f75fb8e76f8e1772db909163ee6084","adfadc223af3b2425a1575f2196499bd2dd9375bb517f90bbc7b3a960c8905a2","305cf1f99469de544795593197fdfca38d734e4b4d2564ffe920b4f03305557e","177211fa955b396f2a477b9b3d067ccc8583de49d7dec5aae63d28bdbddb16e2","b08594f0655ff58c74cee26a7ca80e0cc640dc567c190f51a2cdda3db04b89fb","e767784c9d3ac35853ab4606c55167be0ca5235429641d375335523e0cdcb828","d8d70fdc2c8b8d353fd3a494b524244889919ed1ee82385e8025fb842045881a","3be4760ac894fb6f0e4971888a2b0b4dfa01638ca1b79d4736b1cac9fe6b865e","5035d5bb6c487908736ff88714466b06256004ae99b15a455e8dec422fe29cd3","1840555ab8869b114e75f90fbaa38689769eb9f6e9f23b4b87c3a6547a120a0b","c58d85bd161e34ce204f08fece62afd1d02b7c4495dc7a2b556c5a043c9f32d1","b18c5c1cbd386a2bd3d3228697d15b01710be40ae8b7ae9c2fbfd41c50856209","50dc7bcb6f87a4e7725c5905810980e30aed60871bd33e1ccf91c820f0214fe1","b0f4db2e8d56a0ed1bc0e4e14c1abef0c87b63ea9b2a28dab1e24466459e60b6","1510872e00da0e6e90f4a2bc7f80441f12bfd5353b562fac56a595048311a430","4ebfae60f964453d5756943ec156a7658885dfb2cf4c4af9b7ed957a0d052b20","bb809291d7bb9c058c05859ba5688f060516b90a39526a371dadae4f63ea80c4","a3820992a8ef8b20021ba485dfd47e13321011ac20c899297284b19dc33a6314","417996a3825d0ae77683a89e8b075f4953ababf271a39515ca5ed9881ba0cdfb","b7fd48cb95190844b15ad37d0a04868a67198933682ed666f19408459609783d","e91705fb807328d6471a7cf53891df328539e5bd4edf50b45d90f2a18e71ec9c","0a263903d2038a578cc805109a5c107da9dea85ea3500a4ae1d7050184890bed","72e08d30eb0230f5a1d85b93d6db37c56aaa8da8e424babfffecfd3724054e00","853cfe8c1814692a012ee6921a5830ea57e148feb3ff3fde7dd2d5be7939aa11","02ca8ecbfe20689481290bb61e23e393e0c7e543ad7d3ab22a8392bb0f2bf552","d37a7a6222545f27b03fb1ab2d4c81e97eec433d8ce2443abb5944538831f51c","e658cf75bbb9487e470b1dfb6cb14945cb6cfb490b75006f7d68457ee692703c","ab5d5d370a2f793457f8fee6e928ec77775ab57713a127f30cd0db4ebb6a1556","0cfb2dcd6b81fe5108d6b249119c0b369b04aee89f5bda8681ba02672ef7981e","2c6999f7cc2f01cb8171198ad6337c6f1b2010516c71fd7bfe261e7eb7e7f386","9b6e4d683c09925567007069783e694ee6e066f257abe008f9a547780e2f5d97","67c6ab21062ca6d7efe69332dff09830834bf7573ec8b1176ff77f620d1c6fd2","12842ca838ebc92b9823b47a1b234e6d5c963d612caf88bec62bf083e912d49d","c0c856e24141cc7c16a0495e4d5289715bcf513b200b4f6586ca568c10d3fdec","a585e6841d628991e7bfc24b2485d1fb7d019f6f58d7163eb3190f3b2094c7bd","3e1b6c05bc74ad4fed845826a7e7c81dcf6304e0ae8c2ffedd343182f984d31c","b692112310a2dbeab9ae9fe327198e4d6ddfc0b4c91309e66729df97f15b4b05","248446c3fe72dddf24b154444df6e37debd31cfb266801278add0e5b7596809a","9bb3ec20b469a03ba3794b820b1dcd997947ed061708c1a0076218233f297239","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","378df8bbbb9e3f6fca05d58f644aab538e1062eab5e778fb0b83d41125df246d","0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","82251920b05f30981c9a4109cb5f3169dce4b477effc845c6d781044a30e7672","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","9fa6b83a35e897f340858995ca5d77e901d89fd18644cd4c9e8a4afe0b2e6363",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},"a63fe9c56ab77d88ea7e53bb657f4432f0762ef7576acd295bf8dafb8f336866","a164404bb921277dda785ee8d2aaa36b3a6570c3808b73d2e703404bfaa06dac","c5959a5beee1511f03042e168bd6205c8f8f89703228503afb6510c5f8dac795","4c2c4f53e8eedd970f8afa369d7371544fb6231bf95e659f8602e09abe74d5a5",{"version":"dc5f6951bbf5b544349cbdef895c08dee6929818abd27d7d53c38cf1209091b3","affectsGlobalScope":true},"64e2803203b14d7f104f570f2152fde13abb6edc17b2ddb33d81ad86cf43d494","2c8d9e3331aec52d9a6d4040352c00282c3abaf48053ed0944528a4845c9caa3","9b2a8f604e7c0482a9061755f00b287cc99bd8718dc82d8207dd74c599b6dc43","d0fc76a91c828fbe3f0be5d683273634b7b101068333ceed975a8a9ac464137b",{"version":"1a048ff164b8d9609f5de3139d4e37f6e8a82af82087ac414b9208f52ef8aac7","affectsGlobalScope":true},"3111079f3cb5f2b9c812ca3f46161562bce5bfb355e915f46ed46c41714dc1c3","64576aba4ff801004122056ccd049f0597aa471dcfd7670a6a0b877ee8dd97c0","b32b6b16cb0bda68199582ad6f22242d07ee75fac9b1f28a98cd838afc5eea45","4441ee4119824bfaebc49308559edd7545978f9cb41a40f115074e1031dde75f",{"version":"60693a88462d0e97900123b5bf7c73e146ce0cc94da46a61fe6775b430d2ff05","affectsGlobalScope":true},{"version":"588c69eda58b9202676ec7ca11a72c3762819b46a0ed72462c769846153c447c","affectsGlobalScope":true},"cc829932ffaf5c49092f878bec18af1fa5d8591b45a45e2b7f757f793cb3b4ed","47db10fdc4e76c4f4598cf7c91ba6bfde6cf6d8082c51860fe751643bf359739","05d7d95e24bc2897bf20ce041c3dc3cca814e07148a93999145b1a0ad491094c","d1080e49778c0b2ce656042ebfa43f89dffb96ac00f86a34762188a21857ffd4","0ce99c641ea20b0c0c09d093fc28f18f5ab31dc80033707a1ac3154399de2559","f0c33a0b325d3499cc9aded7d32886f998c9a27b465097c6cc136944d0aafdaa","44e42ed6ec9c4451ebe89524e80ac8564e9dd0988c56e6c58f393c810730595d","03c91e8833eef54dc44db99d7deb469b5e3cec82f23054b4286a2380e0e00996","1606ea615c0a5ea9f5c1376a33e34c0e1112e8dee31a5b3b8a74ce781893aa6f","9fef9de633d01cb7f01f68195626a890ededd25cf96a1e785617d08c8668230d","4455c78d226d061b1203c7614c6c6eb5f4f9db5f00d44ff47d0112de8766fbc4",{"version":"bf89ceb26132596b859cd4d129ce3f447134b444dec87966ba65cd7e8e9e0cb0","affectsGlobalScope":true},"4465a636f5f6e9665a90e30691862c9e0a3ac2edc0e66296704f10865e924f2a","9af781f03d44f5635ed7844be0ce370d9d595d4b4ec67cad88f0fac03255257e","f9fd4c3ef6de27fa0e256f4e75b61711c4be05a3399f7714621d3edc832e36b0","e49290b7a927995c0d7e6b2b9c8296284b68a9036d9966531de65185269258d7","a11d4ba43bf0825d7285d54dec6cb951685cd458a4de3c5c1800f7cbf7799009","874ca809b79276460011480a2829f4c8d4db29416dd411f71efbf8f497f0ac09","82e1723b20fa0b15a7da0d1a03fec88348f82f640f7a2f308d6c0fac780cfc7c","e0202c3e09775b86b902f21623e55896cea98750efbdf0691ca7473af06fe551","23a28f834a078986bbf58f4e3705956983ff81c3c2493f3db3e5f0e8a9507779","4febdf7f3ec92706c58e0b4e8159cd6de718284ef384260b07c9641c13fc70ce","a2666b43d889b4882ac6ede1c48128bac351886854e94f832b20d3730e5062c5","7335933d9f30dcfd2c4b6080a8b78e81912a7fcefb1dafccb67ca4cb4b3ac23d","a6bfe9de9adef749010c118104b071d14943802ff0614732b47ce4f1c3e383cd","4c3d0e10396646db4a1e917fb852077ee77ae62e512913bef9cccc2bb0f8bd0e","3b220849d58140dcc6718f5b52dcd29fdb79c45bc28f561cbd29eb1cac6cce13","0ee22fce41f7417a24c808d266e91b850629113c104713a35854393d55994beb","22d1b1d965baba05766613e2e6c753bb005d4386c448cafd72c309ba689e8c24",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"2a7d39ea70e483d3ebcde44031b6552940f295349bee8d486e8bdf6380162302","9c6b1825e26a38284f409378ff194eca46b40a659ca41169e0922fe18a996ad9","168435ab3390620aebf1aa0001b380983582d0849755eeb17f2c501d1fc57587","c9688e409b82110a7492f49c786b0a7e0f93aa23498126a0133fef6c23911da0","922978fca5b21a14348f3693c2ee133119c6745447e6d1a6afbf141ec945e482","f4764269e387a74f2f8ffad4b1cbe5e601bbe731555780a871045a0c7959d87a","d26631a4f938f1345a81aadafd725e20dce6ac43c1c67607d32c3069f89d5160","67eda90d450d87c2b70947febcaf35bcb2c4b7b88ce1fb09a22771e8e9940420","436ee7efb39c4eaaf9298187c951c3a66d2948d439e2c90211a1bc852ccbe341","7542bde672f2935fe714dd272f3a6262e8936e3efff17bb49064352026080530","7bcb4238f63b639bfeee1434a377c95a7952261be6b49c5cf2486669a7d18805","0d3a6101913e340061be42ff3a4359fca35a13492b71b3e18dd81270e94c0ff4","393371d88d8580a167f869757c00ab51ed372cfa6b51be8e11c64db2e8ce5580","298d84749ea42b38d4c83d0f411a4718b518ddba8b5a8cc2b567f5c1e8ca891f","c5f25f800e2948a3ac45693dd597ca632195487d81f34752c4d7888879c5285d","24ee7169bd11cbdbb6741c96cdbdc6a54f4ae2d93ea7c1ab80c6760d2b89a34a","8bc9ffaa8e441d46ec2ba6fea358b2ffd58e7dd2f5f9325be0ce9a28fe551c86","9a9d7e2ec828f1d2ae60f7c0204abb188b45688829478e4f096b405f7b815d7a","14c0be8ad3b015963f3f0dcda14a316cfd7bdfedf1cd82d32376058c69854740","0fb74ab4b0effaaad005ef137ed9573854325663e41e495e20e6c1442e90004f","143c264f3cf0a257f93862d9b5a0d709749a27e5c0be0554f2348da6e06f6054","245863040e7e1c71a04452661fad58855d9b589615072e47d548229a3b95c9db","c513ee87cb4ed549c0b5cc9cc7daac4bd45aefa004badb2edfb352f824d77836","cebe1532fc2a7b1d8acab04c9cb67b8f637c01c4cdbb452c7e29a0365539f258","3485cfc1eb5e1c90b1ea0b1c2d8175ddbaf4db2d7c76d3705a4d323f32433591","c9cb1d33641e6ab44b9ae941cb18ea6f7c75b678e21ff77f2df2d71e711c6b40","12af0ebb895a59ddd395124435cfac88a78e482fadc10b349fa0ccf0750d2bf9","c588ac42a70daebf29a7eaecdabf7907fad6c7983e1cc14cae8e7771da4aa255",{"version":"5f186a758a616c107c70e8918db4630d063bd782f22e6e0b17573b125765b40b","affectsGlobalScope":true}],"options":{"declaration":false,"declarationMap":false,"esModuleInterop":true,"inlineSources":true,"module":1,"noImplicitAny":false,"noUnusedLocals":true,"outDir":"./","rootDir":"../../src/test","sourceMap":true,"strict":false,"target":4},"fileIdsList":[[55,56,57],[54,58],[53,58],[58],[54,58,59,60,61,62,64,65],[63],[58,59,60],[44,45,46,47],[44],[38],[36,37,38,39],[31,32,33,34,35,40,41,42,43,48,122],[51,52,67,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85],[67],[47,68],[66],[69],[75],[83],[77],[68],[72],[70],[80],[73],[71],[50,66,86,106],[50,66,86],[50,86],[164],[50,86,171],[50,66,71,72,86,106],[50,66,78,79,81,86],[86],[66,86],[50,77,86],[50,66,76,86,87,88,89,90,91],[86,106],[50,66,86,106,108],[106,154,155],[50,66,72,86,106],[94,96,97,98,99,100,101,102,103,104,105,106],[94,95,97,98,99,100,101,102,103,104,105,106],[95,96,97,98,99,100,101,102,103,104,105,106],[94,95,96,98,99,100,101,102,103,104,105,106],[94,95,96,97,99,100,101,102,103,104,105,106],[94,95,96,97,98,100,101,102,103,104,105,106],[94,95,96,97,98,99,101,102,103,104,105,106],[94,95,96,97,98,99,100,102,103,104,105,106],[94,95,96,97,98,99,100,101,103,104,105,106],[94,95,96,97,98,99,100,101,102,104,105,106],[94,95,96,97,98,99,100,101,102,103,105,106],[94,95,96,97,98,99,100,101,102,103,104,106],[94,95,96,97,98,99,100,101,102,103,104,105],[145,153],[110],[112],[113],[114,122,123,130,139],[114,115,122,130],[116,146],[117,118,123,131],[118,139],[119,120,122,130],[120],[121,122],[122],[122,123,124,139,145],[123,124],[125,130,139,145],[122,123,125,126,130,139,142,145],[125,127,139,142,145],[110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152],[122,128],[129,145],[120,122,130,139],[131],[132],[112,133],[134,144],[135],[136],[122,137],[137,138,146,148],[122,139],[140],[141],[130,142],[143],[130,144],[136,145],[146],[139,147],[148],[149],[122,124,139,145,148,150],[139,151]],"referencedMap":[[58,1],[55,2],[54,3],[57,4],[66,5],[64,6],[65,7],[48,8],[45,9],[39,10],[40,11],[50,12],[86,13],[68,14],[73,15],[67,16],[70,17],[82,18],[84,19],[164,20],[69,21],[83,20],[71,17],[171,22],[72,23],[79,18],[81,24],[78,20],[74,17],[76,18],[75,25],[80,26],[77,14],[158,27],[159,28],[160,29],[161,27],[162,29],[163,27],[165,30],[166,28],[167,28],[168,28],[169,27],[170,27],[172,31],[173,32],[174,33],[175,34],[176,27],[177,27],[178,29],[179,35],[180,36],[92,37],[93,34],[107,38],[109,39],[156,40],[157,41],[95,42],[96,43],[94,44],[97,45],[98,46],[99,47],[100,48],[101,49],[102,50],[103,51],[104,52],[105,53],[106,54],[154,55],[110,56],[112,57],[113,58],[114,59],[115,60],[116,61],[117,62],[118,63],[119,64],[120,65],[121,66],[122,67],[123,68],[124,69],[125,70],[126,71],[127,72],[153,73],[128,74],[129,75],[130,76],[131,77],[132,78],[133,79],[134,80],[135,81],[136,82],[137,83],[138,84],[139,85],[140,86],[141,87],[142,88],[143,89],[144,90],[145,91],[146,92],[147,93],[148,94],[149,95],[150,96],[151,97]],"exportedModulesMap":[[58,1],[55,2],[54,3],[57,4],[66,5],[64,6],[65,7],[48,8],[45,9],[39,10],[40,11],[50,12],[86,13],[68,14],[73,15],[67,16],[70,17],[82,18],[84,19],[164,20],[69,21],[83,20],[71,17],[171,22],[72,23],[79,18],[81,24],[78,20],[74,17],[76,18],[75,25],[80,26],[77,14],[158,27],[159,28],[160,29],[161,27],[162,29],[163,27],[165,30],[166,28],[167,28],[168,28],[169,27],[170,27],[172,31],[173,32],[174,33],[175,34],[176,27],[177,27],[178,29],[179,35],[180,36],[92,37],[93,34],[107,38],[109,39],[156,40],[157,41],[95,42],[96,43],[94,44],[97,45],[98,46],[99,47],[100,48],[101,49],[102,50],[103,51],[104,52],[105,53],[106,54],[154,55],[110,56],[112,57],[113,58],[114,59],[115,60],[116,61],[117,62],[118,63],[119,64],[120,65],[121,66],[122,67],[123,68],[124,69],[125,70],[126,71],[127,72],[153,73],[128,74],[129,75],[130,76],[131,77],[132,78],[133,79],[134,80],[135,81],[136,82],[137,83],[138,84],[139,85],[140,86],[141,87],[142,88],[143,89],[144,90],[145,91],[146,92],[147,93],[148,94],[149,95],[150,96],[151,97]],"semanticDiagnosticsPerFile":[58,55,54,56,57,53,59,66,60,61,62,64,65,63,33,32,31,44,47,48,46,45,41,42,36,38,39,40,37,35,43,50,34,85,86,68,73,67,70,82,84,164,69,83,71,171,72,79,81,78,74,76,75,80,77,51,52,30,158,159,160,161,162,163,165,166,167,168,169,170,172,173,174,175,176,177,178,179,180,92,93,107,109,156,157,90,88,89,91,87,108,49,95,96,94,97,98,99,100,101,102,103,104,105,106,181,154,110,112,113,114,115,116,117,118,119,120,121,122,123,124,111,152,125,126,127,153,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,155,6,7,9,8,2,10,11,12,13,14,15,16,17,3,4,21,18,19,20,22,23,24,5,25,26,27,28,1,29]},"version":"4.5.5"}
1
+ {"program":{"fileNames":["../../../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../src/test/global.d.ts","../../../property-common/dist/constants.d.ts","../../../property-common/dist/consoleUtils.d.ts","../../../property-common/dist/chronometer.d.ts","../../../property-common/dist/joinPaths.d.ts","../../../property-common/dist/guidUtils.d.ts","../../../property-common/dist/error_objects/flaggedError.d.ts","../../../property-common/dist/error_objects/operationError.d.ts","../../../property-common/dist/error_objects/httpError.d.ts","../../../property-common/dist/error_objects/httpErrorNoStack.d.ts","../../../property-common/dist/error_objects/index.d.ts","../../../property-common/dist/deferredPromise.d.ts","../../../property-common/dist/deterministicRandomGenerator.d.ts","../../../property-common/dist/hashCalculator.d.ts","../../../property-common/dist/datastructures/collection.d.ts","../../../property-common/dist/datastructures/sortedCollection.d.ts","../../../property-common/dist/datastructures/integer64.d.ts","../../../property-common/dist/datastructures/dataArray.d.ts","../../../property-common/dist/datastructures/index.d.ts","../../../../../../node_modules/@types/events/index.d.ts","../../../property-common/dist/index.d.ts","../propertyFactory.d.ts","../propertyUtils.d.ts","../../../property-changeset/dist/changeset_operations/operationTypes.d.ts","../../../property-changeset/dist/changeset_operations/arrayChangesetIterator.d.ts","../../../property-changeset/dist/changeset_operations/array.d.ts","../../../property-changeset/dist/changeset_operations/changesetConflictTypes.d.ts","../../../property-changeset/dist/changeset_operations/indexedCollection.d.ts","../../../property-changeset/dist/changeset.d.ts","../../../property-changeset/dist/helpers/typeidHelper.d.ts","../../../property-changeset/dist/pathHelper.d.ts","../../../property-changeset/dist/rebase.d.ts","../../../property-changeset/dist/templateSchema.d.ts","../../../property-changeset/dist/validationResultBuilder.d.ts","../../../property-changeset/dist/templateValidator.d.ts","../../../property-changeset/dist/utils.d.ts","../../../property-changeset/dist/index.d.ts","../properties/baseProperty.d.ts","../properties/abstractStaticCollectionProperty.d.ts","../properties/indexedCollectionBaseProperty.d.ts","../properties/containerProperty.d.ts","../properties/mapProperty.d.ts","../properties/nodeProperty.d.ts","../properties/arrayProperty.d.ts","../properties/setProperty.d.ts","../properties/valueArrayProperty.d.ts","../properties/stringProperty.d.ts","../properties/valueProperty.d.ts","../properties/referenceProperty.d.ts","../properties/referenceArrayProperty.d.ts","../properties/valueMapProperty.d.ts","../properties/referenceMapProperty.d.ts","../properties/enumArrayProperty.d.ts","../properties/intProperties.d.ts","../properties/enumProperty.d.ts","../enableValidations.d.ts","../index.d.ts","../../src/test/validation/goodPointId.js","../../src/test/validation/badPrimitiveTypeid.js","../../src/test/validation/goodColorId.js","../../src/test/validation/badMissingSemverInTypeid.js","../../src/test/validation/goodColorPalette.js","../../src/test/propertyFactory.spec.js","../../src/test/propertyTemplateWrapper.spec.js","../../../../../../node_modules/@types/lodash/common/common.d.ts","../../../../../../node_modules/@types/lodash/common/array.d.ts","../../../../../../node_modules/@types/lodash/common/collection.d.ts","../../../../../../node_modules/@types/lodash/common/date.d.ts","../../../../../../node_modules/@types/lodash/common/function.d.ts","../../../../../../node_modules/@types/lodash/common/lang.d.ts","../../../../../../node_modules/@types/lodash/common/math.d.ts","../../../../../../node_modules/@types/lodash/common/number.d.ts","../../../../../../node_modules/@types/lodash/common/object.d.ts","../../../../../../node_modules/@types/lodash/common/seq.d.ts","../../../../../../node_modules/@types/lodash/common/string.d.ts","../../../../../../node_modules/@types/lodash/common/util.d.ts","../../../../../../node_modules/@types/lodash/index.d.ts","../../src/test/propertyUtils.spec.js","../../src/test/validation/reversibleChangeSetTestData.js","../../src/test/reversibleChangeset.spec.js","../../../../../../node_modules/@types/node/assert.d.ts","../../../../../../node_modules/@types/node/globals.d.ts","../../../../../../node_modules/@types/node/async_hooks.d.ts","../../../../../../node_modules/@types/node/buffer.d.ts","../../../../../../node_modules/@types/node/child_process.d.ts","../../../../../../node_modules/@types/node/cluster.d.ts","../../../../../../node_modules/@types/node/console.d.ts","../../../../../../node_modules/@types/node/constants.d.ts","../../../../../../node_modules/@types/node/crypto.d.ts","../../../../../../node_modules/@types/node/dgram.d.ts","../../../../../../node_modules/@types/node/dns.d.ts","../../../../../../node_modules/@types/node/domain.d.ts","../../../../../../node_modules/@types/node/events.d.ts","../../../../../../node_modules/@types/node/fs.d.ts","../../../../../../node_modules/@types/node/fs/promises.d.ts","../../../../../../node_modules/@types/node/http.d.ts","../../../../../../node_modules/@types/node/http2.d.ts","../../../../../../node_modules/@types/node/https.d.ts","../../../../../../node_modules/@types/node/inspector.d.ts","../../../../../../node_modules/@types/node/module.d.ts","../../../../../../node_modules/@types/node/net.d.ts","../../../../../../node_modules/@types/node/os.d.ts","../../../../../../node_modules/@types/node/path.d.ts","../../../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../../../node_modules/@types/node/process.d.ts","../../../../../../node_modules/@types/node/punycode.d.ts","../../../../../../node_modules/@types/node/querystring.d.ts","../../../../../../node_modules/@types/node/readline.d.ts","../../../../../../node_modules/@types/node/repl.d.ts","../../../../../../node_modules/@types/node/stream.d.ts","../../../../../../node_modules/@types/node/string_decoder.d.ts","../../../../../../node_modules/@types/node/timers.d.ts","../../../../../../node_modules/@types/node/tls.d.ts","../../../../../../node_modules/@types/node/trace_events.d.ts","../../../../../../node_modules/@types/node/tty.d.ts","../../../../../../node_modules/@types/node/url.d.ts","../../../../../../node_modules/@types/node/util.d.ts","../../../../../../node_modules/@types/node/v8.d.ts","../../../../../../node_modules/@types/node/vm.d.ts","../../../../../../node_modules/@types/node/wasi.d.ts","../../../../../../node_modules/@types/node/worker_threads.d.ts","../../../../../../node_modules/@types/node/zlib.d.ts","../../../../../../node_modules/@types/node/globals.global.d.ts","../../../../../../node_modules/@types/node/index.d.ts","../../../../../../node_modules/@types/nock/index.d.ts","../../../../../../node_modules/@types/sinon/ts3.1/index.d.ts","../../src/test/setup.js","../../src/test/utils.spec.js","../../src/test/properties/arrayProperty.spec.js","../../src/test/properties/baseProperty.spec.js","../../src/test/properties/containerProperty.spec.js","../../src/test/properties/customArrayProperty.spec.js","../../src/test/properties/enumArrayProperty.spec.js","../../src/test/properties/enumProperty.spec.js","../properties/floatProperties.d.ts","../../src/test/properties/float32.spec.js","../../src/test/properties/int64ArrayProperty.spec.js","../../src/test/properties/int64MapProperty.spec.js","../../src/test/properties/int64Property.spec.js","../../src/test/properties/isLeafNode.spec.js","../../src/test/properties/mapProperty.spec.js","../properties/namedNodeProperty.d.ts","../../src/test/properties/namedNodeProperty.spec.js","../../src/test/properties/nodeProperty.spec.js","../../src/test/properties/referenceProperty.spec.js","../../src/test/properties/relationshipProperty.spec.js","../../src/test/properties/setProperty.spec.js","../../src/test/properties/stringProperty.spec.js","../../src/test/properties/uint64Property.spec.js","../../src/test/properties/valueMapProperty.spec.js","../../src/test/properties/valueProperty.spec.js","../../../../../../node_modules/@types/mocha/index.d.ts"],"fileInfos":[{"version":"89f78430e422a0f06d13019d60d5a45b37ec2d28e67eb647f73b1b0d19a46b72","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"abba1071bfd89e55e88a054b0c851ea3e8a494c340d0f3fab19eb18f6afb0c9e","affectsGlobalScope":true},{"version":"927cb2b60048e1395b183bf74b2b80a75bdb1dbe384e1d9fac654313ea2fb136","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"4378fc8122ec9d1a685b01eb66c46f62aba6b239ca7228bb6483bcf8259ee493","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},{"version":"88aaf14515ff5bd8228528dce7ff080db4cceef68ee69d49c29bd273e00e4ede","affectsGlobalScope":true},"361fba27bac29f3eba1b8b3b472f08a83c7cdc3692869012775d1adfb3884de8","9f5c1dcc9b637bd7f937572897913c03cfcd0021bb78a8405fee100d30c2e3fb","7711200210618bc724e56d56025d4c69f5bc98d3b393ad22f7379d0f61617281","99f44cf20700ade12dbb65ca287c0d96ec1269d9d41916a02dbf1767f73f5f6f","423e72d2635e810ea54946e4a8588f64bf320e98e3937b8c4bde53752abd31cb","24412421e05e07d5fe02c41c17487dbe66641b8db7f0f01caee191f622ccdd54","6df2518e7eefc7ae6feba7962122fcb048b2d41cbb729fba9c0969c92e810475","82f986b48fe26ccf5fb9aa1140680d571d5d6bf73e1eb3d62822cf39eaafa435","3e48960bbe9a0ea0cea1fe9676525f9467e669d11f49491fa654061917e6c90b","0995bd5ad1a2152508876ee7a6f9b29dfddc4cf6172cb452470e346925c27f89","edc83dec2d53eb070c5dc86f0b41a2bbd2e75d529097e1be86fa8e1cf1fbad1f","fc734d62257760825514155d4d6d2e341983ffedca33f10d587337638e804669","6729a25a1febcd4621ade6bd8988d4c5e05befc27747d237b390099525100d14","b34cacdcbc4ebdcb9e6e9ddb4e130fff7859d76b022bab2c096024c06a0b4c96","b6d168c6be5ca0c1d074af6d52b6927096ae5170f24d16c384b973346fde7c5b","02e5ba55c358984378b56e924cde6f23847bfa6685373d6c680c15aa3caeac0c","2828c8c2e41695b3125e42a9635ee6374ec5978365b3e61db527a29c043941c2","f46e3d81a2823884724a5a87675830a32902706a990cb4065c39ae3061b32bed","400db42c3a46984118bff14260d60cec580057dc1ab4c2d7310beb643e4f5935","5402fb57754f557a3f2891886b127b1ab6388509153fe15472d5fe18ad7df3e9","f7d1f482f508048543289ccd70e3c9415ede4c472a31293d53de935c659c7e0e","6a5140a9d4eb36cee7a51ffe629701f8e8bbd9cfd9ad2f20c87592019f9fdcfc","eae9ad23597af5ac54f91efac6486eacf994957236dcbf230ac67dab40023e5b","521e70241ef4038881395d05db810a4f0dd00b2071cb1955a0e7b284616170c6","27d1fd06fe7757c14d217eada132f52a56f75fb8e76f8e1772db909163ee6084","adfadc223af3b2425a1575f2196499bd2dd9375bb517f90bbc7b3a960c8905a2","305cf1f99469de544795593197fdfca38d734e4b4d2564ffe920b4f03305557e","177211fa955b396f2a477b9b3d067ccc8583de49d7dec5aae63d28bdbddb16e2","b08594f0655ff58c74cee26a7ca80e0cc640dc567c190f51a2cdda3db04b89fb","e767784c9d3ac35853ab4606c55167be0ca5235429641d375335523e0cdcb828","d8d70fdc2c8b8d353fd3a494b524244889919ed1ee82385e8025fb842045881a","3be4760ac894fb6f0e4971888a2b0b4dfa01638ca1b79d4736b1cac9fe6b865e","5035d5bb6c487908736ff88714466b06256004ae99b15a455e8dec422fe29cd3","1840555ab8869b114e75f90fbaa38689769eb9f6e9f23b4b87c3a6547a120a0b","c58d85bd161e34ce204f08fece62afd1d02b7c4495dc7a2b556c5a043c9f32d1","b18c5c1cbd386a2bd3d3228697d15b01710be40ae8b7ae9c2fbfd41c50856209","50dc7bcb6f87a4e7725c5905810980e30aed60871bd33e1ccf91c820f0214fe1","b0f4db2e8d56a0ed1bc0e4e14c1abef0c87b63ea9b2a28dab1e24466459e60b6","1510872e00da0e6e90f4a2bc7f80441f12bfd5353b562fac56a595048311a430","4ebfae60f964453d5756943ec156a7658885dfb2cf4c4af9b7ed957a0d052b20","bb809291d7bb9c058c05859ba5688f060516b90a39526a371dadae4f63ea80c4","a3820992a8ef8b20021ba485dfd47e13321011ac20c899297284b19dc33a6314","417996a3825d0ae77683a89e8b075f4953ababf271a39515ca5ed9881ba0cdfb","b7fd48cb95190844b15ad37d0a04868a67198933682ed666f19408459609783d","e91705fb807328d6471a7cf53891df328539e5bd4edf50b45d90f2a18e71ec9c","0a263903d2038a578cc805109a5c107da9dea85ea3500a4ae1d7050184890bed","72e08d30eb0230f5a1d85b93d6db37c56aaa8da8e424babfffecfd3724054e00","853cfe8c1814692a012ee6921a5830ea57e148feb3ff3fde7dd2d5be7939aa11","02ca8ecbfe20689481290bb61e23e393e0c7e543ad7d3ab22a8392bb0f2bf552","d37a7a6222545f27b03fb1ab2d4c81e97eec433d8ce2443abb5944538831f51c","e658cf75bbb9487e470b1dfb6cb14945cb6cfb490b75006f7d68457ee692703c","ab5d5d370a2f793457f8fee6e928ec77775ab57713a127f30cd0db4ebb6a1556","0cfb2dcd6b81fe5108d6b249119c0b369b04aee89f5bda8681ba02672ef7981e","2c6999f7cc2f01cb8171198ad6337c6f1b2010516c71fd7bfe261e7eb7e7f386","9b6e4d683c09925567007069783e694ee6e066f257abe008f9a547780e2f5d97","67c6ab21062ca6d7efe69332dff09830834bf7573ec8b1176ff77f620d1c6fd2","12842ca838ebc92b9823b47a1b234e6d5c963d612caf88bec62bf083e912d49d","c0c856e24141cc7c16a0495e4d5289715bcf513b200b4f6586ca568c10d3fdec","a585e6841d628991e7bfc24b2485d1fb7d019f6f58d7163eb3190f3b2094c7bd","3e1b6c05bc74ad4fed845826a7e7c81dcf6304e0ae8c2ffedd343182f984d31c","b692112310a2dbeab9ae9fe327198e4d6ddfc0b4c91309e66729df97f15b4b05","248446c3fe72dddf24b154444df6e37debd31cfb266801278add0e5b7596809a","9bb3ec20b469a03ba3794b820b1dcd997947ed061708c1a0076218233f297239","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","378df8bbbb9e3f6fca05d58f644aab538e1062eab5e778fb0b83d41125df246d","0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","82251920b05f30981c9a4109cb5f3169dce4b477effc845c6d781044a30e7672","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","9fa6b83a35e897f340858995ca5d77e901d89fd18644cd4c9e8a4afe0b2e6363",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},"541648221daf31a80c6e8fe94e0123290abd3c174092cd6b49eeef5f2396a474","a164404bb921277dda785ee8d2aaa36b3a6570c3808b73d2e703404bfaa06dac","c5959a5beee1511f03042e168bd6205c8f8f89703228503afb6510c5f8dac795","4c2c4f53e8eedd970f8afa369d7371544fb6231bf95e659f8602e09abe74d5a5",{"version":"dc5f6951bbf5b544349cbdef895c08dee6929818abd27d7d53c38cf1209091b3","affectsGlobalScope":true},"64e2803203b14d7f104f570f2152fde13abb6edc17b2ddb33d81ad86cf43d494","2c8d9e3331aec52d9a6d4040352c00282c3abaf48053ed0944528a4845c9caa3","9b2a8f604e7c0482a9061755f00b287cc99bd8718dc82d8207dd74c599b6dc43","d0fc76a91c828fbe3f0be5d683273634b7b101068333ceed975a8a9ac464137b",{"version":"1a048ff164b8d9609f5de3139d4e37f6e8a82af82087ac414b9208f52ef8aac7","affectsGlobalScope":true},"3111079f3cb5f2b9c812ca3f46161562bce5bfb355e915f46ed46c41714dc1c3","64576aba4ff801004122056ccd049f0597aa471dcfd7670a6a0b877ee8dd97c0","b32b6b16cb0bda68199582ad6f22242d07ee75fac9b1f28a98cd838afc5eea45","4441ee4119824bfaebc49308559edd7545978f9cb41a40f115074e1031dde75f",{"version":"60693a88462d0e97900123b5bf7c73e146ce0cc94da46a61fe6775b430d2ff05","affectsGlobalScope":true},{"version":"588c69eda58b9202676ec7ca11a72c3762819b46a0ed72462c769846153c447c","affectsGlobalScope":true},"cc829932ffaf5c49092f878bec18af1fa5d8591b45a45e2b7f757f793cb3b4ed","47db10fdc4e76c4f4598cf7c91ba6bfde6cf6d8082c51860fe751643bf359739","05d7d95e24bc2897bf20ce041c3dc3cca814e07148a93999145b1a0ad491094c","d1080e49778c0b2ce656042ebfa43f89dffb96ac00f86a34762188a21857ffd4","0ce99c641ea20b0c0c09d093fc28f18f5ab31dc80033707a1ac3154399de2559","f0c33a0b325d3499cc9aded7d32886f998c9a27b465097c6cc136944d0aafdaa","44e42ed6ec9c4451ebe89524e80ac8564e9dd0988c56e6c58f393c810730595d","03c91e8833eef54dc44db99d7deb469b5e3cec82f23054b4286a2380e0e00996","1606ea615c0a5ea9f5c1376a33e34c0e1112e8dee31a5b3b8a74ce781893aa6f","9fef9de633d01cb7f01f68195626a890ededd25cf96a1e785617d08c8668230d","4455c78d226d061b1203c7614c6c6eb5f4f9db5f00d44ff47d0112de8766fbc4",{"version":"bf89ceb26132596b859cd4d129ce3f447134b444dec87966ba65cd7e8e9e0cb0","affectsGlobalScope":true},"4465a636f5f6e9665a90e30691862c9e0a3ac2edc0e66296704f10865e924f2a","9af781f03d44f5635ed7844be0ce370d9d595d4b4ec67cad88f0fac03255257e","f9fd4c3ef6de27fa0e256f4e75b61711c4be05a3399f7714621d3edc832e36b0","e49290b7a927995c0d7e6b2b9c8296284b68a9036d9966531de65185269258d7","a11d4ba43bf0825d7285d54dec6cb951685cd458a4de3c5c1800f7cbf7799009","874ca809b79276460011480a2829f4c8d4db29416dd411f71efbf8f497f0ac09","82e1723b20fa0b15a7da0d1a03fec88348f82f640f7a2f308d6c0fac780cfc7c","e0202c3e09775b86b902f21623e55896cea98750efbdf0691ca7473af06fe551","23a28f834a078986bbf58f4e3705956983ff81c3c2493f3db3e5f0e8a9507779","4febdf7f3ec92706c58e0b4e8159cd6de718284ef384260b07c9641c13fc70ce","a2666b43d889b4882ac6ede1c48128bac351886854e94f832b20d3730e5062c5","7335933d9f30dcfd2c4b6080a8b78e81912a7fcefb1dafccb67ca4cb4b3ac23d","a6bfe9de9adef749010c118104b071d14943802ff0614732b47ce4f1c3e383cd","4c3d0e10396646db4a1e917fb852077ee77ae62e512913bef9cccc2bb0f8bd0e","3b220849d58140dcc6718f5b52dcd29fdb79c45bc28f561cbd29eb1cac6cce13","0ee22fce41f7417a24c808d266e91b850629113c104713a35854393d55994beb","22d1b1d965baba05766613e2e6c753bb005d4386c448cafd72c309ba689e8c24",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"2a7d39ea70e483d3ebcde44031b6552940f295349bee8d486e8bdf6380162302","9c6b1825e26a38284f409378ff194eca46b40a659ca41169e0922fe18a996ad9","168435ab3390620aebf1aa0001b380983582d0849755eeb17f2c501d1fc57587","c9688e409b82110a7492f49c786b0a7e0f93aa23498126a0133fef6c23911da0","922978fca5b21a14348f3693c2ee133119c6745447e6d1a6afbf141ec945e482","f4764269e387a74f2f8ffad4b1cbe5e601bbe731555780a871045a0c7959d87a","d26631a4f938f1345a81aadafd725e20dce6ac43c1c67607d32c3069f89d5160","51875965ef9b36e24ae5824977415b4156b1f3937946ebe1f90f7604ad1a0e38","436ee7efb39c4eaaf9298187c951c3a66d2948d439e2c90211a1bc852ccbe341","7542bde672f2935fe714dd272f3a6262e8936e3efff17bb49064352026080530","7bcb4238f63b639bfeee1434a377c95a7952261be6b49c5cf2486669a7d18805","0d3a6101913e340061be42ff3a4359fca35a13492b71b3e18dd81270e94c0ff4","393371d88d8580a167f869757c00ab51ed372cfa6b51be8e11c64db2e8ce5580","298d84749ea42b38d4c83d0f411a4718b518ddba8b5a8cc2b567f5c1e8ca891f","c5f25f800e2948a3ac45693dd597ca632195487d81f34752c4d7888879c5285d","24ee7169bd11cbdbb6741c96cdbdc6a54f4ae2d93ea7c1ab80c6760d2b89a34a","8bc9ffaa8e441d46ec2ba6fea358b2ffd58e7dd2f5f9325be0ce9a28fe551c86","9a9d7e2ec828f1d2ae60f7c0204abb188b45688829478e4f096b405f7b815d7a","14c0be8ad3b015963f3f0dcda14a316cfd7bdfedf1cd82d32376058c69854740","0fb74ab4b0effaaad005ef137ed9573854325663e41e495e20e6c1442e90004f","143c264f3cf0a257f93862d9b5a0d709749a27e5c0be0554f2348da6e06f6054","245863040e7e1c71a04452661fad58855d9b589615072e47d548229a3b95c9db","c513ee87cb4ed549c0b5cc9cc7daac4bd45aefa004badb2edfb352f824d77836","cebe1532fc2a7b1d8acab04c9cb67b8f637c01c4cdbb452c7e29a0365539f258","3485cfc1eb5e1c90b1ea0b1c2d8175ddbaf4db2d7c76d3705a4d323f32433591","c9cb1d33641e6ab44b9ae941cb18ea6f7c75b678e21ff77f2df2d71e711c6b40","12af0ebb895a59ddd395124435cfac88a78e482fadc10b349fa0ccf0750d2bf9","c588ac42a70daebf29a7eaecdabf7907fad6c7983e1cc14cae8e7771da4aa255",{"version":"3f6d6465811321abc30a1e5f667feed63e5b3917b3d6c8d6645daf96c75f97ba","affectsGlobalScope":true}],"options":{"declaration":false,"declarationMap":false,"esModuleInterop":true,"inlineSources":true,"module":1,"noImplicitAny":false,"noUnusedLocals":true,"outDir":"./","rootDir":"../../src/test","sourceMap":true,"strict":false,"target":4},"fileIdsList":[[55,56,57],[54,58],[53,58],[58],[54,58,59,60,61,62,64,65],[63],[58,59,60],[44,45,46,47],[44],[38],[36,37,38,39],[31,32,33,34,35,40,41,42,43,48,122],[51,52,67,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85],[67],[47,68],[66],[69],[75],[83],[77],[68],[72],[70],[80],[73],[71],[50,66,86,106],[50,66,86],[50,86],[164],[50,86,171],[50,66,71,72,86,106],[50,66,78,79,81,86],[86],[66,86],[50,77,86],[50,66,76,86,87,88,89,90,91],[86,106],[50,66,86,106,108],[106,154,155],[50,66,72,86,106],[94,96,97,98,99,100,101,102,103,104,105,106],[94,95,97,98,99,100,101,102,103,104,105,106],[95,96,97,98,99,100,101,102,103,104,105,106],[94,95,96,98,99,100,101,102,103,104,105,106],[94,95,96,97,99,100,101,102,103,104,105,106],[94,95,96,97,98,100,101,102,103,104,105,106],[94,95,96,97,98,99,101,102,103,104,105,106],[94,95,96,97,98,99,100,102,103,104,105,106],[94,95,96,97,98,99,100,101,103,104,105,106],[94,95,96,97,98,99,100,101,102,104,105,106],[94,95,96,97,98,99,100,101,102,103,105,106],[94,95,96,97,98,99,100,101,102,103,104,106],[94,95,96,97,98,99,100,101,102,103,104,105],[145,153],[110],[112],[113],[114,122,123,130,139],[114,115,122,130],[116,146],[117,118,123,131],[118,139],[119,120,122,130],[120],[121,122],[122],[122,123,124,139,145],[123,124],[125,130,139,145],[122,123,125,126,130,139,142,145],[125,127,139,142,145],[110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152],[122,128],[129,145],[120,122,130,139],[131],[132],[112,133],[134,144],[135],[136],[122,137],[137,138,146,148],[122,139],[140],[141],[130,142],[143],[130,144],[136,145],[146],[139,147],[148],[149],[122,124,139,145,148,150],[139,151]],"referencedMap":[[58,1],[55,2],[54,3],[57,4],[66,5],[64,6],[65,7],[48,8],[45,9],[39,10],[40,11],[50,12],[86,13],[68,14],[73,15],[67,16],[70,17],[82,18],[84,19],[164,20],[69,21],[83,20],[71,17],[171,22],[72,23],[79,18],[81,24],[78,20],[74,17],[76,18],[75,25],[80,26],[77,14],[158,27],[159,28],[160,29],[161,27],[162,29],[163,27],[165,30],[166,28],[167,28],[168,28],[169,27],[170,27],[172,31],[173,32],[174,33],[175,34],[176,27],[177,27],[178,29],[179,35],[180,36],[92,37],[93,34],[107,38],[109,39],[156,40],[157,41],[95,42],[96,43],[94,44],[97,45],[98,46],[99,47],[100,48],[101,49],[102,50],[103,51],[104,52],[105,53],[106,54],[154,55],[110,56],[112,57],[113,58],[114,59],[115,60],[116,61],[117,62],[118,63],[119,64],[120,65],[121,66],[122,67],[123,68],[124,69],[125,70],[126,71],[127,72],[153,73],[128,74],[129,75],[130,76],[131,77],[132,78],[133,79],[134,80],[135,81],[136,82],[137,83],[138,84],[139,85],[140,86],[141,87],[142,88],[143,89],[144,90],[145,91],[146,92],[147,93],[148,94],[149,95],[150,96],[151,97]],"exportedModulesMap":[[58,1],[55,2],[54,3],[57,4],[66,5],[64,6],[65,7],[48,8],[45,9],[39,10],[40,11],[50,12],[86,13],[68,14],[73,15],[67,16],[70,17],[82,18],[84,19],[164,20],[69,21],[83,20],[71,17],[171,22],[72,23],[79,18],[81,24],[78,20],[74,17],[76,18],[75,25],[80,26],[77,14],[158,27],[159,28],[160,29],[161,27],[162,29],[163,27],[165,30],[166,28],[167,28],[168,28],[169,27],[170,27],[172,31],[173,32],[174,33],[175,34],[176,27],[177,27],[178,29],[179,35],[180,36],[92,37],[93,34],[107,38],[109,39],[156,40],[157,41],[95,42],[96,43],[94,44],[97,45],[98,46],[99,47],[100,48],[101,49],[102,50],[103,51],[104,52],[105,53],[106,54],[154,55],[110,56],[112,57],[113,58],[114,59],[115,60],[116,61],[117,62],[118,63],[119,64],[120,65],[121,66],[122,67],[123,68],[124,69],[125,70],[126,71],[127,72],[153,73],[128,74],[129,75],[130,76],[131,77],[132,78],[133,79],[134,80],[135,81],[136,82],[137,83],[138,84],[139,85],[140,86],[141,87],[142,88],[143,89],[144,90],[145,91],[146,92],[147,93],[148,94],[149,95],[150,96],[151,97]],"semanticDiagnosticsPerFile":[58,55,54,56,57,53,59,66,60,61,62,64,65,63,33,32,31,44,47,48,46,45,41,42,36,38,39,40,37,35,43,50,34,85,86,68,73,67,70,82,84,164,69,83,71,171,72,79,81,78,74,76,75,80,77,51,52,30,158,159,160,161,162,163,165,166,167,168,169,170,172,173,174,175,176,177,178,179,180,92,93,107,109,156,157,90,88,89,91,87,108,49,95,96,94,97,98,99,100,101,102,103,104,105,106,181,154,110,112,113,114,115,116,117,118,119,120,121,122,123,124,111,152,125,126,127,153,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,155,6,7,9,8,2,10,11,12,13,14,15,16,17,3,4,21,18,19,20,22,23,24,5,25,26,27,28,1,29]},"version":"4.5.5"}
@@ -96,7 +96,7 @@ export class PropertyTemplateWrapper {
96
96
  // This function could be moved somewhere else, an enum could be made if this information is widely needed.
97
97
  const isCreationType = (typeid) => {
98
98
  const creationTypes = ['ContainerProperty', 'NodeProperty', 'Enum', 'BinaryProperty', 'Binary', 'RepositoryReferenceProperty'];
99
- return creationTypes.indexOf(typeid) !== -1;
99
+ return creationTypes.includes(typeid);
100
100
  };
101
101
  if (isCreationType(in_typeid)) {
102
102
  const currentCreationType = this._objectCreationType;
@@ -1 +1 @@
1
- {"version":3,"file":"propertyTemplateWrapper.js","sourceRoot":"","sources":["../src/propertyTemplateWrapper.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;AAExE,MAAM,6BAA6B,GAAG;IAClC,cAAc,EAAE,IAAI;IACpB,mBAAmB,EAAE,IAAI;IACzB,cAAc,EAAE,IAAI;IACpB,MAAM,EAAE,IAAI;CACf,CAAC;AACF;;;;GAIG;AACH,MAAM,qBAAqB,GAAG,CAAC,SAAS,EAAE,EAAE;IACxC,OAAO,CAAC,6BAA6B,CAAC,SAAS,CAAC,CAAC;AACrD,CAAC,CAAC;AAEF,MAAM,OAAO,uBAAuB;IAChC;;;;;;;;;OASG;IACH,YAAY,iBAAiB,EAAE,QAAQ;QACnC,oDAAoD;QACpD,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAE3C;;WAEG;QACH,IAAI,CAAC,yBAAyB,GAAG,SAAS,CAAC;QAE3C,2DAA2D;QAC3D,IAAI,CAAC,mBAAmB,GAAG,SAAS,CAAC;QAErC,gCAAgC;QAChC,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED;;;;OAIG;IACH,mBAAmB;QACf,OAAO,I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;oBAC/B,MAAM,EAAE,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACvB,IAAI,oBAAoB,CAAC,EAAE,CAAC,EAAE;wBAC1B,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,oBAAoB,CAAC,EAAE,CAAC,CAAC,CAAC;wBACxD,OAAO,oBAAoB,CAAC,EAAE,CAAC,CAAC;qBACnC;iBACJ;gBAED,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;gBACvD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;oBAC1C,MAAM,cAAc,GAAG,oBAAoB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC7D,IAAI,cAAc,EAAE;wBAChB,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;qBACnC;iBACJ;aACJ;YAED,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;gBACvB,KAAK,CAAC,SAAS,CAAC,GAAG,UAAU,CAAC;aACjC;QACL,CAAC,CAAC;QAEF,kBAAkB,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,YAAY,CAAC,CAAC;QACtE,kBAAkB,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,WAAW,CAAC,CAAC;IACzE,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Declaration of the PropertyTemplateWrapper module\n * PropertyTemplateWrapper is used to wrap a property template and perform internal optimizations\n */\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst _ = require('lodash');\nconst { ContainerProperty } = require('./properties/containerProperty');\n\nconst reservedTypesWithoutTemplates = {\n 'BaseProperty': true,\n 'ContainerProperty': true,\n 'NodeProperty': true,\n 'Enum': true,\n};\n/**\n * Utility function that validates if the typeid is a reserved type without a template.\n * @param {string} in_typeid The typeid to validate.\n * @return {boolean} True if the typeid is a reserved type without a template, false otherwise.\n */\nconst hasAssociatedTemplate = (in_typeid) => {\n return !reservedTypesWithoutTemplates[in_typeid];\n};\n\nexport class PropertyTemplateWrapper {\n /**\n * Constructor for creating a PropertyTemplateWrapper based on the given template.\n * @param {PropertyTemplate} in_remoteTemplate A property template\n * @param {string} in_scope The scope of the template\n *\n * @constructor\n * @package\n * @alias property-properties.PropertyTemplateWrapper\n * @category Properties\n */\n constructor(in_remoteTemplate, in_scope) {\n /** The property template this object is wrapping */\n this._propertyTemplate = in_remoteTemplate;\n\n /** A property template created from this.propertyTemplate with the addition of all information\n * from templates this template inherits from.\n */\n this._compiledPropertyTemplate = undefined;\n\n /* What type of base object is created for this template */\n this._objectCreationType = undefined;\n\n /* The scope of this template */\n this._scope = in_scope;\n }\n\n /**\n * To get the property template that this is wrapping.\n * @return {property-properties.PropertyTemplate} The template this wrapper contains\n * @package\n */\n getPropertyTemplate() {\n return this._propertyTemplate;\n }\n\n /**\n * Gets the compiled template or creates it then returns it.\n * @param {property-properties.PropertyFactory} in_propertyFactory The assosiated PropertyFactory.\n * @return {property-properties.PropertyTemplate} The compiled template\n * A compiled template is the template which is actually used for creating objects.\n * It has all information from parent Templates, and other changes.\n * @package\n */\n getCompiledTemplate(in_propertyFactory) {\n if (this._compiledPropertyTemplate === undefined) {\n this._compiledPropertyTemplate = this._contructCompiledTemplate(in_propertyFactory);\n }\n return this._compiledPropertyTemplate;\n }\n\n /**\n * Returns if the compiled template has been created.\n * @return {boolean} if the compiled template has been created\n * @package\n */\n hasCompiledTemplate() {\n return !!this._compiledPropertyTemplate;\n }\n\n /**\n * To get the creation type of the template this wraps.\n * @return {string} A typeid which represents the creation type of this template\n * @package\n */\n getCreationType() {\n return this._objectCreationType;\n }\n\n /**\n * If current creation type is undefined, sets it to in_typeid if in_typeid is a creation type.\n * If current creation type is defined, throws if in_typeid is a creation type.\n *\n * @param {string} in_typeid A typeid\n * @package\n */\n setCreationType(in_typeid) {\n // This function could be moved somewhere else, an enum could be made if this information is widely needed.\n const isCreationType = (typeid) => {\n const creationTypes =\n ['ContainerProperty', 'NodeProperty', 'Enum', 'BinaryProperty', 'Binary', 'RepositoryReferenceProperty'];\n return creationTypes.indexOf(typeid) !== -1;\n };\n\n if (isCreationType(in_typeid)) {\n const currentCreationType = this._objectCreationType;\n if (currentCreationType === undefined) {\n this._objectCreationType = in_typeid;\n } else if (currentCreationType !== in_typeid) {\n throw new Error(MSG.ONLY_ONE_CREATION_TYPE + currentCreationType + ', ' + in_typeid);\n }\n }\n }\n\n /**\n * Contructs the compiled template from the template this wraps\n * @param {property-properties.PropertyFactory} in_propertyFactory The associated PropertyFactory.\n * @return {property-properties.PropertyTemplate} The compiled template\n * A compiled template is the template which is actually used for creating objects.\n * It has all information from parent Templates, and other changes.\n * @package\n */\n _contructCompiledTemplate(in_propertyFactory) {\n const originalTemplate = this.getPropertyTemplate();\n\n this.setCreationType(originalTemplate.typeid);\n\n /* Because we treat templates and contructor functions for base types the same way :( */\n if (_.isFunction(originalTemplate)) {\n return originalTemplate;\n }\n\n let parentTemplateIds = originalTemplate.inherits;\n\n /* template.inherits can be a string, if so convert it to array of strings */\n if (typeof parentTemplateIds === 'string') {\n parentTemplateIds = [parentTemplateIds];\n }\n\n /* Cloning the original template to avoid modifying it */\n const template = originalTemplate.clone();\n\n /* Copy the proccesed list of parents to not modify the original */\n const typeInheritence = parentTemplateIds ? parentTemplateIds.slice() : [];\n\n /* Look ups to efficiently check what properties/constants parents have */\n const parentsPropertiesById = {};\n const parentsConstantsById = {};\n\n if (parentTemplateIds !== undefined) {\n for (let i = 0; i < parentTemplateIds.length; ++i) {\n const parentTemplateId = parentTemplateIds[i];\n this.setCreationType(parentTemplateId);\n\n if (hasAssociatedTemplate(parentTemplateId)) {\n const parentTemplateWrapper = in_propertyFactory._getWrapper(parentTemplateId, undefined, this._scope);\n if (parentTemplateWrapper) {\n const parentTemplate = parentTemplateWrapper.getCompiledTemplate(in_propertyFactory);\n const parentCreationType = parentTemplateWrapper.getCreationType();\n\n if (parentCreationType !== 'ContainerProperty') {\n this.setCreationType(parentCreationType);\n }\n\n if (parentTemplate.inherits) {\n typeInheritence.concat(parentTemplateId);\n }\n\n /* Fills parentsPropertiesById and makes sure there are no two properties or constants with the same id */\n if (parentTemplate.hasNestedProperties()) {\n const parentProperties = parentTemplate.properties;\n for (let j = 0; j < parentProperties.length; ++j) {\n const parentProperty = parentProperties[j];\n /* Two parents has child property with same id */\n if (parentsPropertiesById[parentProperty.id] || parentsConstantsById[parentProperty.id]) {\n throw new Error(MSG.OVERWRITING_ID + parentProperty.id);\n }\n parentsPropertiesById[parentProperty.id] = parentProperty;\n }\n }\n\n /* Fills parentsConsantsById and makes sure there are no two properties or constants with the same id */\n if (parentTemplate.hasNestedConstants()) {\n const parentConstants = parentTemplate.constants;\n for (let j = 0; j < parentConstants.length; ++j) {\n const parentConstant = parentConstants[j];\n /* Two parents has child property with same id */\n if (parentsConstantsById[parentConstant.id] || parentsPropertiesById[parentConstant.id]) {\n throw new Error(MSG.OVERWRITING_ID + parentConstant.id);\n }\n parentsConstantsById[parentConstant.id] = parentConstant;\n }\n }\n }\n }\n }\n }\n\n if (this._objectCreationType === undefined) {\n this.setCreationType('ContainerProperty');\n }\n\n /* Merges properties from parents into the properties of the child */\n const constructSubProperties = (in_template, in_parentsPropertiesById, fieldName) => {\n const propertyKeys = Object.keys(in_parentsPropertiesById);\n\n if (in_template[fieldName] === undefined && propertyKeys.length !== 0) {\n in_template[fieldName] = [];\n }\n\n const properties = in_template[fieldName] || [];\n\n for (let i = 0; i < properties.length; ++i) {\n const property = properties[i];\n const id = property.id;\n if (in_parentsPropertiesById[id]) {\n this._mergeProperty(property, in_parentsPropertiesById[id]);\n delete in_parentsPropertiesById[id];\n }\n }\n\n for (let i = 0; i < propertyKeys.length; ++i) {\n const insertProperty = in_parentsPropertiesById[propertyKeys[i]];\n if (insertProperty) {\n properties.push(insertProperty);\n }\n }\n\n if (properties.length > 0) {\n template[fieldName] = properties;\n }\n };\n\n constructSubProperties(template, parentsPropertiesById, 'properties');\n constructSubProperties(template, parentsConstantsById, 'constants');\n\n if (typeInheritence.length > 0) {\n template.inherits = typeInheritence;\n }\n\n return template;\n }\n\n /**\n * A helper function which merges a child and parent property.\n * The changes are applied directly to the in_childProperty.\n * @param {object} in_childProperty The child's property defition.\n * @param {object} in_parentProperty The parent's property defition.\n * @package\n */\n _mergeProperty(in_childProperty, in_parentProperty) {\n const mergeField = (child, parent, fieldName, defaultValue) => {\n if (child[fieldName] === undefined) {\n if (parent[fieldName] !== undefined) {\n child[fieldName] = parent[fieldName];\n }\n } else if (child[fieldName] !== parent[fieldName] &&\n (child[fieldName] !== defaultValue || parent[fieldName] !== undefined)) {\n throw new Error(MSG.OVERRIDEN_PROP_MUST_HAVE_SAME_FIELD_VALUES_AS_BASE_TYPE + fieldName +\n ' as the base type: ' + child.id + ': ' + child[fieldName] + ' != ' + parent[fieldName]);\n }\n };\n\n mergeField(in_childProperty, in_parentProperty, 'context', 'single');\n mergeField(in_childProperty, in_parentProperty, 'contextKeyType', 'string');\n mergeField(in_childProperty, in_parentProperty, 'length', 0);\n mergeField(in_childProperty, in_parentProperty, 'optional', false);\n mergeField(in_childProperty, in_parentProperty, 'typeid', undefined);\n\n if (in_parentProperty.typedValue !== undefined) {\n if (in_childProperty.typedValue === undefined) {\n in_childProperty.typedValue = in_parentProperty.typedValue;\n }\n }\n\n if (in_parentProperty.value !== undefined) {\n if (in_childProperty.value === undefined) {\n in_childProperty.value = in_parentProperty.value;\n }\n }\n\n const mergeSubProperties = (child, parent, fieldName) => {\n const parentPropertiesById = {};\n let parentProperties = parent[fieldName];\n let properties = child[fieldName] || [];\n if (parentProperties) {\n for (let j = 0; j < parentProperties.length; ++j) {\n const parentProperty = parentProperties[j];\n parentPropertiesById[parentProperty.id] = parentProperty;\n }\n\n for (let i = 0; i < properties.length; ++i) {\n const property = properties[i];\n const id = property.id;\n if (parentPropertiesById[id]) {\n this._mergeProperty(property, parentPropertiesById[id]);\n delete parentPropertiesById[id];\n }\n }\n\n const propertyKeys = Object.keys(parentPropertiesById);\n for (let i = 0; i < propertyKeys.length; ++i) {\n const insertProperty = parentPropertiesById[propertyKeys[i]];\n if (insertProperty) {\n properties.push(insertProperty);\n }\n }\n }\n\n if (properties.length > 0) {\n child[fieldName] = properties;\n }\n };\n\n mergeSubProperties(in_childProperty, in_parentProperty, 'properties');\n mergeSubProperties(in_childProperty, in_parentProperty, 'constants');\n }\n}\n"]}
1
+ {"version":3,"file":"propertyTemplateWrapper.js","sourceRoot":"","sources":["../src/propertyTemplateWrapper.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;AAExE,MAAM,6BAA6B,GAAG;IAClC,cAAc,EAAE,IAAI;IACpB,mBAAmB,EAAE,IAAI;IACzB,cAAc,EAAE,IAAI;IACpB,MAAM,EAAE,IAAI;CACf,CAAC;AACF;;;;GAIG;AACH,MAAM,qBAAqB,GAAG,CAAC,SAAS,EAAE,EAAE;IACxC,OAAO,CAAC,6BAA6B,CAAC,SAAS,CAAC,CAAC;AACrD,CAAC,CAAC;AAEF,MAAM,OAAO,uBAAuB;IAChC;;;;;;;;;OASG;IACH,YAAY,iBAAiB,EAAE,QAAQ;QACnC,oDAAoD;QACpD,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAE3C;;WAEG;QACH,IAAI,CAAC,yBAAyB,GAAG,SAAS,CAAC;QAE3C,2DAA2D;QAC3D,IAAI,CAAC,mBAAmB,GAAG,SAAS,CAAC;QAErC,gCAAgC;QAChC,IAAI,CAAC,MAAM,GAAG,QAA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AAM,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;oBAC/B,MAAM,EAAE,GAAG,QAAQ,CAAC,EAAE,CAAC;oBACvB,IAAI,oBAAoB,CAAC,EAAE,CAAC,EAAE;wBAC1B,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,oBAAoB,CAAC,EAAE,CAAC,CAAC,CAAC;wBACxD,OAAO,oBAAoB,CAAC,EAAE,CAAC,CAAC;qBACnC;iBACJ;gBAED,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;gBACvD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;oBAC1C,MAAM,cAAc,GAAG,oBAAoB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC7D,IAAI,cAAc,EAAE;wBAChB,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;qBACnC;iBACJ;aACJ;YAED,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;gBACvB,KAAK,CAAC,SAAS,CAAC,GAAG,UAAU,CAAC;aACjC;QACL,CAAC,CAAC;QAEF,kBAAkB,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,YAAY,CAAC,CAAC;QACtE,kBAAkB,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,WAAW,CAAC,CAAC;IACzE,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview\n * Declaration of the PropertyTemplateWrapper module\n * PropertyTemplateWrapper is used to wrap a property template and perform internal optimizations\n */\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst _ = require('lodash');\nconst { ContainerProperty } = require('./properties/containerProperty');\n\nconst reservedTypesWithoutTemplates = {\n 'BaseProperty': true,\n 'ContainerProperty': true,\n 'NodeProperty': true,\n 'Enum': true,\n};\n/**\n * Utility function that validates if the typeid is a reserved type without a template.\n * @param {string} in_typeid The typeid to validate.\n * @return {boolean} True if the typeid is a reserved type without a template, false otherwise.\n */\nconst hasAssociatedTemplate = (in_typeid) => {\n return !reservedTypesWithoutTemplates[in_typeid];\n};\n\nexport class PropertyTemplateWrapper {\n /**\n * Constructor for creating a PropertyTemplateWrapper based on the given template.\n * @param {PropertyTemplate} in_remoteTemplate A property template\n * @param {string} in_scope The scope of the template\n *\n * @constructor\n * @package\n * @alias property-properties.PropertyTemplateWrapper\n * @category Properties\n */\n constructor(in_remoteTemplate, in_scope) {\n /** The property template this object is wrapping */\n this._propertyTemplate = in_remoteTemplate;\n\n /** A property template created from this.propertyTemplate with the addition of all information\n * from templates this template inherits from.\n */\n this._compiledPropertyTemplate = undefined;\n\n /* What type of base object is created for this template */\n this._objectCreationType = undefined;\n\n /* The scope of this template */\n this._scope = in_scope;\n }\n\n /**\n * To get the property template that this is wrapping.\n * @return {property-properties.PropertyTemplate} The template this wrapper contains\n * @package\n */\n getPropertyTemplate() {\n return this._propertyTemplate;\n }\n\n /**\n * Gets the compiled template or creates it then returns it.\n * @param {property-properties.PropertyFactory} in_propertyFactory The assosiated PropertyFactory.\n * @return {property-properties.PropertyTemplate} The compiled template\n * A compiled template is the template which is actually used for creating objects.\n * It has all information from parent Templates, and other changes.\n * @package\n */\n getCompiledTemplate(in_propertyFactory) {\n if (this._compiledPropertyTemplate === undefined) {\n this._compiledPropertyTemplate = this._contructCompiledTemplate(in_propertyFactory);\n }\n return this._compiledPropertyTemplate;\n }\n\n /**\n * Returns if the compiled template has been created.\n * @return {boolean} if the compiled template has been created\n * @package\n */\n hasCompiledTemplate() {\n return !!this._compiledPropertyTemplate;\n }\n\n /**\n * To get the creation type of the template this wraps.\n * @return {string} A typeid which represents the creation type of this template\n * @package\n */\n getCreationType() {\n return this._objectCreationType;\n }\n\n /**\n * If current creation type is undefined, sets it to in_typeid if in_typeid is a creation type.\n * If current creation type is defined, throws if in_typeid is a creation type.\n *\n * @param {string} in_typeid A typeid\n * @package\n */\n setCreationType(in_typeid) {\n // This function could be moved somewhere else, an enum could be made if this information is widely needed.\n const isCreationType = (typeid) => {\n const creationTypes =\n ['ContainerProperty', 'NodeProperty', 'Enum', 'BinaryProperty', 'Binary', 'RepositoryReferenceProperty'];\n return creationTypes.includes(typeid);\n };\n\n if (isCreationType(in_typeid)) {\n const currentCreationType = this._objectCreationType;\n if (currentCreationType === undefined) {\n this._objectCreationType = in_typeid;\n } else if (currentCreationType !== in_typeid) {\n throw new Error(MSG.ONLY_ONE_CREATION_TYPE + currentCreationType + ', ' + in_typeid);\n }\n }\n }\n\n /**\n * Contructs the compiled template from the template this wraps\n * @param {property-properties.PropertyFactory} in_propertyFactory The associated PropertyFactory.\n * @return {property-properties.PropertyTemplate} The compiled template\n * A compiled template is the template which is actually used for creating objects.\n * It has all information from parent Templates, and other changes.\n * @package\n */\n _contructCompiledTemplate(in_propertyFactory) {\n const originalTemplate = this.getPropertyTemplate();\n\n this.setCreationType(originalTemplate.typeid);\n\n /* Because we treat templates and contructor functions for base types the same way :( */\n if (_.isFunction(originalTemplate)) {\n return originalTemplate;\n }\n\n let parentTemplateIds = originalTemplate.inherits;\n\n /* template.inherits can be a string, if so convert it to array of strings */\n if (typeof parentTemplateIds === 'string') {\n parentTemplateIds = [parentTemplateIds];\n }\n\n /* Cloning the original template to avoid modifying it */\n const template = originalTemplate.clone();\n\n /* Copy the proccesed list of parents to not modify the original */\n const typeInheritence = parentTemplateIds ? parentTemplateIds.slice() : [];\n\n /* Look ups to efficiently check what properties/constants parents have */\n const parentsPropertiesById = {};\n const parentsConstantsById = {};\n\n if (parentTemplateIds !== undefined) {\n for (let i = 0; i < parentTemplateIds.length; ++i) {\n const parentTemplateId = parentTemplateIds[i];\n this.setCreationType(parentTemplateId);\n\n if (hasAssociatedTemplate(parentTemplateId)) {\n const parentTemplateWrapper = in_propertyFactory._getWrapper(parentTemplateId, undefined, this._scope);\n if (parentTemplateWrapper) {\n const parentTemplate = parentTemplateWrapper.getCompiledTemplate(in_propertyFactory);\n const parentCreationType = parentTemplateWrapper.getCreationType();\n\n if (parentCreationType !== 'ContainerProperty') {\n this.setCreationType(parentCreationType);\n }\n\n if (parentTemplate.inherits) {\n typeInheritence.concat(parentTemplateId);\n }\n\n /* Fills parentsPropertiesById and makes sure there are no two properties or constants with the same id */\n if (parentTemplate.hasNestedProperties()) {\n const parentProperties = parentTemplate.properties;\n for (let j = 0; j < parentProperties.length; ++j) {\n const parentProperty = parentProperties[j];\n /* Two parents has child property with same id */\n if (parentsPropertiesById[parentProperty.id] || parentsConstantsById[parentProperty.id]) {\n throw new Error(MSG.OVERWRITING_ID + parentProperty.id);\n }\n parentsPropertiesById[parentProperty.id] = parentProperty;\n }\n }\n\n /* Fills parentsConsantsById and makes sure there are no two properties or constants with the same id */\n if (parentTemplate.hasNestedConstants()) {\n const parentConstants = parentTemplate.constants;\n for (let j = 0; j < parentConstants.length; ++j) {\n const parentConstant = parentConstants[j];\n /* Two parents has child property with same id */\n if (parentsConstantsById[parentConstant.id] || parentsPropertiesById[parentConstant.id]) {\n throw new Error(MSG.OVERWRITING_ID + parentConstant.id);\n }\n parentsConstantsById[parentConstant.id] = parentConstant;\n }\n }\n }\n }\n }\n }\n\n if (this._objectCreationType === undefined) {\n this.setCreationType('ContainerProperty');\n }\n\n /* Merges properties from parents into the properties of the child */\n const constructSubProperties = (in_template, in_parentsPropertiesById, fieldName) => {\n const propertyKeys = Object.keys(in_parentsPropertiesById);\n\n if (in_template[fieldName] === undefined && propertyKeys.length !== 0) {\n in_template[fieldName] = [];\n }\n\n const properties = in_template[fieldName] || [];\n\n for (let i = 0; i < properties.length; ++i) {\n const property = properties[i];\n const id = property.id;\n if (in_parentsPropertiesById[id]) {\n this._mergeProperty(property, in_parentsPropertiesById[id]);\n delete in_parentsPropertiesById[id];\n }\n }\n\n for (let i = 0; i < propertyKeys.length; ++i) {\n const insertProperty = in_parentsPropertiesById[propertyKeys[i]];\n if (insertProperty) {\n properties.push(insertProperty);\n }\n }\n\n if (properties.length > 0) {\n template[fieldName] = properties;\n }\n };\n\n constructSubProperties(template, parentsPropertiesById, 'properties');\n constructSubProperties(template, parentsConstantsById, 'constants');\n\n if (typeInheritence.length > 0) {\n template.inherits = typeInheritence;\n }\n\n return template;\n }\n\n /**\n * A helper function which merges a child and parent property.\n * The changes are applied directly to the in_childProperty.\n * @param {object} in_childProperty The child's property defition.\n * @param {object} in_parentProperty The parent's property defition.\n * @package\n */\n _mergeProperty(in_childProperty, in_parentProperty) {\n const mergeField = (child, parent, fieldName, defaultValue) => {\n if (child[fieldName] === undefined) {\n if (parent[fieldName] !== undefined) {\n child[fieldName] = parent[fieldName];\n }\n } else if (child[fieldName] !== parent[fieldName] &&\n (child[fieldName] !== defaultValue || parent[fieldName] !== undefined)) {\n throw new Error(MSG.OVERRIDEN_PROP_MUST_HAVE_SAME_FIELD_VALUES_AS_BASE_TYPE + fieldName +\n ' as the base type: ' + child.id + ': ' + child[fieldName] + ' != ' + parent[fieldName]);\n }\n };\n\n mergeField(in_childProperty, in_parentProperty, 'context', 'single');\n mergeField(in_childProperty, in_parentProperty, 'contextKeyType', 'string');\n mergeField(in_childProperty, in_parentProperty, 'length', 0);\n mergeField(in_childProperty, in_parentProperty, 'optional', false);\n mergeField(in_childProperty, in_parentProperty, 'typeid', undefined);\n\n if (in_parentProperty.typedValue !== undefined) {\n if (in_childProperty.typedValue === undefined) {\n in_childProperty.typedValue = in_parentProperty.typedValue;\n }\n }\n\n if (in_parentProperty.value !== undefined) {\n if (in_childProperty.value === undefined) {\n in_childProperty.value = in_parentProperty.value;\n }\n }\n\n const mergeSubProperties = (child, parent, fieldName) => {\n const parentPropertiesById = {};\n let parentProperties = parent[fieldName];\n let properties = child[fieldName] || [];\n if (parentProperties) {\n for (let j = 0; j < parentProperties.length; ++j) {\n const parentProperty = parentProperties[j];\n parentPropertiesById[parentProperty.id] = parentProperty;\n }\n\n for (let i = 0; i < properties.length; ++i) {\n const property = properties[i];\n const id = property.id;\n if (parentPropertiesById[id]) {\n this._mergeProperty(property, parentPropertiesById[id]);\n delete parentPropertiesById[id];\n }\n }\n\n const propertyKeys = Object.keys(parentPropertiesById);\n for (let i = 0; i < propertyKeys.length; ++i) {\n const insertProperty = parentPropertiesById[propertyKeys[i]];\n if (insertProperty) {\n properties.push(insertProperty);\n }\n }\n }\n\n if (properties.length > 0) {\n child[fieldName] = properties;\n }\n };\n\n mergeSubProperties(in_childProperty, in_parentProperty, 'properties');\n mergeSubProperties(in_childProperty, in_parentProperty, 'constants');\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-experimental/property-properties",
3
- "version": "0.59.3003",
3
+ "version": "0.59.4000-71128",
4
4
  "description": "definitions of properties",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -61,8 +61,8 @@
61
61
  "temp-directory": "nyc/.nyc_output"
62
62
  },
63
63
  "dependencies": {
64
- "@fluid-experimental/property-changeset": "^0.59.3003",
65
- "@fluid-experimental/property-common": "^0.59.3003",
64
+ "@fluid-experimental/property-changeset": "0.59.4000-71128",
65
+ "@fluid-experimental/property-common": "0.59.4000-71128",
66
66
  "ajv": "7.1.1",
67
67
  "async": "^3.2.0",
68
68
  "fastest-json-copy": "^1.0.1",
@@ -73,8 +73,8 @@
73
73
  },
74
74
  "devDependencies": {
75
75
  "@fluidframework/build-common": "^0.23.0",
76
- "@fluidframework/mocha-test-setup": "^0.59.3003",
77
- "@types/mocha": "^8.2.2",
76
+ "@fluidframework/mocha-test-setup": "0.59.4000-71128",
77
+ "@types/mocha": "^9.1.1",
78
78
  "chai": "^4.2.0",
79
79
  "concurrently": "^6.2.0",
80
80
  "cross-env": "^7.0.2",
@@ -83,12 +83,14 @@
83
83
  "eslint-plugin-eslint-comments": "~3.2.0",
84
84
  "eslint-plugin-import": "~2.25.4",
85
85
  "eslint-plugin-jest": "~26.1.3",
86
+ "eslint-plugin-jsdoc": "~39.3.0",
86
87
  "eslint-plugin-mocha": "~10.0.3",
87
88
  "eslint-plugin-promise": "~6.0.0",
88
89
  "eslint-plugin-react": "~7.28.0",
89
90
  "eslint-plugin-tsdoc": "~0.2.14",
90
91
  "eslint-plugin-unicorn": "~40.0.0",
91
- "mocha": "^8.4.0",
92
+ "eslint-plugin-unused-imports": "~2.0.0",
93
+ "mocha": "^10.0.0",
92
94
  "nock": "^10.0.1",
93
95
  "nyc": "^15.0.0",
94
96
  "rimraf": "^2.6.2",