@fluid-experimental/property-changeset 0.57.0 → 0.58.0-55983
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.
- package/dist/changeset.d.ts.map +1 -1
- package/dist/changeset.js +0 -2
- package/dist/changeset.js.map +1 -1
- package/dist/changeset_operations/indexedCollection.d.ts.map +1 -1
- package/dist/changeset_operations/indexedCollection.js +2 -1
- package/dist/changeset_operations/indexedCollection.js.map +1 -1
- package/dist/helpers/typeidHelper.js +2 -2
- package/dist/helpers/typeidHelper.js.map +1 -1
- package/dist/templateValidator.d.ts.map +1 -1
- package/dist/templateValidator.js +0 -1
- package/dist/templateValidator.js.map +1 -1
- package/dist/test/tsconfig.tsbuildinfo +1 -1
- package/dist/test/validator/templateValidator.spec.js +0 -1
- package/dist/test/validator/templateValidator.spec.js.map +1 -1
- package/lib/changeset.js +0 -2
- package/lib/changeset.js.map +1 -1
- package/lib/changeset_operations/indexedCollection.js +2 -1
- package/lib/changeset_operations/indexedCollection.js.map +1 -1
- package/lib/helpers/typeidHelper.js +2 -2
- package/lib/helpers/typeidHelper.js.map +1 -1
- package/lib/templateValidator.js +0 -1
- package/lib/templateValidator.js.map +1 -1
- package/package.json +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexedCollection.js","sourceRoot":"","sources":["../../src/changeset_operations/indexedCollection.ts"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;GAEG;;;;;;AAEF,yDAAoD;AACpD,6DAAqC;AACrC,6DAAqC;AACrC,+DAAuC;AACvC,6DAAqC;AACrC,+DAAuC;AAExC,YAAY;AACZ,yEAA2E;AAE3E,0DAAuD;AACvD,8CAA2C;AAC3C,qEAAwD;AACxD,yDAAsD;AAEtD,MAAM,EAAE,uBAAuB,EAAE,GAAG,EAAE,GAAG,2BAAS,CAAC;AAEnD;;;;GAIG;AAEH;;;;;;;;;GASG;AACH,MAAM,kBAAkB,GAAG,UAAS,SAAc;IAC9C,I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QA+vBnD;AAAA,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview Helper functions and classes to work with ChangeSets with indexed collections (sets and maps)\n */\n\n import {copy as cloneDeep} from \"fastest-json-copy\";\n import isEmpty from \"lodash/isEmpty\";\n import isEqual from \"lodash/isEqual\";\n import isObject from \"lodash/isObject\";\n import without from \"lodash/without\";\n import includes from \"lodash/includes\";\n\n//@ts-ignore\nimport { constants, joinPaths } from \"@fluid-experimental/property-common\";\nimport { ApplyChangeSetOptions, ConflictInfo, SerializedChangeSet } from \"../changeset\";\nimport { TypeIdHelper } from \"../helpers/typeidHelper\";\nimport { PathHelper } from \"../pathHelper\";\nimport { ConflictType } from \"./changesetConflictTypes\";\nimport { isEmptyChangeSet } from \"./isEmptyChangeset\";\n\nconst { PROPERTY_PATH_DELIMITER, MSG } = constants;\n\n/**\n * @namespace property-changeset.ChangeSetOperations.IndexedCollectionOperations\n * @alias property-changeset.ChangeSetOperations.IndexedCollectionOperations\n * Helper functions and classes to perform operations on ChangeSets with indexed collections (sets and maps)\n */\n\n/**\n * Checks whether an object is empty (has no keys)\n * This function should be a bit faster than the isEmpty from\n * underscore. Unfortunately, at least on Chrome, it is still in\n * O(n)\n *\n * @param in_object - The object to check\n * @returns Is it empty?\n * @private\n */\nconst _fastIsEmptyObject = function(in_object: any): boolean {\n if (!in_object || Array.isArray(in_object) || !isObject(in_object)) {\n return isEmpty(in_object);\n }\n\n for (const _entry in in_object) { // eslint-disable-line\n return false;\n }\n\n return true;\n};\n\nexport namespace ChangeSetIndexedCollectionFunctions {\n /**\n * Applies a ChangeSet to a given indexed collection property (recursively). The ChangeSet is assumed to be relative\n * to the same property root and it will be applied behind the base ChangeSet (assuming that the changes are\n * relative to the state after the base ChangeSet has been applied. It will change the base ChangeSet.\n *\n * @param io_basePropertyChanges - The ChangeSet describing the initial state\n * @param in_appliedPropertyChanges - The ChangeSet to apply to this state\n * @param in_typeid - The typeid of the contents collection\n * (without the collection type)\n * @param in_options - Optional additional parameters\n * @param in_options.applyAfterMetaInformation - Additional meta information which help later to obtain\n * more compact changeset during the apply operation\n *\n * @private\n */\n export const _performApplyAfterOnPropertyIndexedCollection = function(\n io_basePropertyChanges: SerializedChangeSet, // eslint-disable-line complexity\n in_appliedPropertyChanges: SerializedChangeSet,\n in_typeid: string,\n in_options: ApplyChangeSetOptions) {\n const isPrimitiveTypeid = TypeIdHelper.isPrimitiveType(in_typeid);\n\n // Handle remove entry operations\n if (in_appliedPropertyChanges.remove) {\n // Get and initialize the corresponding entries in the existing collection\n let removedEntries = in_appliedPropertyChanges.remove;\n\n io_basePropertyChanges = io_basePropertyChanges || {};\n io_basePropertyChanges.remove = io_basePropertyChanges.remove ||\n (Array.isArray(in_appliedPropertyChanges.remove) ? [] : {});\n let baseInserted = io_basePropertyChanges.insert || {};\n let baseRemoved = io_basePropertyChanges.remove;\n let baseModified = io_basePropertyChanges.modify;\n let done = false;\n\n if (!Array.isArray(removedEntries)) {\n if (isPrimitiveTypeid) {\n removedEntries = Object.keys(removedEntries);\n } else {\n // this is a reversible change set of templated types\n const removedTypes = Object.keys(removedEntries);\n for (let t = 0; t < removedTypes.length; t++) {\n const removedKeys = Object.keys(removedEntries[removedTypes[t]]);\n for (let i = 0; i < removedKeys.length; i++) {\n if (baseInserted[removedTypes[t]] &&\n baseInserted[removedTypes[t]][removedKeys[i]] !== undefined) {\n delete baseInserted[removedTypes[t]][removedKeys[i]];\n\n // If all entries for a typeid have been removed, we can remove\n // the whole typeid from the inserted section\n if (baseInserted && isEmpty(baseInserted[removedTypes[t]])) {\n delete baseInserted[removedTypes[t]];\n }\n } else {\n if (baseModified && baseModified[removedTypes[t]] &&\n baseModified[removedTypes[t]][removedKeys[i]] !== undefined) {\n delete baseModified[removedTypes[t]][removedKeys[i]];\n\n // If all entries for a typeid have been removed, we can remove\n // the whole typeid from the inserted section\n if (baseModified && isEmpty(baseModified[removedTypes[t]])) {\n delete baseModified[removedTypes[t]];\n }\n }\n if (Array.isArray(baseRemoved)) {\n baseRemoved.push(removedKeys[i]);\n } else {\n if (!baseRemoved[removedTypes[t]]) {\n baseRemoved[removedTypes[t]] = {};\n }\n baseRemoved[removedTypes[t]][removedKeys[i]] = removedEntries[removedTypes[t]][removedKeys[i]];\n }\n }\n }\n }\n done = true;\n }\n }\n\n if (!done) {\n if (isPrimitiveTypeid) {\n for (let i = 0; i < removedEntries.length; i++) {\n let key = removedEntries[i];\n\n // If there is an insert for this key, we just remove it\n if (baseInserted[key] !== undefined) {\n delete baseInserted[key];\n } else {\n // There could be a modify entry for this key, which we have to remove\n if (baseModified && baseModified[key] !== undefined) {\n delete baseModified[key];\n }\n\n // Otherwise we add it to the remove list\n if (Array.isArray(baseRemoved)) {\n baseRemoved.push(key);\n } else {\n baseRemoved[key] = in_appliedPropertyChanges.remove[key];\n }\n }\n }\n } else {\n const baseInsertedTypeids = Object.keys(baseInserted);\n for (let i = 0; i < removedEntries.length; i++) {\n let key = removedEntries[i];\n let foundInTypeid;\n\n // Since we only have a flat remove list (without typeid) in the changeset, we have\n // to check all inserts\n for (let j = 0; j < baseInsertedTypeids.length; j++) {\n if (baseInserted[baseInsertedTypeids[j]] &&\n baseInserted[baseInsertedTypeids[j]][key] !== undefined) {\n foundInTypeid = baseInsertedTypeids[j];\n break;\n }\n }\n\n if (foundInTypeid) {\n // If this key was inserted by this ChangeSet, we just remove it from the inserted list\n delete baseInserted[foundInTypeid][key];\n\n // If all entries for a typeid have been removed, we can remove\n // the whole typeid from the inserted or modified section\n if (baseInserted && isEmpty(baseInserted[foundInTypeid])) {\n delete baseInserted[foundInTypeid];\n }\n if (baseModified && isEmpty(baseModified[foundInTypeid])) {\n delete baseModified[foundInTypeid];\n }\n } else {\n // There could be a modify entry for this key, which we have to remove\n const baseModifiedTypeids = Object.keys(baseModified || {});\n for (let j = 0; j < baseModifiedTypeids.length; j++) {\n if (baseModified[baseModifiedTypeids[j]][key]) {\n foundInTypeid = baseModifiedTypeids[j];\n delete baseModified[foundInTypeid][key];\n break;\n }\n }\n\n // Otherwise we add it to the remove list\n baseRemoved.push(key);\n }\n }\n }\n }\n };\n\n // Apply insert operations\n if (in_appliedPropertyChanges.insert) {\n // Get and initialize the corresponding entries from the existing collection\n io_basePropertyChanges = io_basePropertyChanges || {};\n io_basePropertyChanges.insert = io_basePropertyChanges.insert || {};\n let baseInserted = io_basePropertyChanges.insert;\n let baseRemoved = io_basePropertyChanges.remove;\n\n // Insert the inserted entries\n\n // If no typeids are included, we just use a placeholder for the iteration below\n const insertedTypeids = isPrimitiveTypeid ? [undefined] : Object.keys(in_appliedPropertyChanges.insert);\n for (let i = 0; i < insertedTypeids.length; i++) {\n let typeid = insertedTypeids[i];\n const insertedEntries = isPrimitiveTypeid ?\n in_appliedPropertyChanges.insert : in_appliedPropertyChanges.insert[typeid];\n const insertedKeys = Object.keys(insertedEntries);\n let removalCS;\n if (baseRemoved) {\n removalCS = isPrimitiveTypeid ? baseRemoved : baseRemoved[typeid];\n }\n for (let j = 0; j < insertedKeys.length; j++) {\n let key = insertedKeys[j];\n let deeplyEqualCS = false;\n\n // If we have a complex type in the collection, we need to do a deep comparison of the two\n // ChangeSets to determine, whether they are equal\n // TODO: We should actually compute a diff between the two and recursively convert portions to modifies\n // Instead, right now, we only handle the case where the two keys cancel each out perfectly, i.e.,\n // the insert is reinserting exactly what was removed.\n if (!isPrimitiveTypeid && removalCS && isObject(removalCS) && removalCS[key] !== undefined) {\n // Split out the two parts: all the keys other than remove/insert should match exactly.\n // The contents 'remove' and 'insert', if they exist, should also match.\n deeplyEqualCS = !!insertedEntries[key].insert === !!removalCS[key].remove;\n\n // If there are 'insert' and 'remove', see if the removed data matches the inserted data\n if (deeplyEqualCS && insertedEntries[key].insert) {\n deeplyEqualCS = isEqual(\n insertedEntries[key].insert,\n removalCS[key].remove,\n );\n }\n\n // Finally, check if the data being inserted matches the data that was removed\n const insertedEntry = isObject(insertedEntries[key]) ? without(insertedEntries[key], \"insert\") : insertedEntries[key];\n const removedEntry = isObject(removalCS[key]) ? without(removalCS[key], \"remove\") : removalCS[key];\n deeplyEqualCS = deeplyEqualCS && isEqual(insertedEntry, removedEntry);\n }\n\n if ((isPrimitiveTypeid || TypeIdHelper.isPrimitiveType(typeid) || deeplyEqualCS) &&\n removalCS &&\n ((Array.isArray(removalCS) && includes(baseRemoved, key)) || removalCS[key] !== undefined)) {\n // A remove and insert are combined into a modify for primitive types\n\n // Remove the old remove command\n let oldValueMatches = false;\n if (Array.isArray(removalCS)) {\n if (isPrimitiveTypeid) {\n io_basePropertyChanges.remove = without(io_basePropertyChanges.remove, key);\n } else {\n io_basePropertyChanges.remove[typeid] = without(io_basePropertyChanges.remove[typeid], key);\n }\n } else {\n oldValueMatches = deeplyEqualCS || (removalCS[key] === insertedEntries[key]);\n delete removalCS[key];\n }\n\n // Insert a modify command instead\n if (!oldValueMatches) {\n io_basePropertyChanges.modify = io_basePropertyChanges.modify || {};\n if (isPrimitiveTypeid) {\n io_basePropertyChanges.modify[key] = insertedEntries[key];\n } else {\n io_basePropertyChanges.modify[typeid] = io_basePropertyChanges.modify[typeid] || {};\n io_basePropertyChanges.modify[typeid][key] = cloneDeep(insertedEntries[key]);\n }\n }\n } else if (isPrimitiveTypeid && baseInserted[key] === undefined) {\n baseInserted[key] = insertedEntries[key];\n } else if (!isPrimitiveTypeid && (!baseInserted[typeid] || baseInserted[typeid][key] === undefined)) {\n baseInserted[typeid] = baseInserted[typeid] || {};\n baseInserted[typeid][key] = cloneDeep(insertedEntries[key]);\n } else {\n throw new Error(MSG.ALREADY_EXISTING_ENTRY + key);\n }\n }\n }\n }\n\n // Handle modification operations\n if (in_appliedPropertyChanges.modify) {\n // Get and initialize the corresponding entries from the existing collection\n const modifiedEntries = in_appliedPropertyChanges.modify;\n io_basePropertyChanges = io_basePropertyChanges || {};\n io_basePropertyChanges.modify = io_basePropertyChanges.modify || {};\n let baseModified = io_basePropertyChanges.modify;\n let baseInserted = io_basePropertyChanges.insert || {};\n\n // Process the modifications\n\n // If no typeids are included, we just use a placeholder for the iteration below\n const modifiedTypeids = isPrimitiveTypeid ? [undefined] : Object.keys(modifiedEntries);\n for (let i = 0; i < modifiedTypeids.length; i++) {\n let typeid = modifiedTypeids[i];\n\n const modifyKeys = Object.keys(isPrimitiveTypeid ? modifiedEntries : modifiedEntries[typeid]);\n for (let j = 0; j < modifyKeys.length; j++) {\n let key = modifyKeys[j];\n\n if (isPrimitiveTypeid) {\n let newValue = modifiedEntries[key];\n if (newValue && newValue.hasOwnProperty(\"value\")) {\n newValue = newValue.value;\n }\n if (baseInserted[key] !== undefined) {\n // If this entry was added by this ChangeSet, we modify the insert operation according to the\n // new ChangeSet\n baseInserted[key] = newValue;\n } else {\n if (baseModified[key] && baseModified[key].hasOwnProperty(\"value\")) {\n baseModified[key].value = newValue;\n } else {\n baseModified[key] = newValue;\n }\n }\n } else {\n // If this is a polymorphic collection, we can still have individual entries with\n // primitive types\n const isEntryPrimitiveType = TypeIdHelper.isPrimitiveType(typeid);\n\n if (baseInserted[typeid] && baseInserted[typeid][key] !== undefined) {\n // If this entry was added by this ChangeSet, we modify the insert operation according to the\n // new ChangeSet\n if (isEntryPrimitiveType && typeid !== \"String\") {\n let newValue = modifiedEntries[typeid][key];\n if (newValue && newValue.hasOwnProperty(\"value\")) {\n newValue = modifiedEntries[typeid][key].value;\n }\n\n // In the case of Int64 or Uint64 we copy the array so that\n // both ChangeSets don't point to the same instance\n if (typeid === \"Int64\" || typeid === \"Uint64\") {\n newValue = newValue.slice();\n }\n\n if (baseInserted[typeid][key] && baseInserted[typeid][key].hasOwnProperty(\"value\")) {\n baseInserted[typeid][key].value = newValue;\n } else {\n baseInserted[typeid][key] = newValue;\n }\n } else {\n this.performApplyAfterOnPropertyWithTypeid(key,\n baseInserted[typeid],\n modifiedEntries[typeid],\n typeid,\n false,\n in_options);\n }\n } else if (baseModified[typeid] && baseModified[typeid][key] !== undefined) {\n // If there was a previous modification operation, we have to merge the two\n if (isEntryPrimitiveType && typeid !== \"String\") {\n // Primitive types can simply be overwritten, however we have an exception for\n // 64 bit integers (until javascript natively supports them)\n if (typeid === \"Int64\" || typeid === \"Uint64\") {\n let appliedVal = modifiedEntries[typeid][key];\n if (appliedVal && appliedVal.hasOwnProperty(\"value\")) {\n appliedVal = appliedVal.value;\n }\n baseModified[typeid][key] = appliedVal.slice();\n } else {\n baseModified[typeid][key] = modifiedEntries[typeid][key];\n }\n } else {\n this.performApplyAfterOnPropertyWithTypeid(key,\n baseModified[typeid],\n modifiedEntries[typeid],\n typeid,\n true,\n in_options);\n }\n } else {\n baseModified[typeid] = baseModified[typeid] || {};\n baseModified[typeid][key] = cloneDeep(modifiedEntries[typeid][key]);\n }\n }\n }\n }\n }\n\n // Remove unnecessary entries from the ChangeSet\n this._cleanIndexedCollectionChangeSet(io_basePropertyChanges, !isPrimitiveTypeid);\n }\n\n /**\n * Performs the rebase operation for set and map collections\n *\n * @param in_ownPropertyChangeSet - The ChangeSet for this collection\n * @param io_rebasePropertyChangeSet - The ChangeSet for the collection to be rebased\n * @param in_basePath - Base path to get to the property processed by this function\n * @param in_typeid - The typeid of the contents collection (without the collection type)\n * @param in_useSquareBracketsInPath -\n * If set to true, paths will be created using the angular brackets syntax (for\n * arrays), otherwise dots will be used (for NodeProperties)\n * @param out_conflicts - A list of paths that resulted in conflicts together with the type of the conflict\n * @param in_options - Optional additional parameters\n * @param in_options.applyAfterMetaInformation - Additional meta information which help later to obtain\n * more compact changeset during the apply operation\n *\n * @private\n */\n export const _rebaseIndexedCollectionChangeSetForProperty = function(\n in_ownPropertyChangeSet: SerializedChangeSet, // eslint-disable-line complexity\n io_rebasePropertyChangeSet: SerializedChangeSet,\n in_basePath: string,\n in_typeid: string,\n in_useSquareBracketsInPath: boolean,\n out_conflicts: ConflictInfo[],\n in_options: ApplyChangeSetOptions) {\n const isPrimitiveTypeid = TypeIdHelper.isPrimitiveType(in_typeid);\n\n const changesByKeys = {};\n let modifyMap = {};\n // Helper function which stores the changes indexed by key in the changesByKeys array to\n // make it easier to compare the related changes in the two ChangeSets\n const addChanges = function(in_collection: Record<string, any>, in_changeIdentifier: string, in_changePrefix: string, in_typeidChange?: string) {\n // Collection didn't exist in this ChangeSet\n if (in_collection === undefined) {\n return;\n }\n\n // For remove operations, the ChangeSet is only an array of keys, otherwise it is a map, so we have to\n // distinguish the two cases here\n const keys = Array.isArray(in_collection) ? in_collection : Object.keys(in_collection);\n\n // Add all entries indexed with the key\n for (let j = 0; j < keys.length; j++) {\n const key = keys[j];\n\n // Store the type of the change\n changesByKeys[key] = changesByKeys[key] || {};\n changesByKeys[key][in_changePrefix] = changesByKeys[key][in_changePrefix] ?\n `${changesByKeys[key][in_changePrefix]}_${in_changeIdentifier}` :\n in_changeIdentifier;\n\n // If applicable store the typeid of the change\n if (in_typeidChange) {\n changesByKeys[key][`${in_changePrefix}Typeid`] = in_typeidChange;\n }\n\n // Store the ChangeSet\n if (in_changePrefix === \"other\") {\n if (!Array.isArray(in_collection)) {\n changesByKeys[key].change = in_collection[key];\n } else {\n changesByKeys[key].change = key;\n }\n }\n }\n };\n\n // Helper function which adds the Changes for a ChangeSet that is ordered by typeid\n const addChangesWithTypeids = function (in_collection, in_changeIdentifier, in_changePrefix) {\n if (in_collection === undefined) {\n return;\n }\n // Iterate over the typeids (or use dummy entry for the iteration\n const addedKeyTypeids = Object.keys(in_collection);\n for (let i = 0; i < addedKeyTypeids.length; i++) {\n const Typeid = addedKeyTypeids[i];\n addChanges(in_collection[Typeid], in_changeIdentifier, in_changePrefix, Typeid);\n }\n };\n\n // Insert all changes from the ChangeSet into the lookup map\n if (Array.isArray(in_ownPropertyChangeSet.remove)) {\n addChanges(in_ownPropertyChangeSet.remove, \"remove\", \"own\");\n } else {\n if (isPrimitiveTypeid) {\n addChanges(in_ownPropertyChangeSet.remove, \"remove\", \"own\");\n } else {\n addChangesWithTypeids(in_ownPropertyChangeSet.remove, \"remove\", \"own\");\n }\n }\n\n if (Array.isArray(io_rebasePropertyChangeSet.remove)) {\n addChanges(io_rebasePropertyChangeSet.remove, \"remove\", \"other\");\n } else {\n if (isPrimitiveTypeid) {\n addChanges(io_rebasePropertyChangeSet.remove, \"remove\", \"other\");\n } else {\n addChangesWithTypeids(io_rebasePropertyChangeSet.remove, \"remove\", \"other\");\n }\n }\n\n if (isPrimitiveTypeid) {\n addChanges(in_ownPropertyChangeSet.insert, \"insert\", \"own\");\n addChanges(in_ownPropertyChangeSet.modify, \"modify\", \"own\");\n addChanges(io_rebasePropertyChangeSet.insert, \"insert\", \"other\");\n addChanges(io_rebasePropertyChangeSet.modify, \"modify\", \"other\");\n } else {\n addChangesWithTypeids(in_ownPropertyChangeSet.insert, \"insert\", \"own\");\n addChangesWithTypeids(in_ownPropertyChangeSet.modify, \"modify\", \"own\");\n addChangesWithTypeids(io_rebasePropertyChangeSet.insert, \"insert\", \"other\");\n addChangesWithTypeids(io_rebasePropertyChangeSet.modify, \"modify\", \"other\");\n }\n\n // Check for modifications that affect the same object\n const changedKeys = Object.keys(changesByKeys);\n for (let i = 0; i < changedKeys.length; i++) {\n const key = changedKeys[i];\n const newPath = in_useSquareBracketsInPath ?\n `${in_basePath}[${PathHelper.quotePathSegmentIfNeeded(key)}]` :\n joinPaths(in_basePath, PathHelper.quotePathSegmentIfNeeded(key), PROPERTY_PATH_DELIMITER);\n\n const modification = changesByKeys[key];\n if (modification.own && modification.other) {\n /*\n We found a key that was changed by both ChangeSets at the same time\n We now have to handle the conflicting changes. The changes we do, are summarized in this table:\n\n <START REBASE HANDLING TABLE>\n +-------+-----------------+------------------+-------------------+-------------------------------------+\n | \\Own| insert | modify | remove | remove+insert |\n | \\ | | | | |\n |other\\ | | | | |\n +=======+=================+==================+===================+=====================================+\n | | conflicting | incompatible | incompatible | incompatible |\n |insert | inserts | psets | psets | psets |\n | | | | | |\n +-------+-----------------+------------------+-------------------+-------------------------------------+\n | | incompatible | merge recursively| conflict | conflict |\n |modify | psets | (conflicting on | | (modify can not be applied due to |\n | | | leaf) | - delete modify | to incompatible base) |\n | | | | in other | |\n | | | | | - delete modify in other |\n +-------+-----------------+------------------+-------------------+-------------------------------------+\n | | incompatible | non-conflicting | non-conflicting | incompatible |\n |remove | psets | change | change | psets |\n | | | | | |\n | | | | - rem dupl. remove| |\n +-------+-----------------+------------------+-------------------+-------------------------------------+\n | | incompatible | non-conflicting | non-conflicting | conflict |\n |remove+| psets | change | change | |\n |insert | | | | - remove conflicting insert |\n | | | | - rem dupl. remove| |\n +-------+-----------------+------------------+-------------------+-------------------------------------+\n <END REBASE HANDLING TABLE>\n */\n\n // A key was modified after it had been removed\n if (modification.own === \"modify\" && modification.other === \"modify\") {\n if (isPrimitiveTypeid ||\n (TypeIdHelper.isPrimitiveType(modification.ownTypeid) && modification.ownTypeid !== \"String\")) {\n // We have two modification operations that affect the same entry for a base type.\n // This is a legal operation, the second one will overwrite the first one, but we\n // report it as a possible conflict\n let ownModify = in_ownPropertyChangeSet.modify;\n let rebasedModify = io_rebasePropertyChangeSet.modify;\n if (modification.otherTypeid) {\n ownModify = ownModify[modification.otherTypeid];\n rebasedModify = rebasedModify[modification.otherTypeid];\n }\n\n let conflict = {\n path: newPath,\n type: ConflictType.COLLIDING_SET,\n conflictingChange: ownModify[key],\n };\n out_conflicts.push(conflict);\n // If value is the same, delete the entry\n let ownValue = ownModify[key];\n if (typeof ownValue === \"object\" && ownValue.hasOwnProperty(\"value\")) {\n ownValue = ownValue.value;\n }\n let rebaseValue = rebasedModify[key];\n if (typeof rebaseValue === \"object\" && rebaseValue.hasOwnProperty(\"value\")) {\n rebaseValue = rebaseValue.value;\n }\n if (modification.ownTypeid === \"Int64\" || modification.ownTypeid === \"Uint64\" || ownValue.length === 2) {\n // For (u)int64, values are arrays of 2 elements\n if (ownValue[0] === rebaseValue[0] && ownValue[1] === rebaseValue[1]) {\n delete rebasedModify[key];\n }\n } else {\n if (ownValue === rebaseValue) {\n delete rebasedModify[key];\n }\n }\n } else {\n this.rebaseChangeSetForPropertyEntryWithTypeid(key,\n in_ownPropertyChangeSet.modify[modification.ownTypeid],\n io_rebasePropertyChangeSet.modify[modification.otherTypeid],\n modification.ownTypeid,\n newPath,\n true,\n out_conflicts,\n in_options);\n }\n } else if (modification.own === \"remove\" && modification.other === \"modify\") {\n modifyMap = modification.otherTypeid ? io_rebasePropertyChangeSet.modify[modification.otherTypeid] :\n io_rebasePropertyChangeSet.modify;\n\n // Create the conflict information\n let conflict = {\n path: newPath,\n type: ConflictType.ENTRY_MODIFIED_AFTER_REMOVE,\n conflictingChange: modifyMap[key],\n };\n out_conflicts.push(conflict);\n\n // Delete the modification from the rebased ChangeSet\n delete modifyMap[key];\n } else if (modification.own === \"remove_insert\" && modification.other === \"modify\") {\n // We have a conflicting change. A node was removed and inserted (replaced) in the original\n // ChangeSet and then modified by the rebased ChangeSet. Since the base of the modification\n // can have been changed significantly by this operation, we don't know whether we can\n // apply the modification\n\n // Create the conflict information\n let conflict = {\n path: newPath,\n type: ConflictType.ENTRY_MODIFICATION_AFTER_REMOVE_INSERT,\n conflictingChange: io_rebasePropertyChangeSet.modify[modification.otherTypeid][key],\n };\n out_conflicts.push(conflict);\n\n // Delete the modification from the rebased ChangeSet\n delete io_rebasePropertyChangeSet.modify[key];\n } else if ((modification.own === \"modify\" || modification.own === \"remove\") &&\n (modification.other === \"remove\" || modification.other === \"remove_insert\")) {\n if (modification.own === \"modify\") {\n modifyMap = modification.ownTypeid ? in_ownPropertyChangeSet.modify[modification.ownTypeid] :\n in_ownPropertyChangeSet.modify;\n\n // Create the conflict information\n let conflict = {\n path: newPath,\n type: ConflictType.REMOVE_AFTER_MODIFY,\n conflictingChange: modifyMap[key],\n };\n out_conflicts.push(conflict);\n }\n\n // If we have a duplicated delete, we remove it from the new ChangeSet\n if (modification.own === \"remove\") {\n if (Array.isArray(io_rebasePropertyChangeSet.remove)) {\n io_rebasePropertyChangeSet.remove = without(io_rebasePropertyChangeSet.remove, key);\n } else {\n if (isPrimitiveTypeid) {\n delete io_rebasePropertyChangeSet.remove[key];\n } else {\n delete io_rebasePropertyChangeSet.remove[modification.otherTypeid][key];\n }\n }\n }\n } else if (modification.own === \"insert\" && modification.other === \"insert\") {\n if (isPrimitiveTypeid ||\n (TypeIdHelper.isPrimitiveType(modification.ownTypeid))) {\n let insertMap = modification.otherTypeid ? io_rebasePropertyChangeSet.insert[modification.otherTypeid] :\n io_rebasePropertyChangeSet.insert;\n\n // We have two insert operations that affect the same key for a primitive type.\n // This is a legal operation, the second one will overwrite the first one, but we\n // report it as a possible conflicting set\n let conflict = {\n path: newPath,\n type: ConflictType.COLLIDING_SET,\n conflictingChange: insertMap[key],\n };\n out_conflicts.push(conflict);\n\n // Convert to modify\n let oldValue;\n if (modification.otherTypeid) {\n io_rebasePropertyChangeSet.modify = io_rebasePropertyChangeSet.modify || {};\n io_rebasePropertyChangeSet.modify[modification.otherTypeid] =\n io_rebasePropertyChangeSet.modify[modification.otherTypeid] || {};\n modifyMap = io_rebasePropertyChangeSet.modify[modification.otherTypeid];\n oldValue = in_ownPropertyChangeSet.insert[modification.ownTypeid][key];\n } else {\n io_rebasePropertyChangeSet.modify = io_rebasePropertyChangeSet.modify || {};\n modifyMap = io_rebasePropertyChangeSet.modify;\n oldValue = in_ownPropertyChangeSet.insert[key];\n }\n\n modifyMap[key] = { value: insertMap[key], oldValue };\n delete insertMap[key];\n } else {\n // Here we have two insert operations for objects. Since these affect a whole sub-tree and not\n // just a single value, we cannot easily convert it into a modify and instead report it as invalid\n\n let insertMap = modification.otherTypeid ? io_rebasePropertyChangeSet.insert[modification.otherTypeid] :\n io_rebasePropertyChangeSet.insert;\n\n // Create the conflict information\n let conflict = {\n path: newPath,\n type: ConflictType.INSERTED_ENTRY_WITH_SAME_KEY,\n conflictingChange: insertMap[key],\n };\n out_conflicts.push(conflict);\n\n // Delete the modification from the rebased ChangeSet\n delete insertMap[key];\n }\n } else if (modification.own === \"remove_insert\" && modification.other === \"remove_insert\") {\n let insertMap = modification.otherTypeid ? io_rebasePropertyChangeSet.insert[modification.otherTypeid] :\n io_rebasePropertyChangeSet.insert;\n\n // Raise the duplicate inserts as a conflict\n let conflict = {\n path: newPath,\n type: ConflictType.COLLIDING_SET,\n conflictingChange: insertMap[key],\n };\n out_conflicts.push(conflict);\n } else {\n // All other operations are conflicting changes, which only occur for ChangeSets that are relative\n // to different bases\n\n // Create the conflict information\n let conflict = {\n path: newPath,\n type: ConflictType.INVALID_CHANGESET_BASE,\n conflictingChange: modification.change,\n };\n out_conflicts.push(conflict);\n\n // Remove the change from the ChangeSet\n if (modification.other !== \"remove\") {\n if (modification.otherTypeid !== undefined) {\n delete io_rebasePropertyChangeSet[modification.other][modification.otherTypeid][key];\n } else {\n delete io_rebasePropertyChangeSet[modification.other][key];\n }\n } else {\n // Remove remove operations from the ChangeSet\n if (Array.isArray(io_rebasePropertyChangeSet[modification.other])) {\n io_rebasePropertyChangeSet[modification.other] =\n without(io_rebasePropertyChangeSet[modification.other], key);\n } else {\n delete io_rebasePropertyChangeSet[modification.other][key];\n }\n }\n\n console.error(\"Rebase operation with conflicting ChangeSets. Probably incorrect bases.\");\n }\n }\n }\n\n // Remove unnecessary entries from the ChangeSet\n this._cleanIndexedCollectionChangeSet(io_rebasePropertyChangeSet, !isPrimitiveTypeid);\n }\n\n /**\n * Removes empty entries from the .children collection of the ChangeSet\n *\n * @param in_propertyChanges - The ChangeSet to clean up\n * @param in_containsTypeids - Does this ChangeSet contain typeids\n * @private\n */\n export const _cleanIndexedCollectionChangeSet = function(in_propertyChanges: SerializedChangeSet, in_containsTypeids: boolean) {\n const changes = in_propertyChanges;\n // Clean inserts\n\n // First remove unused typeid sections\n if (in_containsTypeids) {\n let typeidList = Object.keys(changes.insert || {});\n for (let j = 0; j < typeidList.length; j++) {\n if (_fastIsEmptyObject(changes.insert[typeidList[j]])) {\n delete changes.insert[typeidList[j]];\n }\n }\n }\n\n // Remove add group if no operations are present\n if (_fastIsEmptyObject(changes.insert)) {\n delete changes.insert;\n }\n\n // First remove unused typeid sections\n if (in_containsTypeids) {\n let typeidList = Object.keys(changes.remove || {});\n for (let j = 0; j < typeidList.length; j++) {\n if (_fastIsEmptyObject(changes.remove[typeidList[j]])) {\n delete changes.remove[typeidList[j]];\n }\n }\n }\n // Remove remove group if no operations are present\n if (_fastIsEmptyObject(changes.remove)) {\n delete changes.remove;\n }\n\n // Clean modifies\n\n // First remove unused typeid sections\n if (in_containsTypeids) {\n let typeidList = Object.keys(changes.modify || {});\n for (let j = 0; j < typeidList.length; j++) {\n const modifies = changes.modify[typeidList[j]];\n const modifyKeys = Object.keys(modifies);\n for (let k = 0; k < modifyKeys.length; k++) {\n if (isEmptyChangeSet(modifies[modifyKeys[k]])) {\n delete modifies[modifyKeys[k]];\n }\n }\n if (_fastIsEmptyObject(changes.modify[typeidList[j]])) {\n delete changes.modify[typeidList[j]];\n }\n }\n }\n\n // Remove modify group if no operations are present\n if (_fastIsEmptyObject(changes.modify)) {\n delete changes.modify;\n }\n }\n};\n"]}
|
|
1
|
+
{"version":3,"file":"indexedCollection.js","sourceRoot":"","sources":["../../src/changeset_operations/indexedCollection.ts"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;GAEG;;;;;;AAEF,yDAAoD;AACpD,6DAAqC;AACrC,6DAAqC;AACrC,+DAAuC;AACvC,6DAAqC;AACrC,+DAAuC;AAExC,YAAY;AACZ,yEAA2E;AAE3E,0DAAuD;AACvD,8CAA2C;AAC3C,qEAAwD;AACxD,yDAAsD;AAEtD,MAAM,EAAE,uBAAuB,EAAE,GAAG,EAAE,GAAG,2BAAS,CAAC;AAEnD;;;;GAIG;AAEH;;;;;;;;;GASG;AACH,MAAM,kBAAkB,GAAG,UAAS,SAAc;IAC9C,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,kBAAQ,CAAC,SAAS,CAAC,EAAE;QAChE,OAAO,iBAAO,CAAC,SAAS,CAAC,CAAC;KAC7B;IAED,wCAAwC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OAAO,OAAO,CAAC,MAAM,CAAC;SACzB;QAED,iBAAiB;QAEjB,sCAAsC;QACtC,IAAI,kBAAkB,EAAE;YACpB,IAAI,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;YACnD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACxC,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC/C,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBACxC,IAAI,mCAAgB,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;wBAC3C,OAAO,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;qBAClC;iBACJ;gBACD,IAAI,kBAAkB,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;oBACnD,OAAO,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;iBACxC;aACJ;SACJ;QAED,mDAAmD;QACnD,IAAI,kBAAkB,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YACpC,OAAO,OAAO,CAAC,MAAM,CAAC;SACzB;IACL,CAAC,CAAA;AACL,CAAC,EA/vBgB,mCAAmC,GAAnC,2CAAmC,KAAnC,2CAAmC,QA+vBnD;AAAA,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview Helper functions and classes to work with ChangeSets with indexed collections (sets and maps)\n */\n\n import {copy as cloneDeep} from \"fastest-json-copy\";\n import isEmpty from \"lodash/isEmpty\";\n import isEqual from \"lodash/isEqual\";\n import isObject from \"lodash/isObject\";\n import without from \"lodash/without\";\n import includes from \"lodash/includes\";\n\n//@ts-ignore\nimport { constants, joinPaths } from \"@fluid-experimental/property-common\";\nimport { ApplyChangeSetOptions, ConflictInfo, SerializedChangeSet } from \"../changeset\";\nimport { TypeIdHelper } from \"../helpers/typeidHelper\";\nimport { PathHelper } from \"../pathHelper\";\nimport { ConflictType } from \"./changesetConflictTypes\";\nimport { isEmptyChangeSet } from \"./isEmptyChangeset\";\n\nconst { PROPERTY_PATH_DELIMITER, MSG } = constants;\n\n/**\n * @namespace property-changeset.ChangeSetOperations.IndexedCollectionOperations\n * @alias property-changeset.ChangeSetOperations.IndexedCollectionOperations\n * Helper functions and classes to perform operations on ChangeSets with indexed collections (sets and maps)\n */\n\n/**\n * Checks whether an object is empty (has no keys)\n * This function should be a bit faster than the isEmpty from\n * underscore. Unfortunately, at least on Chrome, it is still in\n * O(n)\n *\n * @param in_object - The object to check\n * @returns Is it empty?\n * @private\n */\nconst _fastIsEmptyObject = function(in_object: any): boolean {\n if (!in_object || Array.isArray(in_object) || !isObject(in_object)) {\n return isEmpty(in_object);\n }\n\n // eslint-disable-next-line guard-for-in\n for (const _entry in in_object) {\n return false;\n }\n\n return true;\n};\n\nexport namespace ChangeSetIndexedCollectionFunctions {\n /**\n * Applies a ChangeSet to a given indexed collection property (recursively). The ChangeSet is assumed to be relative\n * to the same property root and it will be applied behind the base ChangeSet (assuming that the changes are\n * relative to the state after the base ChangeSet has been applied. It will change the base ChangeSet.\n *\n * @param io_basePropertyChanges - The ChangeSet describing the initial state\n * @param in_appliedPropertyChanges - The ChangeSet to apply to this state\n * @param in_typeid - The typeid of the contents collection\n * (without the collection type)\n * @param in_options - Optional additional parameters\n * @param in_options.applyAfterMetaInformation - Additional meta information which help later to obtain\n * more compact changeset during the apply operation\n *\n * @private\n */\n export const _performApplyAfterOnPropertyIndexedCollection = function(\n io_basePropertyChanges: SerializedChangeSet, // eslint-disable-line complexity\n in_appliedPropertyChanges: SerializedChangeSet,\n in_typeid: string,\n in_options: ApplyChangeSetOptions) {\n const isPrimitiveTypeid = TypeIdHelper.isPrimitiveType(in_typeid);\n\n // Handle remove entry operations\n if (in_appliedPropertyChanges.remove) {\n // Get and initialize the corresponding entries in the existing collection\n let removedEntries = in_appliedPropertyChanges.remove;\n\n io_basePropertyChanges = io_basePropertyChanges || {};\n io_basePropertyChanges.remove = io_basePropertyChanges.remove ||\n (Array.isArray(in_appliedPropertyChanges.remove) ? [] : {});\n let baseInserted = io_basePropertyChanges.insert || {};\n let baseRemoved = io_basePropertyChanges.remove;\n let baseModified = io_basePropertyChanges.modify;\n let done = false;\n\n if (!Array.isArray(removedEntries)) {\n if (isPrimitiveTypeid) {\n removedEntries = Object.keys(removedEntries);\n } else {\n // this is a reversible change set of templated types\n const removedTypes = Object.keys(removedEntries);\n for (let t = 0; t < removedTypes.length; t++) {\n const removedKeys = Object.keys(removedEntries[removedTypes[t]]);\n for (let i = 0; i < removedKeys.length; i++) {\n if (baseInserted[removedTypes[t]] &&\n baseInserted[removedTypes[t]][removedKeys[i]] !== undefined) {\n delete baseInserted[removedTypes[t]][removedKeys[i]];\n\n // If all entries for a typeid have been removed, we can remove\n // the whole typeid from the inserted section\n if (baseInserted && isEmpty(baseInserted[removedTypes[t]])) {\n delete baseInserted[removedTypes[t]];\n }\n } else {\n if (baseModified && baseModified[removedTypes[t]] &&\n baseModified[removedTypes[t]][removedKeys[i]] !== undefined) {\n delete baseModified[removedTypes[t]][removedKeys[i]];\n\n // If all entries for a typeid have been removed, we can remove\n // the whole typeid from the inserted section\n if (baseModified && isEmpty(baseModified[removedTypes[t]])) {\n delete baseModified[removedTypes[t]];\n }\n }\n if (Array.isArray(baseRemoved)) {\n baseRemoved.push(removedKeys[i]);\n } else {\n if (!baseRemoved[removedTypes[t]]) {\n baseRemoved[removedTypes[t]] = {};\n }\n baseRemoved[removedTypes[t]][removedKeys[i]] = removedEntries[removedTypes[t]][removedKeys[i]];\n }\n }\n }\n }\n done = true;\n }\n }\n\n if (!done) {\n if (isPrimitiveTypeid) {\n for (let i = 0; i < removedEntries.length; i++) {\n let key = removedEntries[i];\n\n // If there is an insert for this key, we just remove it\n if (baseInserted[key] !== undefined) {\n delete baseInserted[key];\n } else {\n // There could be a modify entry for this key, which we have to remove\n if (baseModified && baseModified[key] !== undefined) {\n delete baseModified[key];\n }\n\n // Otherwise we add it to the remove list\n if (Array.isArray(baseRemoved)) {\n baseRemoved.push(key);\n } else {\n baseRemoved[key] = in_appliedPropertyChanges.remove[key];\n }\n }\n }\n } else {\n const baseInsertedTypeids = Object.keys(baseInserted);\n for (let i = 0; i < removedEntries.length; i++) {\n let key = removedEntries[i];\n let foundInTypeid;\n\n // Since we only have a flat remove list (without typeid) in the changeset, we have\n // to check all inserts\n for (let j = 0; j < baseInsertedTypeids.length; j++) {\n if (baseInserted[baseInsertedTypeids[j]] &&\n baseInserted[baseInsertedTypeids[j]][key] !== undefined) {\n foundInTypeid = baseInsertedTypeids[j];\n break;\n }\n }\n\n if (foundInTypeid) {\n // If this key was inserted by this ChangeSet, we just remove it from the inserted list\n delete baseInserted[foundInTypeid][key];\n\n // If all entries for a typeid have been removed, we can remove\n // the whole typeid from the inserted or modified section\n if (baseInserted && isEmpty(baseInserted[foundInTypeid])) {\n delete baseInserted[foundInTypeid];\n }\n if (baseModified && isEmpty(baseModified[foundInTypeid])) {\n delete baseModified[foundInTypeid];\n }\n } else {\n // There could be a modify entry for this key, which we have to remove\n const baseModifiedTypeids = Object.keys(baseModified || {});\n for (let j = 0; j < baseModifiedTypeids.length; j++) {\n if (baseModified[baseModifiedTypeids[j]][key]) {\n foundInTypeid = baseModifiedTypeids[j];\n delete baseModified[foundInTypeid][key];\n break;\n }\n }\n\n // Otherwise we add it to the remove list\n baseRemoved.push(key);\n }\n }\n }\n }\n };\n\n // Apply insert operations\n if (in_appliedPropertyChanges.insert) {\n // Get and initialize the corresponding entries from the existing collection\n io_basePropertyChanges = io_basePropertyChanges || {};\n io_basePropertyChanges.insert = io_basePropertyChanges.insert || {};\n let baseInserted = io_basePropertyChanges.insert;\n let baseRemoved = io_basePropertyChanges.remove;\n\n // Insert the inserted entries\n\n // If no typeids are included, we just use a placeholder for the iteration below\n const insertedTypeids = isPrimitiveTypeid ? [undefined] : Object.keys(in_appliedPropertyChanges.insert);\n for (let i = 0; i < insertedTypeids.length; i++) {\n let typeid = insertedTypeids[i];\n const insertedEntries = isPrimitiveTypeid ?\n in_appliedPropertyChanges.insert : in_appliedPropertyChanges.insert[typeid];\n const insertedKeys = Object.keys(insertedEntries);\n let removalCS;\n if (baseRemoved) {\n removalCS = isPrimitiveTypeid ? baseRemoved : baseRemoved[typeid];\n }\n for (let j = 0; j < insertedKeys.length; j++) {\n let key = insertedKeys[j];\n let deeplyEqualCS = false;\n\n // If we have a complex type in the collection, we need to do a deep comparison of the two\n // ChangeSets to determine, whether they are equal\n // TODO: We should actually compute a diff between the two and recursively convert portions to modifies\n // Instead, right now, we only handle the case where the two keys cancel each out perfectly, i.e.,\n // the insert is reinserting exactly what was removed.\n if (!isPrimitiveTypeid && removalCS && isObject(removalCS) && removalCS[key] !== undefined) {\n // Split out the two parts: all the keys other than remove/insert should match exactly.\n // The contents 'remove' and 'insert', if they exist, should also match.\n deeplyEqualCS = !!insertedEntries[key].insert === !!removalCS[key].remove;\n\n // If there are 'insert' and 'remove', see if the removed data matches the inserted data\n if (deeplyEqualCS && insertedEntries[key].insert) {\n deeplyEqualCS = isEqual(\n insertedEntries[key].insert,\n removalCS[key].remove,\n );\n }\n\n // Finally, check if the data being inserted matches the data that was removed\n const insertedEntry = isObject(insertedEntries[key]) ? without(insertedEntries[key], \"insert\") : insertedEntries[key];\n const removedEntry = isObject(removalCS[key]) ? without(removalCS[key], \"remove\") : removalCS[key];\n deeplyEqualCS = deeplyEqualCS && isEqual(insertedEntry, removedEntry);\n }\n\n if ((isPrimitiveTypeid || TypeIdHelper.isPrimitiveType(typeid) || deeplyEqualCS) &&\n removalCS &&\n ((Array.isArray(removalCS) && includes(baseRemoved, key)) || removalCS[key] !== undefined)) {\n // A remove and insert are combined into a modify for primitive types\n\n // Remove the old remove command\n let oldValueMatches = false;\n if (Array.isArray(removalCS)) {\n if (isPrimitiveTypeid) {\n io_basePropertyChanges.remove = without(io_basePropertyChanges.remove, key);\n } else {\n io_basePropertyChanges.remove[typeid] = without(io_basePropertyChanges.remove[typeid], key);\n }\n } else {\n oldValueMatches = deeplyEqualCS || (removalCS[key] === insertedEntries[key]);\n delete removalCS[key];\n }\n\n // Insert a modify command instead\n if (!oldValueMatches) {\n io_basePropertyChanges.modify = io_basePropertyChanges.modify || {};\n if (isPrimitiveTypeid) {\n io_basePropertyChanges.modify[key] = insertedEntries[key];\n } else {\n io_basePropertyChanges.modify[typeid] = io_basePropertyChanges.modify[typeid] || {};\n io_basePropertyChanges.modify[typeid][key] = cloneDeep(insertedEntries[key]);\n }\n }\n } else if (isPrimitiveTypeid && baseInserted[key] === undefined) {\n baseInserted[key] = insertedEntries[key];\n } else if (!isPrimitiveTypeid && (!baseInserted[typeid] || baseInserted[typeid][key] === undefined)) {\n baseInserted[typeid] = baseInserted[typeid] || {};\n baseInserted[typeid][key] = cloneDeep(insertedEntries[key]);\n } else {\n throw new Error(MSG.ALREADY_EXISTING_ENTRY + key);\n }\n }\n }\n }\n\n // Handle modification operations\n if (in_appliedPropertyChanges.modify) {\n // Get and initialize the corresponding entries from the existing collection\n const modifiedEntries = in_appliedPropertyChanges.modify;\n io_basePropertyChanges = io_basePropertyChanges || {};\n io_basePropertyChanges.modify = io_basePropertyChanges.modify || {};\n let baseModified = io_basePropertyChanges.modify;\n let baseInserted = io_basePropertyChanges.insert || {};\n\n // Process the modifications\n\n // If no typeids are included, we just use a placeholder for the iteration below\n const modifiedTypeids = isPrimitiveTypeid ? [undefined] : Object.keys(modifiedEntries);\n for (let i = 0; i < modifiedTypeids.length; i++) {\n let typeid = modifiedTypeids[i];\n\n const modifyKeys = Object.keys(isPrimitiveTypeid ? modifiedEntries : modifiedEntries[typeid]);\n for (let j = 0; j < modifyKeys.length; j++) {\n let key = modifyKeys[j];\n\n if (isPrimitiveTypeid) {\n let newValue = modifiedEntries[key];\n if (newValue && newValue.hasOwnProperty(\"value\")) {\n newValue = newValue.value;\n }\n if (baseInserted[key] !== undefined) {\n // If this entry was added by this ChangeSet, we modify the insert operation according to the\n // new ChangeSet\n baseInserted[key] = newValue;\n } else {\n if (baseModified[key] && baseModified[key].hasOwnProperty(\"value\")) {\n baseModified[key].value = newValue;\n } else {\n baseModified[key] = newValue;\n }\n }\n } else {\n // If this is a polymorphic collection, we can still have individual entries with\n // primitive types\n const isEntryPrimitiveType = TypeIdHelper.isPrimitiveType(typeid);\n\n if (baseInserted[typeid] && baseInserted[typeid][key] !== undefined) {\n // If this entry was added by this ChangeSet, we modify the insert operation according to the\n // new ChangeSet\n if (isEntryPrimitiveType && typeid !== \"String\") {\n let newValue = modifiedEntries[typeid][key];\n if (newValue && newValue.hasOwnProperty(\"value\")) {\n newValue = modifiedEntries[typeid][key].value;\n }\n\n // In the case of Int64 or Uint64 we copy the array so that\n // both ChangeSets don't point to the same instance\n if (typeid === \"Int64\" || typeid === \"Uint64\") {\n newValue = newValue.slice();\n }\n\n if (baseInserted[typeid][key] && baseInserted[typeid][key].hasOwnProperty(\"value\")) {\n baseInserted[typeid][key].value = newValue;\n } else {\n baseInserted[typeid][key] = newValue;\n }\n } else {\n this.performApplyAfterOnPropertyWithTypeid(key,\n baseInserted[typeid],\n modifiedEntries[typeid],\n typeid,\n false,\n in_options);\n }\n } else if (baseModified[typeid] && baseModified[typeid][key] !== undefined) {\n // If there was a previous modification operation, we have to merge the two\n if (isEntryPrimitiveType && typeid !== \"String\") {\n // Primitive types can simply be overwritten, however we have an exception for\n // 64 bit integers (until javascript natively supports them)\n if (typeid === \"Int64\" || typeid === \"Uint64\") {\n let appliedVal = modifiedEntries[typeid][key];\n if (appliedVal && appliedVal.hasOwnProperty(\"value\")) {\n appliedVal = appliedVal.value;\n }\n baseModified[typeid][key] = appliedVal.slice();\n } else {\n baseModified[typeid][key] = modifiedEntries[typeid][key];\n }\n } else {\n this.performApplyAfterOnPropertyWithTypeid(key,\n baseModified[typeid],\n modifiedEntries[typeid],\n typeid,\n true,\n in_options);\n }\n } else {\n baseModified[typeid] = baseModified[typeid] || {};\n baseModified[typeid][key] = cloneDeep(modifiedEntries[typeid][key]);\n }\n }\n }\n }\n }\n\n // Remove unnecessary entries from the ChangeSet\n this._cleanIndexedCollectionChangeSet(io_basePropertyChanges, !isPrimitiveTypeid);\n }\n\n /**\n * Performs the rebase operation for set and map collections\n *\n * @param in_ownPropertyChangeSet - The ChangeSet for this collection\n * @param io_rebasePropertyChangeSet - The ChangeSet for the collection to be rebased\n * @param in_basePath - Base path to get to the property processed by this function\n * @param in_typeid - The typeid of the contents collection (without the collection type)\n * @param in_useSquareBracketsInPath -\n * If set to true, paths will be created using the angular brackets syntax (for\n * arrays), otherwise dots will be used (for NodeProperties)\n * @param out_conflicts - A list of paths that resulted in conflicts together with the type of the conflict\n * @param in_options - Optional additional parameters\n * @param in_options.applyAfterMetaInformation - Additional meta information which help later to obtain\n * more compact changeset during the apply operation\n *\n * @private\n */\n export const _rebaseIndexedCollectionChangeSetForProperty = function(\n in_ownPropertyChangeSet: SerializedChangeSet, // eslint-disable-line complexity\n io_rebasePropertyChangeSet: SerializedChangeSet,\n in_basePath: string,\n in_typeid: string,\n in_useSquareBracketsInPath: boolean,\n out_conflicts: ConflictInfo[],\n in_options: ApplyChangeSetOptions) {\n const isPrimitiveTypeid = TypeIdHelper.isPrimitiveType(in_typeid);\n\n const changesByKeys = {};\n let modifyMap = {};\n // Helper function which stores the changes indexed by key in the changesByKeys array to\n // make it easier to compare the related changes in the two ChangeSets\n const addChanges = function(in_collection: Record<string, any>, in_changeIdentifier: string, in_changePrefix: string, in_typeidChange?: string) {\n // Collection didn't exist in this ChangeSet\n if (in_collection === undefined) {\n return;\n }\n\n // For remove operations, the ChangeSet is only an array of keys, otherwise it is a map, so we have to\n // distinguish the two cases here\n const keys = Array.isArray(in_collection) ? in_collection : Object.keys(in_collection);\n\n // Add all entries indexed with the key\n for (let j = 0; j < keys.length; j++) {\n const key = keys[j];\n\n // Store the type of the change\n changesByKeys[key] = changesByKeys[key] || {};\n changesByKeys[key][in_changePrefix] = changesByKeys[key][in_changePrefix] ?\n `${changesByKeys[key][in_changePrefix]}_${in_changeIdentifier}` :\n in_changeIdentifier;\n\n // If applicable store the typeid of the change\n if (in_typeidChange) {\n changesByKeys[key][`${in_changePrefix}Typeid`] = in_typeidChange;\n }\n\n // Store the ChangeSet\n if (in_changePrefix === \"other\") {\n if (!Array.isArray(in_collection)) {\n changesByKeys[key].change = in_collection[key];\n } else {\n changesByKeys[key].change = key;\n }\n }\n }\n };\n\n // Helper function which adds the Changes for a ChangeSet that is ordered by typeid\n const addChangesWithTypeids = function (in_collection, in_changeIdentifier, in_changePrefix) {\n if (in_collection === undefined) {\n return;\n }\n // Iterate over the typeids (or use dummy entry for the iteration\n const addedKeyTypeids = Object.keys(in_collection);\n for (let i = 0; i < addedKeyTypeids.length; i++) {\n const Typeid = addedKeyTypeids[i];\n addChanges(in_collection[Typeid], in_changeIdentifier, in_changePrefix, Typeid);\n }\n };\n\n // Insert all changes from the ChangeSet into the lookup map\n if (Array.isArray(in_ownPropertyChangeSet.remove)) {\n addChanges(in_ownPropertyChangeSet.remove, \"remove\", \"own\");\n } else {\n if (isPrimitiveTypeid) {\n addChanges(in_ownPropertyChangeSet.remove, \"remove\", \"own\");\n } else {\n addChangesWithTypeids(in_ownPropertyChangeSet.remove, \"remove\", \"own\");\n }\n }\n\n if (Array.isArray(io_rebasePropertyChangeSet.remove)) {\n addChanges(io_rebasePropertyChangeSet.remove, \"remove\", \"other\");\n } else {\n if (isPrimitiveTypeid) {\n addChanges(io_rebasePropertyChangeSet.remove, \"remove\", \"other\");\n } else {\n addChangesWithTypeids(io_rebasePropertyChangeSet.remove, \"remove\", \"other\");\n }\n }\n\n if (isPrimitiveTypeid) {\n addChanges(in_ownPropertyChangeSet.insert, \"insert\", \"own\");\n addChanges(in_ownPropertyChangeSet.modify, \"modify\", \"own\");\n addChanges(io_rebasePropertyChangeSet.insert, \"insert\", \"other\");\n addChanges(io_rebasePropertyChangeSet.modify, \"modify\", \"other\");\n } else {\n addChangesWithTypeids(in_ownPropertyChangeSet.insert, \"insert\", \"own\");\n addChangesWithTypeids(in_ownPropertyChangeSet.modify, \"modify\", \"own\");\n addChangesWithTypeids(io_rebasePropertyChangeSet.insert, \"insert\", \"other\");\n addChangesWithTypeids(io_rebasePropertyChangeSet.modify, \"modify\", \"other\");\n }\n\n // Check for modifications that affect the same object\n const changedKeys = Object.keys(changesByKeys);\n for (let i = 0; i < changedKeys.length; i++) {\n const key = changedKeys[i];\n const newPath = in_useSquareBracketsInPath ?\n `${in_basePath}[${PathHelper.quotePathSegmentIfNeeded(key)}]` :\n joinPaths(in_basePath, PathHelper.quotePathSegmentIfNeeded(key), PROPERTY_PATH_DELIMITER);\n\n const modification = changesByKeys[key];\n if (modification.own && modification.other) {\n /*\n We found a key that was changed by both ChangeSets at the same time\n We now have to handle the conflicting changes. The changes we do, are summarized in this table:\n\n <START REBASE HANDLING TABLE>\n +-------+-----------------+------------------+-------------------+-------------------------------------+\n | \\Own| insert | modify | remove | remove+insert |\n | \\ | | | | |\n |other\\ | | | | |\n +=======+=================+==================+===================+=====================================+\n | | conflicting | incompatible | incompatible | incompatible |\n |insert | inserts | psets | psets | psets |\n | | | | | |\n +-------+-----------------+------------------+-------------------+-------------------------------------+\n | | incompatible | merge recursively| conflict | conflict |\n |modify | psets | (conflicting on | | (modify can not be applied due to |\n | | | leaf) | - delete modify | to incompatible base) |\n | | | | in other | |\n | | | | | - delete modify in other |\n +-------+-----------------+------------------+-------------------+-------------------------------------+\n | | incompatible | non-conflicting | non-conflicting | incompatible |\n |remove | psets | change | change | psets |\n | | | | | |\n | | | | - rem dupl. remove| |\n +-------+-----------------+------------------+-------------------+-------------------------------------+\n | | incompatible | non-conflicting | non-conflicting | conflict |\n |remove+| psets | change | change | |\n |insert | | | | - remove conflicting insert |\n | | | | - rem dupl. remove| |\n +-------+-----------------+------------------+-------------------+-------------------------------------+\n <END REBASE HANDLING TABLE>\n */\n\n // A key was modified after it had been removed\n if (modification.own === \"modify\" && modification.other === \"modify\") {\n if (isPrimitiveTypeid ||\n (TypeIdHelper.isPrimitiveType(modification.ownTypeid) && modification.ownTypeid !== \"String\")) {\n // We have two modification operations that affect the same entry for a base type.\n // This is a legal operation, the second one will overwrite the first one, but we\n // report it as a possible conflict\n let ownModify = in_ownPropertyChangeSet.modify;\n let rebasedModify = io_rebasePropertyChangeSet.modify;\n if (modification.otherTypeid) {\n ownModify = ownModify[modification.otherTypeid];\n rebasedModify = rebasedModify[modification.otherTypeid];\n }\n\n let conflict = {\n path: newPath,\n type: ConflictType.COLLIDING_SET,\n conflictingChange: ownModify[key],\n };\n out_conflicts.push(conflict);\n // If value is the same, delete the entry\n let ownValue = ownModify[key];\n if (typeof ownValue === \"object\" && ownValue.hasOwnProperty(\"value\")) {\n ownValue = ownValue.value;\n }\n let rebaseValue = rebasedModify[key];\n if (typeof rebaseValue === \"object\" && rebaseValue.hasOwnProperty(\"value\")) {\n rebaseValue = rebaseValue.value;\n }\n if (modification.ownTypeid === \"Int64\" || modification.ownTypeid === \"Uint64\" || ownValue.length === 2) {\n // For (u)int64, values are arrays of 2 elements\n if (ownValue[0] === rebaseValue[0] && ownValue[1] === rebaseValue[1]) {\n delete rebasedModify[key];\n }\n } else {\n if (ownValue === rebaseValue) {\n delete rebasedModify[key];\n }\n }\n } else {\n this.rebaseChangeSetForPropertyEntryWithTypeid(key,\n in_ownPropertyChangeSet.modify[modification.ownTypeid],\n io_rebasePropertyChangeSet.modify[modification.otherTypeid],\n modification.ownTypeid,\n newPath,\n true,\n out_conflicts,\n in_options);\n }\n } else if (modification.own === \"remove\" && modification.other === \"modify\") {\n modifyMap = modification.otherTypeid ? io_rebasePropertyChangeSet.modify[modification.otherTypeid] :\n io_rebasePropertyChangeSet.modify;\n\n // Create the conflict information\n let conflict = {\n path: newPath,\n type: ConflictType.ENTRY_MODIFIED_AFTER_REMOVE,\n conflictingChange: modifyMap[key],\n };\n out_conflicts.push(conflict);\n\n // Delete the modification from the rebased ChangeSet\n delete modifyMap[key];\n } else if (modification.own === \"remove_insert\" && modification.other === \"modify\") {\n // We have a conflicting change. A node was removed and inserted (replaced) in the original\n // ChangeSet and then modified by the rebased ChangeSet. Since the base of the modification\n // can have been changed significantly by this operation, we don't know whether we can\n // apply the modification\n\n // Create the conflict information\n let conflict = {\n path: newPath,\n type: ConflictType.ENTRY_MODIFICATION_AFTER_REMOVE_INSERT,\n conflictingChange: io_rebasePropertyChangeSet.modify[modification.otherTypeid][key],\n };\n out_conflicts.push(conflict);\n\n // Delete the modification from the rebased ChangeSet\n delete io_rebasePropertyChangeSet.modify[key];\n } else if ((modification.own === \"modify\" || modification.own === \"remove\") &&\n (modification.other === \"remove\" || modification.other === \"remove_insert\")) {\n if (modification.own === \"modify\") {\n modifyMap = modification.ownTypeid ? in_ownPropertyChangeSet.modify[modification.ownTypeid] :\n in_ownPropertyChangeSet.modify;\n\n // Create the conflict information\n let conflict = {\n path: newPath,\n type: ConflictType.REMOVE_AFTER_MODIFY,\n conflictingChange: modifyMap[key],\n };\n out_conflicts.push(conflict);\n }\n\n // If we have a duplicated delete, we remove it from the new ChangeSet\n if (modification.own === \"remove\") {\n if (Array.isArray(io_rebasePropertyChangeSet.remove)) {\n io_rebasePropertyChangeSet.remove = without(io_rebasePropertyChangeSet.remove, key);\n } else {\n if (isPrimitiveTypeid) {\n delete io_rebasePropertyChangeSet.remove[key];\n } else {\n delete io_rebasePropertyChangeSet.remove[modification.otherTypeid][key];\n }\n }\n }\n } else if (modification.own === \"insert\" && modification.other === \"insert\") {\n if (isPrimitiveTypeid ||\n (TypeIdHelper.isPrimitiveType(modification.ownTypeid))) {\n let insertMap = modification.otherTypeid ? io_rebasePropertyChangeSet.insert[modification.otherTypeid] :\n io_rebasePropertyChangeSet.insert;\n\n // We have two insert operations that affect the same key for a primitive type.\n // This is a legal operation, the second one will overwrite the first one, but we\n // report it as a possible conflicting set\n let conflict = {\n path: newPath,\n type: ConflictType.COLLIDING_SET,\n conflictingChange: insertMap[key],\n };\n out_conflicts.push(conflict);\n\n // Convert to modify\n let oldValue;\n if (modification.otherTypeid) {\n io_rebasePropertyChangeSet.modify = io_rebasePropertyChangeSet.modify || {};\n io_rebasePropertyChangeSet.modify[modification.otherTypeid] =\n io_rebasePropertyChangeSet.modify[modification.otherTypeid] || {};\n modifyMap = io_rebasePropertyChangeSet.modify[modification.otherTypeid];\n oldValue = in_ownPropertyChangeSet.insert[modification.ownTypeid][key];\n } else {\n io_rebasePropertyChangeSet.modify = io_rebasePropertyChangeSet.modify || {};\n modifyMap = io_rebasePropertyChangeSet.modify;\n oldValue = in_ownPropertyChangeSet.insert[key];\n }\n\n modifyMap[key] = { value: insertMap[key], oldValue };\n delete insertMap[key];\n } else {\n // Here we have two insert operations for objects. Since these affect a whole sub-tree and not\n // just a single value, we cannot easily convert it into a modify and instead report it as invalid\n\n let insertMap = modification.otherTypeid ? io_rebasePropertyChangeSet.insert[modification.otherTypeid] :\n io_rebasePropertyChangeSet.insert;\n\n // Create the conflict information\n let conflict = {\n path: newPath,\n type: ConflictType.INSERTED_ENTRY_WITH_SAME_KEY,\n conflictingChange: insertMap[key],\n };\n out_conflicts.push(conflict);\n\n // Delete the modification from the rebased ChangeSet\n delete insertMap[key];\n }\n } else if (modification.own === \"remove_insert\" && modification.other === \"remove_insert\") {\n let insertMap = modification.otherTypeid ? io_rebasePropertyChangeSet.insert[modification.otherTypeid] :\n io_rebasePropertyChangeSet.insert;\n\n // Raise the duplicate inserts as a conflict\n let conflict = {\n path: newPath,\n type: ConflictType.COLLIDING_SET,\n conflictingChange: insertMap[key],\n };\n out_conflicts.push(conflict);\n } else {\n // All other operations are conflicting changes, which only occur for ChangeSets that are relative\n // to different bases\n\n // Create the conflict information\n let conflict = {\n path: newPath,\n type: ConflictType.INVALID_CHANGESET_BASE,\n conflictingChange: modification.change,\n };\n out_conflicts.push(conflict);\n\n // Remove the change from the ChangeSet\n if (modification.other !== \"remove\") {\n if (modification.otherTypeid !== undefined) {\n delete io_rebasePropertyChangeSet[modification.other][modification.otherTypeid][key];\n } else {\n delete io_rebasePropertyChangeSet[modification.other][key];\n }\n } else {\n // Remove remove operations from the ChangeSet\n if (Array.isArray(io_rebasePropertyChangeSet[modification.other])) {\n io_rebasePropertyChangeSet[modification.other] =\n without(io_rebasePropertyChangeSet[modification.other], key);\n } else {\n delete io_rebasePropertyChangeSet[modification.other][key];\n }\n }\n\n console.error(\"Rebase operation with conflicting ChangeSets. Probably incorrect bases.\");\n }\n }\n }\n\n // Remove unnecessary entries from the ChangeSet\n this._cleanIndexedCollectionChangeSet(io_rebasePropertyChangeSet, !isPrimitiveTypeid);\n }\n\n /**\n * Removes empty entries from the .children collection of the ChangeSet\n *\n * @param in_propertyChanges - The ChangeSet to clean up\n * @param in_containsTypeids - Does this ChangeSet contain typeids\n * @private\n */\n export const _cleanIndexedCollectionChangeSet = function(in_propertyChanges: SerializedChangeSet, in_containsTypeids: boolean) {\n const changes = in_propertyChanges;\n // Clean inserts\n\n // First remove unused typeid sections\n if (in_containsTypeids) {\n let typeidList = Object.keys(changes.insert || {});\n for (let j = 0; j < typeidList.length; j++) {\n if (_fastIsEmptyObject(changes.insert[typeidList[j]])) {\n delete changes.insert[typeidList[j]];\n }\n }\n }\n\n // Remove add group if no operations are present\n if (_fastIsEmptyObject(changes.insert)) {\n delete changes.insert;\n }\n\n // First remove unused typeid sections\n if (in_containsTypeids) {\n let typeidList = Object.keys(changes.remove || {});\n for (let j = 0; j < typeidList.length; j++) {\n if (_fastIsEmptyObject(changes.remove[typeidList[j]])) {\n delete changes.remove[typeidList[j]];\n }\n }\n }\n // Remove remove group if no operations are present\n if (_fastIsEmptyObject(changes.remove)) {\n delete changes.remove;\n }\n\n // Clean modifies\n\n // First remove unused typeid sections\n if (in_containsTypeids) {\n let typeidList = Object.keys(changes.modify || {});\n for (let j = 0; j < typeidList.length; j++) {\n const modifies = changes.modify[typeidList[j]];\n const modifyKeys = Object.keys(modifies);\n for (let k = 0; k < modifyKeys.length; k++) {\n if (isEmptyChangeSet(modifies[modifyKeys[k]])) {\n delete modifies[modifyKeys[k]];\n }\n }\n if (_fastIsEmptyObject(changes.modify[typeidList[j]])) {\n delete changes.modify[typeidList[j]];\n }\n }\n }\n\n // Remove modify group if no operations are present\n if (_fastIsEmptyObject(changes.modify)) {\n delete changes.modify;\n }\n }\n};\n"]}
|
|
@@ -197,9 +197,9 @@ var TypeIdHelper;
|
|
|
197
197
|
* @return referenced typeid or in_param if it is not a reference
|
|
198
198
|
*/
|
|
199
199
|
function extractTypeId(in_typeid) {
|
|
200
|
-
const matches = in_typeid.match(/\<(.*?)\>/);
|
|
200
|
+
const matches = in_typeid.match(/\<(.*?)\>/);
|
|
201
201
|
if (matches !== null && matches.length > 0) {
|
|
202
|
-
return matches[0].replace(/[\<\>]/gi, "");
|
|
202
|
+
return matches[0].replace(/[\<\>]/gi, "");
|
|
203
203
|
}
|
|
204
204
|
else {
|
|
205
205
|
return in_typeid;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeidHelper.js","sourceRoot":"","sources":["../../src/helpers/typeidHelper.ts"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;GAEG;;;AAEH,sDAAsF;AACtF,aAAa;AACb,yEAAgE;AAEhE,MAAM,EAAE,GAAG,EAAE,GAAG,2BAAS,CAAC;AAa1B;;;;GAIG;AACH,IAAiB,YAAY,CA+P5B;AA/PD,WAAiB,YAAY;IACzB;;;;;OAKG;IACH,SAAgB,eAAe,CAAC,SAAiB;QAC7C,MAAM,cAAc,GAAG,+BAAkB,CAAC,OAAO,CAAC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AAK,cAAc,EAAE;YAC9B,OAAO,KAAK,CAAC;SAChB;QAED,IAAI,OAAO,GAAG,4BAAW,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC;QAEjD,6DAA6D;QAC7D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACrC,IAAI,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE;gBACpD,OAAO,IAAI,CAAC;aACf;SACJ;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;IAtCe,+BAAkB,qBAsCjC,CAAA;IAED;;;;OAIG;IACH,SAAgB,mBAAmB;QAC/B,OAAO,+BAAkB,CAAC,OAAO,CAAC,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;IACnE,CAAC;IAFe,gCAAmB,sBAElC,CAAA;IAED;;;;OAIG;IACH,SAAgB,kBAAkB;QAC9B,OAAO,+BAAkB,CAAC,OAAO,CAAC,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;IAClE,CAAC;IAFe,+BAAkB,qBAEjC,CAAA;AACL,CAAC,EA/PgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QA+P5B;AAAA,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview Helper functions to work with typeid strings\n */\n\nimport { TemplateSchema as templateSchemaJson, NativeTypes } from \"../templateSchema\";\n// @ts-ignore\nimport { constants } from \"@fluid-experimental/property-common\";\n\nconst { MSG } = constants;\n\nexport declare interface ExtractedVersion {\n version: string;\n typeidWithoutVersion: string;\n}\n\nexport declare interface ExtractedContext {\n typeid: string;\n context: string;\n isEnum: boolean;\n}\n\n/**\n * Helper for Type IDs\n * @public\n * @description Helper functions to work with typeid strings\n */\nexport namespace TypeIdHelper {\n /**\n * Checks whether the given type is a primitive type.\n *\n * @param in_typeid - The typeid we want to check\n * @returns Is this a base type?\n */\n export function isPrimitiveType(in_typeid: string): boolean {\n const primitiveTypes = templateSchemaJson[\"$defs\"][\"primitive-typeid\"][\"enum\"];\n\n if (in_typeid === undefined || in_typeid === \"\") {\n return false;\n }\n\n return in_typeid.substr(0, 5) === \"enum<\" ||\n in_typeid.substr(0, 10) === \"Reference<\" ||\n primitiveTypes.indexOf(in_typeid) >= 0;\n }\n\n /**\n * Checks whether the given type is a template typeid.\n *\n * @param in_typeid - The typeid we want to check\n * @returns Is this a base template typeid?\n */\n export function isTemplateTypeid(in_typeid: string): boolean {\n return in_typeid.indexOf(\":\") !== -1;\n }\n\n /**\n * Checks whether the given type is a reserved type.\n *\n * @param in_typeid - The typeid we want to check\n * @returns Is this a reserved type?\n */\n export function isReservedType(in_typeid: string): boolean {\n const reservedTypes = templateSchemaJson[\"$defs\"][\"reserved-typeid\"][\"enum\"];\n return reservedTypes.indexOf(in_typeid) >= 0;\n }\n\n /**\n * Extract the version number from the given typeid\n * @param in_typeid The typeid to check against\n * @returns Extracted version\n */\n export function extractVersion(in_typeid): ExtractedVersion {\n if (!in_typeid) {\n throw new Error(MSG.TYPEID_NOT_DEFINED);\n }\n const splitTypeId = in_typeid.split(\"-\");\n\n return {\n version: splitTypeId[1],\n typeidWithoutVersion: splitTypeId[0]\n };\n }\n\n /**\n * Extracts the context from a typeid\n *\n * @param in_typeid - The typeid to process\n * @returns Returns the typeid without context, the context and if we have an enum type\n */\n export function extractContext(in_typeid: string | undefined): ExtractedContext {\n const bracketIndex = in_typeid.indexOf(\"<\");\n if (bracketIndex !== -1 &&\n in_typeid[in_typeid.length - 1] === \">\") {\n let typeid = in_typeid.substr(bracketIndex + 1, in_typeid.length - bracketIndex - 2);\n let context = in_typeid.substr(0, bracketIndex);\n\n // Special case to handle collections without a typeid (e.g. \"map<>\", which should\n // be able to support all property types\n if (typeid === \"\") {\n typeid = context !== \"set\" ? \"BaseProperty\" : \"NamedProperty\";\n }\n\n // Special case to handle enums (e.g. array<enum<myType>>)\n let isEnum = false;\n if (context === \"enum\" || typeid.substr(0, 5) === \"enum<\") {\n isEnum = true;\n if (context === \"enum\") {\n context = \"single\";\n } else {\n // remove the `enum<...>` tag to get the raw typeid\n typeid = typeid.substr(5, typeid.length - 6);\n }\n }\n if (context === \"Reference\") {\n typeid = `Reference<${typeid}>`;\n context = \"single\";\n }\n\n return {\n typeid,\n context,\n isEnum\n };\n } else {\n return {\n typeid: in_typeid,\n context: \"single\",\n isEnum: false\n };\n }\n }\n\n /**\n * Creates a collection typeid string from the\n * typeid and the context.\n *\n * @param in_typeid - the typeid in the collection\n * @param in_context - the context\n * @param in_enum - set to true, if the type should get an enum tag\n *\n * @returns The combined typeid string\n */\n export function createSerializationTypeId(in_typeid: string, in_context: string, in_enum: boolean): string { // in_enum\n if (in_typeid === \"BaseProperty\") {\n // Special case for BaseProperties. These get represented as a collection\n // typeid without a child typeid. E.g. map<> instead of map<BaseProperty>\n return `${in_context}<>`;\n } else {\n if (in_enum) {\n if (in_context === \"\" || in_context === \"single\") {\n return `enum<${in_typeid}>`;\n } else {\n return `${in_context}<enum<${in_typeid}>>`;\n }\n } else {\n return `${in_context}<${in_typeid}>`;\n }\n }\n }\n\n /**\n * Checks, whether the supplied typeid is a reference property type id\n *\n * @param in_typeid - The typeid to check\n * @returns Is this a reference property typeid?\n */\n export function isReferenceTypeId(in_typeid: string | undefined ): boolean { // in_enum\n return in_typeid === \"Reference\" ||\n (in_typeid.substr(0, 10) === \"Reference<\" && in_typeid.substr(-1) === \">\");\n }\n\n /**\n * Returns the type of the properties a reference points to\n *\n * @param in_typeid - The typeid to process\n * @return The type of the referenced property\n */\n export function extractReferenceTargetTypeIdFromReference(in_typeid: string): string { // in_enum\n if (in_typeid.substr(0, 10) === \"Reference<\") {\n // Extract the type from the TypeID\n return in_typeid.substr(10, in_typeid.length - 11);\n } else {\n // This is a typeless reference, we allow all types\n return \"BaseProperty\";\n }\n }\n\n /**\n * Checks whether the given type is a template typeid.\n *\n * @param in_typeid - The typeid we want to check\n * @returns Is this a base template typeid?\n */\n export function isSchemaTypeid(in_typeid: string): boolean {\n return typeof in_typeid === \"string\" && (in_typeid.indexOf(\":\") !== -1);\n }\n\n /**\n * Extracts referenced typeid from input typeid\n *\n * @param in_typeid typeid\n *\n * @return referenced typeid or in_param if it is not a reference\n */\n export function extractTypeId(in_typeid): string {\n const matches = in_typeid.match(/\\<(.*?)\\>/); // eslint-disable-line\n if (matches !== null && matches.length > 0) {\n return matches[0].replace(/[\\<\\>]/gi, \"\"); // eslint-disable-line\n } else {\n return in_typeid;\n }\n }\n\n\n /**\n * Check wether the in_typeid inherits from the in_baseTypeid\n *\n * Note: By default, this also returns true if in_typeid === in_baseTypeid.\n *\n * @param in_typeid - Typeid for which we want to check, whethwe in_baseTypeid is a parent\n * @param in_baseTypeid - The base typeId to check for\n * @throws if in_typeid or in_baseTypeid are not native typeid\n * @returns True if in_baseTypeid is a parent of in_typeid\n */\n export function nativeInheritsFrom(in_typeid: string, in_baseTypeid: string): boolean {\n if (!in_typeid || !in_baseTypeid) {\n throw new Error(MSG.TYPEID_NOT_DEFINED);\n }\n\n if (in_typeid.substr(0, 10) === \"Reference<\") {\n in_typeid = \"Reference\";\n }\n\n if (in_baseTypeid.substr(0, 10) === \"Reference<\") {\n in_baseTypeid = \"Reference\";\n }\n\n if (!NativeTypes[in_typeid]) {\n throw new Error(MSG.TYPEID_NOT_NATIVE + in_typeid);\n }\n\n if (!NativeTypes[in_baseTypeid]) {\n throw new Error(MSG.TYPEID_NOT_NATIVE + in_baseTypeid);\n }\n\n if (in_baseTypeid === \"BaseProperty\" || in_typeid === in_baseTypeid) {\n return true;\n }\n\n if (in_typeid === \"BaseProperty\") {\n return false;\n }\n\n let parents = NativeTypes[in_typeid][\"inherits\"];\n\n // recursively call the function for the parent of the typeid\n for (let i = 0; i < parents.length; i++) {\n if (this.nativeInheritsFrom(parents[i], in_baseTypeid)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * return all primitive typeIds\n *\n * @returns return a list of primitiveTypeIds\n */\n export function getPrimitiveTypeIds(): string[] {\n return templateSchemaJson[\"$defs\"][\"primitive-typeid\"][\"enum\"];\n }\n\n /**\n * return all reserved typeIds\n *\n * @returns return a list of reservedTypeIds\n */\n export function getReservedTypeIds(): string[] {\n return templateSchemaJson[\"$defs\"][\"reserved-typeid\"][\"enum\"];\n }\n};\n"]}
|
|
1
|
+
{"version":3,"file":"typeidHelper.js","sourceRoot":"","sources":["../../src/helpers/typeidHelper.ts"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;GAEG;;;AAEH,sDAAsF;AACtF,aAAa;AACb,yEAAgE;AAEhE,MAAM,EAAE,GAAG,EAAE,GAAG,2BAAS,CAAC;AAa1B;;;;GAIG;AACH,IAAiB,YAAY,CA+P5B;AA/PD,WAAiB,YAAY;IACzB;;;;;OAKG;IACH,SAAgB,eAAe,CAAC,SAAiB;QAC7C,MAAM,cAAc,GAAG,+BAAkB,CAAC,OAAO,CAAC,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;QAE/E,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,EAAE,EAAE;YAC7C,OAAO,KAAK,CAAC;SAChB;QAED,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,OAAO;YACrC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,YAAY;YACxC,cAAc,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IAVe,4BAAe,kBAU9B,CAAA;IAED;;;;;MAKE;IACF,SAAgB,gBAAgB,CAAC,SAAiB;QAC9C,OAAO,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IACzC,CAAC;IAFe,6BAAgB,mBAE/B,CAAA;IAED;;;;;OAKG;IACH,SAAgB,cAAc,CAAC,SAAiB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kB;QAC9B,OAAO,+BAAkB,CAAC,OAAO,CAAC,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;IAClE,CAAC;IAFe,+BAAkB,qBAEjC,CAAA;AACL,CAAC,EA/PgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QA+P5B;AAAA,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview Helper functions to work with typeid strings\n */\n\nimport { TemplateSchema as templateSchemaJson, NativeTypes } from \"../templateSchema\";\n// @ts-ignore\nimport { constants } from \"@fluid-experimental/property-common\";\n\nconst { MSG } = constants;\n\nexport declare interface ExtractedVersion {\n version: string;\n typeidWithoutVersion: string;\n}\n\nexport declare interface ExtractedContext {\n typeid: string;\n context: string;\n isEnum: boolean;\n}\n\n/**\n * Helper for Type IDs\n * @public\n * @description Helper functions to work with typeid strings\n */\nexport namespace TypeIdHelper {\n /**\n * Checks whether the given type is a primitive type.\n *\n * @param in_typeid - The typeid we want to check\n * @returns Is this a base type?\n */\n export function isPrimitiveType(in_typeid: string): boolean {\n const primitiveTypes = templateSchemaJson[\"$defs\"][\"primitive-typeid\"][\"enum\"];\n\n if (in_typeid === undefined || in_typeid === \"\") {\n return false;\n }\n\n return in_typeid.substr(0, 5) === \"enum<\" ||\n in_typeid.substr(0, 10) === \"Reference<\" ||\n primitiveTypes.indexOf(in_typeid) >= 0;\n }\n\n /**\n * Checks whether the given type is a template typeid.\n *\n * @param in_typeid - The typeid we want to check\n * @returns Is this a base template typeid?\n */\n export function isTemplateTypeid(in_typeid: string): boolean {\n return in_typeid.indexOf(\":\") !== -1;\n }\n\n /**\n * Checks whether the given type is a reserved type.\n *\n * @param in_typeid - The typeid we want to check\n * @returns Is this a reserved type?\n */\n export function isReservedType(in_typeid: string): boolean {\n const reservedTypes = templateSchemaJson[\"$defs\"][\"reserved-typeid\"][\"enum\"];\n return reservedTypes.indexOf(in_typeid) >= 0;\n }\n\n /**\n * Extract the version number from the given typeid\n * @param in_typeid The typeid to check against\n * @returns Extracted version\n */\n export function extractVersion(in_typeid): ExtractedVersion {\n if (!in_typeid) {\n throw new Error(MSG.TYPEID_NOT_DEFINED);\n }\n const splitTypeId = in_typeid.split(\"-\");\n\n return {\n version: splitTypeId[1],\n typeidWithoutVersion: splitTypeId[0]\n };\n }\n\n /**\n * Extracts the context from a typeid\n *\n * @param in_typeid - The typeid to process\n * @returns Returns the typeid without context, the context and if we have an enum type\n */\n export function extractContext(in_typeid: string | undefined): ExtractedContext {\n const bracketIndex = in_typeid.indexOf(\"<\");\n if (bracketIndex !== -1 &&\n in_typeid[in_typeid.length - 1] === \">\") {\n let typeid = in_typeid.substr(bracketIndex + 1, in_typeid.length - bracketIndex - 2);\n let context = in_typeid.substr(0, bracketIndex);\n\n // Special case to handle collections without a typeid (e.g. \"map<>\", which should\n // be able to support all property types\n if (typeid === \"\") {\n typeid = context !== \"set\" ? \"BaseProperty\" : \"NamedProperty\";\n }\n\n // Special case to handle enums (e.g. array<enum<myType>>)\n let isEnum = false;\n if (context === \"enum\" || typeid.substr(0, 5) === \"enum<\") {\n isEnum = true;\n if (context === \"enum\") {\n context = \"single\";\n } else {\n // remove the `enum<...>` tag to get the raw typeid\n typeid = typeid.substr(5, typeid.length - 6);\n }\n }\n if (context === \"Reference\") {\n typeid = `Reference<${typeid}>`;\n context = \"single\";\n }\n\n return {\n typeid,\n context,\n isEnum\n };\n } else {\n return {\n typeid: in_typeid,\n context: \"single\",\n isEnum: false\n };\n }\n }\n\n /**\n * Creates a collection typeid string from the\n * typeid and the context.\n *\n * @param in_typeid - the typeid in the collection\n * @param in_context - the context\n * @param in_enum - set to true, if the type should get an enum tag\n *\n * @returns The combined typeid string\n */\n export function createSerializationTypeId(in_typeid: string, in_context: string, in_enum: boolean): string { // in_enum\n if (in_typeid === \"BaseProperty\") {\n // Special case for BaseProperties. These get represented as a collection\n // typeid without a child typeid. E.g. map<> instead of map<BaseProperty>\n return `${in_context}<>`;\n } else {\n if (in_enum) {\n if (in_context === \"\" || in_context === \"single\") {\n return `enum<${in_typeid}>`;\n } else {\n return `${in_context}<enum<${in_typeid}>>`;\n }\n } else {\n return `${in_context}<${in_typeid}>`;\n }\n }\n }\n\n /**\n * Checks, whether the supplied typeid is a reference property type id\n *\n * @param in_typeid - The typeid to check\n * @returns Is this a reference property typeid?\n */\n export function isReferenceTypeId(in_typeid: string | undefined ): boolean { // in_enum\n return in_typeid === \"Reference\" ||\n (in_typeid.substr(0, 10) === \"Reference<\" && in_typeid.substr(-1) === \">\");\n }\n\n /**\n * Returns the type of the properties a reference points to\n *\n * @param in_typeid - The typeid to process\n * @return The type of the referenced property\n */\n export function extractReferenceTargetTypeIdFromReference(in_typeid: string): string { // in_enum\n if (in_typeid.substr(0, 10) === \"Reference<\") {\n // Extract the type from the TypeID\n return in_typeid.substr(10, in_typeid.length - 11);\n } else {\n // This is a typeless reference, we allow all types\n return \"BaseProperty\";\n }\n }\n\n /**\n * Checks whether the given type is a template typeid.\n *\n * @param in_typeid - The typeid we want to check\n * @returns Is this a base template typeid?\n */\n export function isSchemaTypeid(in_typeid: string): boolean {\n return typeof in_typeid === \"string\" && (in_typeid.indexOf(\":\") !== -1);\n }\n\n /**\n * Extracts referenced typeid from input typeid\n *\n * @param in_typeid typeid\n *\n * @return referenced typeid or in_param if it is not a reference\n */\n export function extractTypeId(in_typeid): string {\n const matches = in_typeid.match(/\\<(.*?)\\>/);\n if (matches !== null && matches.length > 0) {\n return matches[0].replace(/[\\<\\>]/gi, \"\");\n } else {\n return in_typeid;\n }\n }\n\n\n /**\n * Check wether the in_typeid inherits from the in_baseTypeid\n *\n * Note: By default, this also returns true if in_typeid === in_baseTypeid.\n *\n * @param in_typeid - Typeid for which we want to check, whethwe in_baseTypeid is a parent\n * @param in_baseTypeid - The base typeId to check for\n * @throws if in_typeid or in_baseTypeid are not native typeid\n * @returns True if in_baseTypeid is a parent of in_typeid\n */\n export function nativeInheritsFrom(in_typeid: string, in_baseTypeid: string): boolean {\n if (!in_typeid || !in_baseTypeid) {\n throw new Error(MSG.TYPEID_NOT_DEFINED);\n }\n\n if (in_typeid.substr(0, 10) === \"Reference<\") {\n in_typeid = \"Reference\";\n }\n\n if (in_baseTypeid.substr(0, 10) === \"Reference<\") {\n in_baseTypeid = \"Reference\";\n }\n\n if (!NativeTypes[in_typeid]) {\n throw new Error(MSG.TYPEID_NOT_NATIVE + in_typeid);\n }\n\n if (!NativeTypes[in_baseTypeid]) {\n throw new Error(MSG.TYPEID_NOT_NATIVE + in_baseTypeid);\n }\n\n if (in_baseTypeid === \"BaseProperty\" || in_typeid === in_baseTypeid) {\n return true;\n }\n\n if (in_typeid === \"BaseProperty\") {\n return false;\n }\n\n let parents = NativeTypes[in_typeid][\"inherits\"];\n\n // recursively call the function for the parent of the typeid\n for (let i = 0; i < parents.length; i++) {\n if (this.nativeInheritsFrom(parents[i], in_baseTypeid)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * return all primitive typeIds\n *\n * @returns return a list of primitiveTypeIds\n */\n export function getPrimitiveTypeIds(): string[] {\n return templateSchemaJson[\"$defs\"][\"primitive-typeid\"][\"enum\"];\n }\n\n /**\n * return all reserved typeIds\n *\n * @returns return a list of reservedTypeIds\n */\n export function getReservedTypeIds(): string[] {\n return templateSchemaJson[\"$defs\"][\"reserved-typeid\"][\"enum\"];\n }\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateValidator.d.ts","sourceRoot":"","sources":["../src/templateValidator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"templateValidator.d.ts","sourceRoot":"","sources":["../src/templateValidator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;;;GAIG;AA4BH,OAAO,EAAE,sBAAsB,EAA2B,MAAM,2BAA2B,CAAC;AAc5F,aAAK,UAAU,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GA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AAa,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,KAAK,OAAO,CAAC;IAC3E,UAAU,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IAChE,kBAAkB,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACzF,eAAe,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACrF,OAAO,CAAC,WAAW,CAAU;IAC7B,OAAO,CAAC,WAAW,CAAU;gBACjB,SAAS,GAAE,wBAAkE;IAgBzF;;;;;;;;;;;;;;;;;;;;;GAqBD;IACC,QAAQ,CAAC,WAAW,EAAE,cAAc,EAAE,mBAAmB,CAAC,EAAE,cAAc,GAAG,sBAAsB;IAiFnG;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,aAAa,CAAC,WAAW,EAAE,cAAc,EAAE,mBAAmB,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAcjH;;;;;;;;OAQG;IACH,OAAO,CAAC,gCAAgC;CAwC3C"}
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* @description The TemplateValidator can examine consecutive versions of a given template to detect semantic
|
|
9
9
|
* versioning (semver) errors and warn about incorrect versioning practices.
|
|
10
10
|
*/
|
|
11
|
-
/* eslint-disable no-unused-lets */
|
|
12
11
|
/* eslint-disable no-use-before-define */
|
|
13
12
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|