@fluid-experimental/property-changeset 1.2.3-83900 → 2.0.0-internal.1.0.0

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.
Files changed (45) hide show
  1. package/dist/changeset.d.ts +39 -45
  2. package/dist/changeset.d.ts.map +1 -1
  3. package/dist/changeset.js +39 -45
  4. package/dist/changeset.js.map +1 -1
  5. package/dist/changeset_operations/array.d.ts +3 -3
  6. package/dist/changeset_operations/array.d.ts.map +1 -1
  7. package/dist/changeset_operations/array.js +45 -47
  8. package/dist/changeset_operations/array.js.map +1 -1
  9. package/dist/changeset_operations/indexedCollection.d.ts +2 -2
  10. package/dist/changeset_operations/indexedCollection.js +2 -2
  11. package/dist/changeset_operations/indexedCollection.js.map +1 -1
  12. package/dist/helpers/typeidHelper.d.ts +9 -9
  13. package/dist/helpers/typeidHelper.js +9 -9
  14. package/dist/helpers/typeidHelper.js.map +1 -1
  15. package/dist/pathHelper.d.ts +4 -4
  16. package/dist/pathHelper.js +4 -4
  17. package/dist/pathHelper.js.map +1 -1
  18. package/dist/templateValidator.d.ts +6 -6
  19. package/dist/templateValidator.d.ts.map +1 -1
  20. package/dist/templateValidator.js +66 -58
  21. package/dist/templateValidator.js.map +1 -1
  22. package/dist/test/tsconfig.tsbuildinfo +1 -1
  23. package/dist/utils.d.ts +7 -7
  24. package/dist/utils.js +9 -9
  25. package/dist/utils.js.map +1 -1
  26. package/dist/validationResultBuilder.d.ts +4 -4
  27. package/dist/validationResultBuilder.js +4 -4
  28. package/dist/validationResultBuilder.js.map +1 -1
  29. package/lib/changeset.js +39 -45
  30. package/lib/changeset.js.map +1 -1
  31. package/lib/changeset_operations/array.js +45 -47
  32. package/lib/changeset_operations/array.js.map +1 -1
  33. package/lib/changeset_operations/indexedCollection.js +2 -2
  34. package/lib/changeset_operations/indexedCollection.js.map +1 -1
  35. package/lib/helpers/typeidHelper.js +9 -9
  36. package/lib/helpers/typeidHelper.js.map +1 -1
  37. package/lib/pathHelper.js +4 -4
  38. package/lib/pathHelper.js.map +1 -1
  39. package/lib/templateValidator.js +66 -58
  40. package/lib/templateValidator.js.map +1 -1
  41. package/lib/utils.js +9 -9
  42. package/lib/utils.js.map +1 -1
  43. package/lib/validationResultBuilder.js +4 -4
  44. package/lib/validationResultBuilder.js.map +1 -1
  45. package/package.json +3 -3
@@ -37,7 +37,7 @@ var PathHelper;
37
37
  /**
38
38
  * Tokenizes a path string
39
39
  *
40
- * @param in_path - The path string to divide into tokens
40
+ * @param in_path - The path string to divide into tokens
41
41
  * @param out_types - The types of the tokens
42
42
  *
43
43
  * @returns the tokens from the path string
@@ -309,7 +309,7 @@ var PathHelper;
309
309
  /**
310
310
  * Creates a quoted string for a path seqment to make sure it parses correctly
311
311
  *
312
- * @param in_pathSegment - The path string to put in quotes
312
+ * @param in_pathSegment - The path string to put in quotes
313
313
  *
314
314
  * @returns quoted path string
315
315
  */
@@ -326,7 +326,7 @@ var PathHelper;
326
326
  /**
327
327
  * Reverse a quoted/escaped string for a path seqment
328
328
  *
329
- * @param in_quotedPathSegment - The quoted/escaped path string to put in quotes
329
+ * @param in_quotedPathSegment - The quoted/escaped path string to put in quotes
330
330
  *
331
331
  * @return unquoted path string
332
332
  */
@@ -347,7 +347,7 @@ var PathHelper;
347
347
  /**
348
348
  * Adds quotation marks to a path string if they are needed
349
349
  *
350
- * @param in_pathSegment - The path string to put in quotes
350
+ * @param in_pathSegment - The path string to put in quotes
351
351
  *
352
352
  * @returns quoted path string
353
353
  */
@@ -1 +1 @@
1
- {"version":3,"file":"pathHelper.js","sourceRoot":"","sources":["../src/pathHelper.ts"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;GAEG;;;AAEH,aAAa;AACb,yEAAgE;AAEhE,MAAM,EAAE,uBAAuB,EAAE,GAAG,EAAE,GAAG,2BAAS,CAAC;AAInD;;GAEG;AACH,IAAiB,UAAU,CA0e1B;AA1eD,WAAiB,UAAU;IAEvB,MAAM,2BAA2B,GAAG,I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,EAAE,EAAE;YACtC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE;gBACrC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;aAC3B;SACJ;QACD,IAAI,KAAK,CAAC,MAAM,EAAE;YACd,+DAA+D;YAC/D,OAAO;gBACH,cAAc,EAAE,cAAc,CAAC,cAAc;gBAC7C,QAAQ,EAAE,KAAK;aAClB,CAAC;SACL;QAED,yDAAyD;QACzD,OAAO;YACH,cAAc,EAAE,cAAc,CAAC,SAAS;YACxC,QAAQ,EAAE,KAAK;SAClB,CAAC;IACN,CAAC,CAAC;AACN,CAAC,EA1egB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QA0e1B","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 path strings\n */\n\n// @ts-ignore\nimport { constants } from '@fluid-experimental/property-common';\n\nconst { PROPERTY_PATH_DELIMITER, MSG } = constants;\n\nexport type PathTree = Map<String, PathTree>;\n\n/**\n * Helper functions for string processing\n */\nexport namespace PathHelper {\n\n const RE_ALL_OPEN_SQUARE_BRACKETS = new RegExp(\"[[]\", \"g\");\n\n /**\n * Token Types\n * Type of the token in the path string\n */\n export enum TOKEN_TYPES {\n /** A normal path segment, separated via . */\n PATH_SEGMENT_TOKEN,\n /** An array path segment, separated via [ ] */\n ARRAY_TOKEN,\n /** A / at the beginning of the path */\n PATH_ROOT_TOKEN,\n /** A * that indicates a dereferencing operation */ // note: reversed!\n DEREFERENCE_TOKEN,\n /** A ../ that indicates one step above the current path */\n RAISE_LEVEL_TOKEN,\n }\n\n /**\n * Tokenizes a path string\n *\n * @param in_path - The path string to divide into tokens\n * @param out_types - The types of the tokens\n *\n * @returns the tokens from the path string\n */\n export const tokenizePathString = function(in_path: string, out_types?: TOKEN_TYPES[]): string[] { // eslint-disable-line complexity\n const tokens = [];\n let currentToken = \"\";\n\n if (out_types) {\n // Make sure out_types is empty\n out_types.splice(0, out_types.length);\n }\n\n // Handle a / at the beginning of the path by adding a special token for it\n let path_start = 0;\n if (in_path[0] === \"/\") {\n tokens.push(\"/\");\n if (out_types) {\n out_types.push(TOKEN_TYPES.PATH_ROOT_TOKEN);\n }\n path_start = 1;\n } else if (in_path.substr(0, 3) === \"../\") {\n // Handle relative paths by extracting the number steps above\n var extractLevel = function(current_path) {\n if (current_path.substr(0, 3) === \"../\") {\n if (out_types) {\n out_types.push(TOKEN_TYPES.RAISE_LEVEL_TOKEN);\n }\n tokens.push(\"../\");\n extractLevel(current_path.substr(3));\n path_start = path_start + 3;\n }\n };\n extractLevel(in_path);\n }\n\n // Let's see if the path is simple enough to use a fast-track algorithm.\n let hackedPath = in_path.substr(path_start);\n if (in_path.indexOf(\"\\\\\") === -1 && in_path.indexOf('\"') === -1 && in_path.indexOf(\"*\") === -1) {\n // Yes, we can do something faster than parsing each character one by one.\n let additionalTokens: string[] = [];\n const additionalTypes = [];\n let token: string | string[];\n let i: number;\n // Hack for simplicity, let's first replace all occurences of '[' by '.['\n hackedPath = hackedPath.replace(RE_ALL_OPEN_SQUARE_BRACKETS, \".[\");\n // Then split on '.'\n additionalTokens = hackedPath.split(\".\");\n // And validate each token.\n for (i = 0; i < additionalTokens.length; ++i) {\n token = additionalTokens[i];\n // Empty tokens are considered errors... but shouldn't '' be a valid name?\n if (token.length === 0) {\n // There's an error somewhere. Let's abort the fast-track.\n break;\n } else if (token[0] === \"[\") {\n if (token.length > 2 && token[token.length - 1] === \"]\") {\n additionalTypes.push(TOKEN_TYPES.ARRAY_TOKEN);\n additionalTokens[i] = token.substr(1, token.length - 2);\n } else {\n // There's an error somewhere. Let's abort the fast-track.\n break;\n }\n } else {\n if (token.indexOf(\"]\") !== -1) {\n // There's an error somewhere. Let's abort the fast-track.\n break;\n } else {\n // It was a simple property name.\n additionalTypes.push(TOKEN_TYPES.PATH_SEGMENT_TOKEN);\n }\n }\n }\n if (i === additionalTokens.length) {\n // Parsed everything successfully so end function here.\n if (out_types) {\n for (i = 0; i < additionalTypes.length; i++) {\n out_types.push(additionalTypes[i]);\n }\n }\n return tokens.concat(additionalTokens);\n }\n }\n\n let inSquareBrackets = false;\n let tokenStarted = false;\n let lastTokenWasQuoted = false;\n\n // We are in a context where an empty token is valid\n let atStartToken = false;\n let allowSegmentStart = true;\n\n const storeNextToken = function(tokenType) {\n // Make sure, this is not an empty token (E.g. a .. or a [] )\n if (!tokenStarted) {\n if (!atStartToken) {\n throw new Error(MSG.EMPTY_TOKEN + in_path);\n } else {\n return;\n }\n }\n\n // Store the token\n tokens.push(currentToken);\n currentToken = \"\";\n tokenStarted = false;\n atStartToken = false;\n lastTokenWasQuoted = false;\n allowSegmentStart = false;\n\n if (out_types) {\n out_types.push(tokenType);\n }\n };\n\n for (var i = path_start; i < in_path.length; i++) {\n const character = in_path[i];\n\n if (character === '\"') {\n // If we encounter a quotation mark, we start parsing the\n // quoted section\n if (!tokenStarted) {\n let endFound = false;\n\n // Read the quoted token\n for (i++; i < in_path.length; i++) {\n if (in_path[i] === '\"') {\n // We have found the end of the quoted token\n endFound = true;\n break;\n } else if (in_path[i] === \"\\\\\") {\n // Read an escaped symbol\n if (in_path.length > i + 1) {\n if (in_path[i + 1] === \"\\\\\") {\n currentToken += \"\\\\\";\n i++;\n } else if (in_path[i + 1] === '\"') {\n currentToken += '\"';\n i++;\n } else {\n throw new Error(MSG.INVALID_ESCAPE_SEQUENCE + in_path);\n }\n } else {\n throw new Error(MSG.INVALID_ESCAPE_SEQUENCE + in_path);\n }\n } else {\n // Everything else is just added to the token\n currentToken += in_path[i];\n }\n }\n\n if (!endFound) {\n throw new Error(MSG.UNCLOSED_QUOTATION_MARKS + in_path);\n }\n lastTokenWasQuoted = true;\n tokenStarted = true;\n } else {\n throw new Error(MSG.QUOTES_WITHIN_TOKEN + in_path);\n }\n } else if (!inSquareBrackets) {\n if (character === PROPERTY_PATH_DELIMITER) {\n // A dot symbols starts a new token\n storeNextToken(TOKEN_TYPES.PATH_SEGMENT_TOKEN);\n\n allowSegmentStart = true;\n } else if (character === \"[\") {\n // An opening square bracket starts a new token\n if (tokenStarted) {\n storeNextToken(TOKEN_TYPES.PATH_SEGMENT_TOKEN);\n }\n\n // And sets the state to inSquareBrackets\n inSquareBrackets = true;\n } else if (character === \"]\") {\n throw new Error(MSG.CLOSING_BRACKET_WITHOUT_OPENING + in_path);\n } else if (character === \"*\") {\n // Store the last token\n if (tokenStarted) {\n storeNextToken(TOKEN_TYPES.PATH_SEGMENT_TOKEN);\n }\n\n // Create a new dereference token\n tokens.push(\"*\");\n if (out_types) {\n out_types.push(TOKEN_TYPES.DEREFERENCE_TOKEN);\n }\n\n // Reset the token started flag\n tokenStarted = false;\n atStartToken = true;\n allowSegmentStart = false;\n } else {\n if (!tokenStarted &&\n !allowSegmentStart &&\n !inSquareBrackets) {\n throw new Error(MSG.MISSING_DOT_AT_SEGMENT_START + in_path);\n }\n\n currentToken += character;\n\n // We have started parsing the token\n tokenStarted = true;\n\n // When a symbols appears after a closing quotation mark, we have an error\n if (lastTokenWasQuoted) {\n throw new Error(MSG.QUOTES_WITHIN_TOKEN + in_path);\n }\n }\n } else {\n if (character === \"]\") {\n // A closing square bracket starts a new token\n storeNextToken(TOKEN_TYPES.ARRAY_TOKEN);\n\n // We now have to check the next character,\n // as only the combinations '][' and '].' are\n // valid\n if (in_path.length > i + 1) { // We only have to check this at the end of the string\n if (in_path[i + 1] === PROPERTY_PATH_DELIMITER) {\n // We are no longer in square brackets\n inSquareBrackets = false;\n allowSegmentStart = true;\n i++;\n } else if (in_path[i + 1] === \"[\") {\n // We remain in square brackets\n // so inSquareBrackets remains true;\n i++;\n } else if (in_path[i + 1] === \"*\") {\n // We leave the square brackets\n inSquareBrackets = false;\n } else {\n throw new Error(MSG.INVALID_END_OF_SQUARE_BRACKETS + in_path);\n }\n } else {\n inSquareBrackets = false;\n tokenStarted = false;\n }\n } else if (character === PROPERTY_PATH_DELIMITER) {\n throw new Error(MSG.DOTS_IN_SQUARE_BRACKETS + in_path);\n } else {\n currentToken += character;\n\n // We have started parsing the token\n tokenStarted = true;\n\n // When a symbols appears after a closing quotation mark, we have an error\n if (lastTokenWasQuoted) {\n throw new Error(MSG.QUOTES_WITHIN_TOKEN + in_path);\n }\n }\n }\n }\n\n // At the end of the path we have to distinguish a few error cases\n if (inSquareBrackets) {\n // There was a un-closed bracket at the end\n throw new Error(MSG.UNCLOSED_BRACKETS + in_path);\n } else if (in_path[in_path.length - 1] === PROPERTY_PATH_DELIMITER) {\n // A path ended with a PROPERTY_PATH_DELIMITER\n throw new Error(MSG.DOT_AT_END + in_path);\n } else if (tokenStarted) {\n // There was a valid, not yet ended token\n storeNextToken(TOKEN_TYPES.PATH_SEGMENT_TOKEN);\n }\n\n return tokens;\n };\n\n /**\n * Creates a quoted string for a path seqment to make sure it parses correctly\n *\n * @param in_pathSegment - The path string to put in quotes\n *\n * @returns quoted path string\n */\n export const quotePathSegment = function(in_pathSegment: string): string {\n // WARNING: I use RegExps here, as the normal replace\n // function only replaces the first occurrence\n\n // First we escape escape symbols\n in_pathSegment = in_pathSegment.replace(/\\\\/g, \"\\\\\\\\\");\n\n // Then we escape quotes\n in_pathSegment = in_pathSegment.replace(/\"/g, '\\\\\"');\n\n // And finally, we put the string into quotation marks\n return `\"${in_pathSegment}\"`;\n };\n\n /**\n * Reverse a quoted/escaped string for a path seqment\n *\n * @param in_quotedPathSegment - The quoted/escaped path string to put in quotes\n *\n * @return unquoted path string\n */\n export const unquotePathSegment = function(in_quotedPathSegment: string): string {\n if (typeof in_quotedPathSegment !== \"string\") {\n throw new TypeError(`Expecting a string as a path: ${in_quotedPathSegment}`);\n }\n\n if (in_quotedPathSegment[0] === '\"' && in_quotedPathSegment[in_quotedPathSegment.length - 1] === '\"') {\n // We remove double quotes\n in_quotedPathSegment = in_quotedPathSegment.substr(1, in_quotedPathSegment.length - 2);\n\n // Then we unescape escape symbols\n in_quotedPathSegment = in_quotedPathSegment.replace(/\\\\\\\\/g, \"\\\\\");\n\n // Then we unescape quotes\n in_quotedPathSegment = in_quotedPathSegment.replace(/\\\\\"/g, '\"');\n }\n\n return in_quotedPathSegment;\n };\n\n /**\n * Adds quotation marks to a path string if they are needed\n *\n * @param in_pathSegment - The path string to put in quotes\n *\n * @returns quoted path string\n */\n export const quotePathSegmentIfNeeded = function(in_pathSegment: string): string {\n if (in_pathSegment.indexOf(PROPERTY_PATH_DELIMITER) !== -1 ||\n in_pathSegment.indexOf('\"') !== -1 ||\n in_pathSegment.indexOf(\"\\\\\") !== -1 ||\n in_pathSegment.indexOf(\"/\") !== -1 ||\n in_pathSegment.indexOf(\"*\") !== -1 ||\n in_pathSegment.indexOf(\"[\") !== -1 ||\n in_pathSegment.indexOf(\"]\") !== -1 ||\n in_pathSegment.length === 0) {\n return quotePathSegment(in_pathSegment);\n } else {\n return in_pathSegment;\n }\n };\n\n /**\n * This function checks, whether the supplied path is a valid repository absolute path.\n *\n * It has to be either an empty string, or a path starting with a /\n *\n * @param in_path - The path to check\n */\n export const checkValidRepositoryAbsolutePath = function(in_path: string) {\n if (in_path !== \"\" && // either an empty reference\n in_path[0] !== \"/\") { // or an absolute path starting with /\n throw new Error(MSG.INVALID_PATH_IN_REFERENCE);\n }\n };\n\n /**\n * This utility function provides a canonical representation of an absolute property path.\n * It is useful to compare partial checkout paths and property paths.\n * The canonical form of paths is not suitable for ChangeSets.\n *\n * @param in_absolutePath - The absolute path to make canonical\n * @return Absolute path in canonical form\n */\n export const convertAbsolutePathToCanonical = function(in_absolutePath: string): string {\n const tokenTypes = [];\n const tokens = tokenizePathString(in_absolutePath, tokenTypes);\n let path = \"\";\n for (let i = 0; i < tokenTypes.length; i++) {\n const tokenType = tokenTypes[i];\n switch (tokenType) {\n case TOKEN_TYPES.PATH_ROOT_TOKEN:\n // Skip the leading '/'\n break;\n case TOKEN_TYPES.RAISE_LEVEL_TOKEN:\n throw new Error(`No level up (\"../\") is expected in an absolute path: ${in_absolutePath}`);\n case TOKEN_TYPES.DEREFERENCE_TOKEN:\n throw new Error(`Dereference (\"*\") is not supported in canonical paths: ${in_absolutePath}`);\n case TOKEN_TYPES.ARRAY_TOKEN:\n case TOKEN_TYPES.PATH_SEGMENT_TOKEN:\n path += (PROPERTY_PATH_DELIMITER + quotePathSegmentIfNeeded(tokens[i]));\n break;\n default:\n break;\n }\n }\n // Removes the leading PROPERTY_PATH_DELIMITER.\n if (path) {\n path = path.substring(1);\n }\n return path;\n };\n\n /**\n * This utility function provides a canonical representation of a child property path.\n * It is useful to compare partial checkout paths and property paths.\n * The canonical form of paths is not suitable for ChangeSets.\n *\n * @param in_parentAbsolutePathCanonical - The absolute path of the parent property in canonical form\n * @param in_childId - The name of the child property in its parent\n * @returns Absolute path of the child property in canonical form\n */\n export const getChildAbsolutePathCanonical = function(in_parentAbsolutePathCanonical: string, in_childId: string): string {\n const childPath = quotePathSegmentIfNeeded(String(in_childId));\n if (in_parentAbsolutePathCanonical) {\n return (in_parentAbsolutePathCanonical + PROPERTY_PATH_DELIMITER + childPath);\n } else {\n return childPath;\n }\n };\n\n export enum CoverageExtent {\n // The base path is not covered by any path from a given list of paths.\n // This means a property with this path and all its children would not be covered.\n UNCOVERED,\n // The base path is partially covered by at least one path from a given list of paths.\n // This means a property with this path would be covered, but some of its children could be uncovered.\n PARTLY_COVERED,\n // The base path is fully covered by at least one path from a given list of paths.\n // This means a property with this path would be covered and all of its children would be covered also.\n FULLY_COVERED,\n }\n\n interface BasePathCoverage {\n coverageExtent: CoverageExtent;\n pathList: string[];\n }\n\n /**\n * Determines if the base path is covered by the given list of paths. From that you can deduce if a\n * property with that path and all its children are covered by the given list of paths.\n *\n * This function uses the canonical representation of the property paths.\n *\n * @param in_basePath - The property's absolute path in canonical form\n * @param in_paths - The array of paths that must cover the property and its children\n * @returns The coverage of the property and its children. For a coverage of\n * 'FULLY_COVERED', only the first matching path is returned.\n */\n export const getPathCoverage = function(in_basePath: string, in_paths: string[]): BasePathCoverage {\n // First, check if the base path is entirely included in one of the paths\n for (let i = 0; i < in_paths.length; i++) {\n if (in_basePath.startsWith(in_paths[i])) {\n return {\n coverageExtent: CoverageExtent.FULLY_COVERED,\n pathList: [in_paths[i]],\n };\n }\n }\n // We did not find a path including all the children of this insertion\n // Let's check if there are paths going through it.\n const paths = [];\n for (let i = 0; i < in_paths.length; i++) {\n if (in_paths[i].startsWith(in_basePath)) {\n paths.push(in_paths[i]);\n }\n }\n if (paths.length) {\n // We found at least one path including parts of the base path.\n return {\n coverageExtent: CoverageExtent.PARTLY_COVERED,\n pathList: paths,\n };\n }\n\n // We did not find any path covering the given base path.\n return {\n coverageExtent: CoverageExtent.UNCOVERED,\n pathList: paths,\n };\n };\n}\n"]}
1
+ {"version":3,"file":"pathHelper.js","sourceRoot":"","sources":["../src/pathHelper.ts"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;GAEG;;;AAEH,aAAa;AACb,yEAAgE;AAEhE,MAAM,EAAE,uBAAuB,EAAE,GAAG,EAAE,GAAG,2BAAS,CAAC;AAInD;;GAEG;AACH,IAAiB,UAAU,CA0e1B;AA1eD,WAAiB,UAAU;IAEvB,MAAM,2BAA2B,GAAG,IAAI,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAE3D;;;OAGG;IACH,IAAY,WAWX;IAXD,WAAY,WAAW;QACnB,6CAA6C;QAC7C,yEAAkB,CAAA;QAClB,+CAA+C;QAC/C,2DAAW,CAAA;QACX,uCAAuC;QACvC,mEAAe,CAAA;QACf,mDAAmD,CAAC,kBAAkB;QACtE,uEAAiB,CAAA;QACjB,2DAA2D;QAC3D,uEAAiB,CAAA;IACrB,CAAC,EAXW,WAAW,GAAX,sBAAW,KAAX,sBAAW,QAWtB;IAED;;;;;;;OAOG;IACU,6BAAkB,GAAG,UAAS,OAAe,EAAE,SAAyB;QACjF,MAAM,MAAM,GAAG,EAAE,CAAC;QAClB,IAAI,YAAY,GAAG,EAAE,C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U,QA0e1B","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 path strings\n */\n\n// @ts-ignore\nimport { constants } from '@fluid-experimental/property-common';\n\nconst { PROPERTY_PATH_DELIMITER, MSG } = constants;\n\nexport type PathTree = Map<String, PathTree>;\n\n/**\n * Helper functions for string processing\n */\nexport namespace PathHelper {\n\n const RE_ALL_OPEN_SQUARE_BRACKETS = new RegExp(\"[[]\", \"g\");\n\n /**\n * Token Types\n * Type of the token in the path string\n */\n export enum TOKEN_TYPES {\n /** A normal path segment, separated via . */\n PATH_SEGMENT_TOKEN,\n /** An array path segment, separated via [ ] */\n ARRAY_TOKEN,\n /** A / at the beginning of the path */\n PATH_ROOT_TOKEN,\n /** A * that indicates a dereferencing operation */ // note: reversed!\n DEREFERENCE_TOKEN,\n /** A ../ that indicates one step above the current path */\n RAISE_LEVEL_TOKEN,\n }\n\n /**\n * Tokenizes a path string\n *\n * @param in_path - The path string to divide into tokens\n * @param out_types - The types of the tokens\n *\n * @returns the tokens from the path string\n */\n export const tokenizePathString = function(in_path: string, out_types?: TOKEN_TYPES[]): string[] { // eslint-disable-line complexity\n const tokens = [];\n let currentToken = \"\";\n\n if (out_types) {\n // Make sure out_types is empty\n out_types.splice(0, out_types.length);\n }\n\n // Handle a / at the beginning of the path by adding a special token for it\n let path_start = 0;\n if (in_path[0] === \"/\") {\n tokens.push(\"/\");\n if (out_types) {\n out_types.push(TOKEN_TYPES.PATH_ROOT_TOKEN);\n }\n path_start = 1;\n } else if (in_path.substr(0, 3) === \"../\") {\n // Handle relative paths by extracting the number steps above\n var extractLevel = function(current_path) {\n if (current_path.substr(0, 3) === \"../\") {\n if (out_types) {\n out_types.push(TOKEN_TYPES.RAISE_LEVEL_TOKEN);\n }\n tokens.push(\"../\");\n extractLevel(current_path.substr(3));\n path_start = path_start + 3;\n }\n };\n extractLevel(in_path);\n }\n\n // Let's see if the path is simple enough to use a fast-track algorithm.\n let hackedPath = in_path.substr(path_start);\n if (in_path.indexOf(\"\\\\\") === -1 && in_path.indexOf('\"') === -1 && in_path.indexOf(\"*\") === -1) {\n // Yes, we can do something faster than parsing each character one by one.\n let additionalTokens: string[] = [];\n const additionalTypes = [];\n let token: string | string[];\n let i: number;\n // Hack for simplicity, let's first replace all occurences of '[' by '.['\n hackedPath = hackedPath.replace(RE_ALL_OPEN_SQUARE_BRACKETS, \".[\");\n // Then split on '.'\n additionalTokens = hackedPath.split(\".\");\n // And validate each token.\n for (i = 0; i < additionalTokens.length; ++i) {\n token = additionalTokens[i];\n // Empty tokens are considered errors... but shouldn't '' be a valid name?\n if (token.length === 0) {\n // There's an error somewhere. Let's abort the fast-track.\n break;\n } else if (token[0] === \"[\") {\n if (token.length > 2 && token[token.length - 1] === \"]\") {\n additionalTypes.push(TOKEN_TYPES.ARRAY_TOKEN);\n additionalTokens[i] = token.substr(1, token.length - 2);\n } else {\n // There's an error somewhere. Let's abort the fast-track.\n break;\n }\n } else {\n if (token.indexOf(\"]\") !== -1) {\n // There's an error somewhere. Let's abort the fast-track.\n break;\n } else {\n // It was a simple property name.\n additionalTypes.push(TOKEN_TYPES.PATH_SEGMENT_TOKEN);\n }\n }\n }\n if (i === additionalTokens.length) {\n // Parsed everything successfully so end function here.\n if (out_types) {\n for (i = 0; i < additionalTypes.length; i++) {\n out_types.push(additionalTypes[i]);\n }\n }\n return tokens.concat(additionalTokens);\n }\n }\n\n let inSquareBrackets = false;\n let tokenStarted = false;\n let lastTokenWasQuoted = false;\n\n // We are in a context where an empty token is valid\n let atStartToken = false;\n let allowSegmentStart = true;\n\n const storeNextToken = function(tokenType) {\n // Make sure, this is not an empty token (E.g. a .. or a [] )\n if (!tokenStarted) {\n if (!atStartToken) {\n throw new Error(MSG.EMPTY_TOKEN + in_path);\n } else {\n return;\n }\n }\n\n // Store the token\n tokens.push(currentToken);\n currentToken = \"\";\n tokenStarted = false;\n atStartToken = false;\n lastTokenWasQuoted = false;\n allowSegmentStart = false;\n\n if (out_types) {\n out_types.push(tokenType);\n }\n };\n\n for (var i = path_start; i < in_path.length; i++) {\n const character = in_path[i];\n\n if (character === '\"') {\n // If we encounter a quotation mark, we start parsing the\n // quoted section\n if (!tokenStarted) {\n let endFound = false;\n\n // Read the quoted token\n for (i++; i < in_path.length; i++) {\n if (in_path[i] === '\"') {\n // We have found the end of the quoted token\n endFound = true;\n break;\n } else if (in_path[i] === \"\\\\\") {\n // Read an escaped symbol\n if (in_path.length > i + 1) {\n if (in_path[i + 1] === \"\\\\\") {\n currentToken += \"\\\\\";\n i++;\n } else if (in_path[i + 1] === '\"') {\n currentToken += '\"';\n i++;\n } else {\n throw new Error(MSG.INVALID_ESCAPE_SEQUENCE + in_path);\n }\n } else {\n throw new Error(MSG.INVALID_ESCAPE_SEQUENCE + in_path);\n }\n } else {\n // Everything else is just added to the token\n currentToken += in_path[i];\n }\n }\n\n if (!endFound) {\n throw new Error(MSG.UNCLOSED_QUOTATION_MARKS + in_path);\n }\n lastTokenWasQuoted = true;\n tokenStarted = true;\n } else {\n throw new Error(MSG.QUOTES_WITHIN_TOKEN + in_path);\n }\n } else if (!inSquareBrackets) {\n if (character === PROPERTY_PATH_DELIMITER) {\n // A dot symbols starts a new token\n storeNextToken(TOKEN_TYPES.PATH_SEGMENT_TOKEN);\n\n allowSegmentStart = true;\n } else if (character === \"[\") {\n // An opening square bracket starts a new token\n if (tokenStarted) {\n storeNextToken(TOKEN_TYPES.PATH_SEGMENT_TOKEN);\n }\n\n // And sets the state to inSquareBrackets\n inSquareBrackets = true;\n } else if (character === \"]\") {\n throw new Error(MSG.CLOSING_BRACKET_WITHOUT_OPENING + in_path);\n } else if (character === \"*\") {\n // Store the last token\n if (tokenStarted) {\n storeNextToken(TOKEN_TYPES.PATH_SEGMENT_TOKEN);\n }\n\n // Create a new dereference token\n tokens.push(\"*\");\n if (out_types) {\n out_types.push(TOKEN_TYPES.DEREFERENCE_TOKEN);\n }\n\n // Reset the token started flag\n tokenStarted = false;\n atStartToken = true;\n allowSegmentStart = false;\n } else {\n if (!tokenStarted &&\n !allowSegmentStart &&\n !inSquareBrackets) {\n throw new Error(MSG.MISSING_DOT_AT_SEGMENT_START + in_path);\n }\n\n currentToken += character;\n\n // We have started parsing the token\n tokenStarted = true;\n\n // When a symbols appears after a closing quotation mark, we have an error\n if (lastTokenWasQuoted) {\n throw new Error(MSG.QUOTES_WITHIN_TOKEN + in_path);\n }\n }\n } else {\n if (character === \"]\") {\n // A closing square bracket starts a new token\n storeNextToken(TOKEN_TYPES.ARRAY_TOKEN);\n\n // We now have to check the next character,\n // as only the combinations '][' and '].' are\n // valid\n if (in_path.length > i + 1) { // We only have to check this at the end of the string\n if (in_path[i + 1] === PROPERTY_PATH_DELIMITER) {\n // We are no longer in square brackets\n inSquareBrackets = false;\n allowSegmentStart = true;\n i++;\n } else if (in_path[i + 1] === \"[\") {\n // We remain in square brackets\n // so inSquareBrackets remains true;\n i++;\n } else if (in_path[i + 1] === \"*\") {\n // We leave the square brackets\n inSquareBrackets = false;\n } else {\n throw new Error(MSG.INVALID_END_OF_SQUARE_BRACKETS + in_path);\n }\n } else {\n inSquareBrackets = false;\n tokenStarted = false;\n }\n } else if (character === PROPERTY_PATH_DELIMITER) {\n throw new Error(MSG.DOTS_IN_SQUARE_BRACKETS + in_path);\n } else {\n currentToken += character;\n\n // We have started parsing the token\n tokenStarted = true;\n\n // When a symbols appears after a closing quotation mark, we have an error\n if (lastTokenWasQuoted) {\n throw new Error(MSG.QUOTES_WITHIN_TOKEN + in_path);\n }\n }\n }\n }\n\n // At the end of the path we have to distinguish a few error cases\n if (inSquareBrackets) {\n // There was a un-closed bracket at the end\n throw new Error(MSG.UNCLOSED_BRACKETS + in_path);\n } else if (in_path[in_path.length - 1] === PROPERTY_PATH_DELIMITER) {\n // A path ended with a PROPERTY_PATH_DELIMITER\n throw new Error(MSG.DOT_AT_END + in_path);\n } else if (tokenStarted) {\n // There was a valid, not yet ended token\n storeNextToken(TOKEN_TYPES.PATH_SEGMENT_TOKEN);\n }\n\n return tokens;\n };\n\n /**\n * Creates a quoted string for a path seqment to make sure it parses correctly\n *\n * @param in_pathSegment - The path string to put in quotes\n *\n * @returns quoted path string\n */\n export const quotePathSegment = function(in_pathSegment: string): string {\n // WARNING: I use RegExps here, as the normal replace\n // function only replaces the first occurrence\n\n // First we escape escape symbols\n in_pathSegment = in_pathSegment.replace(/\\\\/g, \"\\\\\\\\\");\n\n // Then we escape quotes\n in_pathSegment = in_pathSegment.replace(/\"/g, '\\\\\"');\n\n // And finally, we put the string into quotation marks\n return `\"${in_pathSegment}\"`;\n };\n\n /**\n * Reverse a quoted/escaped string for a path seqment\n *\n * @param in_quotedPathSegment - The quoted/escaped path string to put in quotes\n *\n * @return unquoted path string\n */\n export const unquotePathSegment = function(in_quotedPathSegment: string): string {\n if (typeof in_quotedPathSegment !== \"string\") {\n throw new TypeError(`Expecting a string as a path: ${in_quotedPathSegment}`);\n }\n\n if (in_quotedPathSegment[0] === '\"' && in_quotedPathSegment[in_quotedPathSegment.length - 1] === '\"') {\n // We remove double quotes\n in_quotedPathSegment = in_quotedPathSegment.substr(1, in_quotedPathSegment.length - 2);\n\n // Then we unescape escape symbols\n in_quotedPathSegment = in_quotedPathSegment.replace(/\\\\\\\\/g, \"\\\\\");\n\n // Then we unescape quotes\n in_quotedPathSegment = in_quotedPathSegment.replace(/\\\\\"/g, '\"');\n }\n\n return in_quotedPathSegment;\n };\n\n /**\n * Adds quotation marks to a path string if they are needed\n *\n * @param in_pathSegment - The path string to put in quotes\n *\n * @returns quoted path string\n */\n export const quotePathSegmentIfNeeded = function(in_pathSegment: string): string {\n if (in_pathSegment.indexOf(PROPERTY_PATH_DELIMITER) !== -1 ||\n in_pathSegment.indexOf('\"') !== -1 ||\n in_pathSegment.indexOf(\"\\\\\") !== -1 ||\n in_pathSegment.indexOf(\"/\") !== -1 ||\n in_pathSegment.indexOf(\"*\") !== -1 ||\n in_pathSegment.indexOf(\"[\") !== -1 ||\n in_pathSegment.indexOf(\"]\") !== -1 ||\n in_pathSegment.length === 0) {\n return quotePathSegment(in_pathSegment);\n } else {\n return in_pathSegment;\n }\n };\n\n /**\n * This function checks, whether the supplied path is a valid repository absolute path.\n *\n * It has to be either an empty string, or a path starting with a /\n *\n * @param in_path - The path to check\n */\n export const checkValidRepositoryAbsolutePath = function(in_path: string) {\n if (in_path !== \"\" && // either an empty reference\n in_path[0] !== \"/\") { // or an absolute path starting with /\n throw new Error(MSG.INVALID_PATH_IN_REFERENCE);\n }\n };\n\n /**\n * This utility function provides a canonical representation of an absolute property path.\n * It is useful to compare partial checkout paths and property paths.\n * The canonical form of paths is not suitable for ChangeSets.\n *\n * @param in_absolutePath - The absolute path to make canonical\n * @return Absolute path in canonical form\n */\n export const convertAbsolutePathToCanonical = function(in_absolutePath: string): string {\n const tokenTypes = [];\n const tokens = tokenizePathString(in_absolutePath, tokenTypes);\n let path = \"\";\n for (let i = 0; i < tokenTypes.length; i++) {\n const tokenType = tokenTypes[i];\n switch (tokenType) {\n case TOKEN_TYPES.PATH_ROOT_TOKEN:\n // Skip the leading '/'\n break;\n case TOKEN_TYPES.RAISE_LEVEL_TOKEN:\n throw new Error(`No level up (\"../\") is expected in an absolute path: ${in_absolutePath}`);\n case TOKEN_TYPES.DEREFERENCE_TOKEN:\n throw new Error(`Dereference (\"*\") is not supported in canonical paths: ${in_absolutePath}`);\n case TOKEN_TYPES.ARRAY_TOKEN:\n case TOKEN_TYPES.PATH_SEGMENT_TOKEN:\n path += (PROPERTY_PATH_DELIMITER + quotePathSegmentIfNeeded(tokens[i]));\n break;\n default:\n break;\n }\n }\n // Removes the leading PROPERTY_PATH_DELIMITER.\n if (path) {\n path = path.substring(1);\n }\n return path;\n };\n\n /**\n * This utility function provides a canonical representation of a child property path.\n * It is useful to compare partial checkout paths and property paths.\n * The canonical form of paths is not suitable for ChangeSets.\n *\n * @param in_parentAbsolutePathCanonical - The absolute path of the parent property in canonical form\n * @param in_childId - The name of the child property in its parent\n * @returns Absolute path of the child property in canonical form\n */\n export const getChildAbsolutePathCanonical = function(in_parentAbsolutePathCanonical: string, in_childId: string): string {\n const childPath = quotePathSegmentIfNeeded(String(in_childId));\n if (in_parentAbsolutePathCanonical) {\n return (in_parentAbsolutePathCanonical + PROPERTY_PATH_DELIMITER + childPath);\n } else {\n return childPath;\n }\n };\n\n export enum CoverageExtent {\n // The base path is not covered by any path from a given list of paths.\n // This means a property with this path and all its children would not be covered.\n UNCOVERED,\n // The base path is partially covered by at least one path from a given list of paths.\n // This means a property with this path would be covered, but some of its children could be uncovered.\n PARTLY_COVERED,\n // The base path is fully covered by at least one path from a given list of paths.\n // This means a property with this path would be covered and all of its children would be covered also.\n FULLY_COVERED,\n }\n\n interface BasePathCoverage {\n coverageExtent: CoverageExtent;\n pathList: string[];\n }\n\n /**\n * Determines if the base path is covered by the given list of paths. From that you can deduce if a\n * property with that path and all its children are covered by the given list of paths.\n *\n * This function uses the canonical representation of the property paths.\n *\n * @param in_basePath - The property's absolute path in canonical form\n * @param in_paths - The array of paths that must cover the property and its children\n * @returns The coverage of the property and its children. For a coverage of\n * 'FULLY_COVERED', only the first matching path is returned.\n */\n export const getPathCoverage = function(in_basePath: string, in_paths: string[]): BasePathCoverage {\n // First, check if the base path is entirely included in one of the paths\n for (let i = 0; i < in_paths.length; i++) {\n if (in_basePath.startsWith(in_paths[i])) {\n return {\n coverageExtent: CoverageExtent.FULLY_COVERED,\n pathList: [in_paths[i]],\n };\n }\n }\n // We did not find a path including all the children of this insertion\n // Let's check if there are paths going through it.\n const paths = [];\n for (let i = 0; i < in_paths.length; i++) {\n if (in_paths[i].startsWith(in_basePath)) {\n paths.push(in_paths[i]);\n }\n }\n if (paths.length) {\n // We found at least one path including parts of the base path.\n return {\n coverageExtent: CoverageExtent.PARTLY_COVERED,\n pathList: paths,\n };\n }\n\n // We did not find any path covering the given base path.\n return {\n coverageExtent: CoverageExtent.UNCOVERED,\n pathList: paths,\n };\n };\n}\n"]}
@@ -84,8 +84,8 @@ export declare class TemplateValidator {
84
84
  * 4. PATCH revision should be increased when _only_ the template description changes.
85
85
  * 5. Adding one or more template attributes is a MINOR change.
86
86
  * 6. Removing one or more template attributes is a MAJOR change.
87
- * @param in_template The latest template version, as a JSON object.
88
- * @param in_templatePrevious The previous template version, as a JSON object. Optional.
87
+ * @param in_template - The latest template version, as a JSON object.
88
+ * @param in_templatePrevious - The previous template version, as a JSON object. Optional.
89
89
  * @returns The validation results. Example: {
90
90
  * isValid: false,
91
91
  * errors: ['Something went wrong. Validation failed.'],
@@ -107,8 +107,8 @@ export declare class TemplateValidator {
107
107
  * 4. PATCH revision should be increased when _only_ the template description changes.
108
108
  * 5. Adding one or more template attributes is a MINOR change.
109
109
  * 6. Removing one or more template attributes is a MAJOR change.
110
- * @param in_template The latest template version, as a JSON object.
111
- * @param in_templatePrevious The previous template version, as a JSON object. Optional.
110
+ * @param in_template - The latest template version, as a JSON object.
111
+ * @param in_templatePrevious - The previous template version, as a JSON object. Optional.
112
112
  * @returns A promise that resolves to the validation results as an object. Example: {
113
113
  * isValid: false,
114
114
  * errors: ['Something went wrong. Validation failed.'],
@@ -121,8 +121,8 @@ export declare class TemplateValidator {
121
121
  /**
122
122
  * Called by validateAsync if a previous schema is passed in argument
123
123
  *
124
- * @param in_template The latest template version, as a JSON object.
125
- * @param in_templatePrevious The previous template version, as a JSON object. Optional.
124
+ * @param in_template - The latest template version, as a JSON object.
125
+ * @param in_templatePrevious - The previous template version, as a JSON object. Optional.
126
126
  *
127
127
  * @returns promise that resolves to the validation results as an objet. See validateAsync
128
128
  * @ignore
@@ -1 +1 @@
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,GAA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AAE,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,QAAQ,CAAC,WAAW,CAAU;IACtC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAU;gBAC1B,SAAS,GAAE,wBAAmE;IAe1F;;;;;;;;;;;;;;;;;;;;;GAqBD;IACC,QAAQ,CAAC,WAAW,EAAE,cAAc,EAAE,mBAAmB,CAAC,EAAE,cAAc,GAAG,sBAAsB;IAiFnG;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,aAAa,CAAC,WAAW,EAAE,cAAc,EAAE,mBAAmB,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAcvH;;;;;;;;OAQG;YACW,gCAAgC;CAwCjD"}
@@ -77,9 +77,8 @@ const _extractTypeid = function (typeidOrReference) {
77
77
  };
78
78
  /**
79
79
  * Given a typeid string, fetches the semver 'x.y.z' version string.
80
- * @param in_typeid A PropertySet typeid. For example: 'TeamLeoValidation2:ColorID-1.0.0'.
81
- * @returns The semver 'x.y.z' version string, or null if in_typeid is not a valid
82
- * PropertySet typeid.
80
+ * @param in_typeid - A PropertySet typeid. For example: 'TeamLeoValidation2:ColorID-1.0.0'.
81
+ * @returns The semver 'x.y.z' version string, or null if in_typeid is not a valid PropertySet typeid.
83
82
  */
84
83
  const _getSemverFromTypeId = function (in_typeid) {
85
84
  const semverRegex = /.*-(.*)$/g;
@@ -88,7 +87,7 @@ const _getSemverFromTypeId = function (in_typeid) {
88
87
  };
89
88
  /**
90
89
  * Fetches the type name of a javascript entity.
91
- * @param in_obj A javascript entity.
90
+ * @param in_obj - A javascript entity.
92
91
  * @returns The type name for in_obj.
93
92
  */
94
93
  const _getType = (in_obj) => Object.prototype.toString.call(in_obj).slice(8, -1);
@@ -102,12 +101,14 @@ function isPropertyArray(source) {
102
101
  * An object deep compare with special handling for pset property arrays.
103
102
  * pset property arrays are allowed to be out of order as long as elements can be matched with
104
103
  * their id.
105
- * @param in_source The source entity to test for deep equality.
106
- * @param in_target The target entity to test for deep equality.
104
+ * @param in_source - The source entity to test for deep equality.
105
+ * @param in_target - The target entity to test for deep equality.
107
106
  * @returns {isEqual: false, path: 'foo.properties[1].x'}
108
- * isEqual: true if in_source and in_target property sets are equal, even if the individual
109
- * property arrays differ but contain the same out of order elements.
110
- * path: path to the property that is not equal.
107
+ *
108
+ * - isEqual: true if in_source and in_target property sets are equal, even if the individual property arrays
109
+ * differ but contain the same out of order elements.
110
+ *
111
+ * - path: path to the property that is not equal.
111
112
  */
112
113
  const _psetDeepEquals = function (in_source, in_target) {
113
114
  const idPath = [];
@@ -116,11 +117,11 @@ const _psetDeepEquals = function (in_source, in_target) {
116
117
  }
117
118
  /**
118
119
  * Create the _psetDeepEquals result.
119
- * @param isEqual Whether or not a PropertySet result is being constructed for
120
- * PropertySets that are deeply equal.
120
+ * @param isEqual - Whether or not a PropertySet result is being constructed for
121
+ * PropertySets that are deeply equal.
121
122
  * @returns {{isEqual: boolean, path: string}} An object that indicates whether or not the source
122
- * and target PropertySets are deeply equal. If they're not, it also contains a path to the
123
- * property that is not equal.
123
+ * and target PropertySets are deeply equal. If they're not, it also contains a path to the
124
+ * property that is not equal.
124
125
  */
125
126
  const _getPSetDeepEqualsResult = (isEqual) => ({
126
127
  isEqual,
@@ -128,9 +129,9 @@ const _psetDeepEquals = function (in_source, in_target) {
128
129
  });
129
130
  /**
130
131
  * Performs a recursive, depth first deep equal test against two PropertySets.
131
- * @param source The source entity to test for deep equality.
132
- * @param target The target entity to test for deep equality.
133
- * @param id The current path element being compared.
132
+ * @param source - The source entity to test for deep equality.
133
+ * @param target - The target entity to test for deep equality.
134
+ * @param id - The current path element being compared.
134
135
  * @return The result of _getPSetDeepEqualsResult
135
136
  */
136
137
  let _depthFirstDeepEquals = function (source, target, id) {
@@ -208,7 +209,7 @@ const _psetDeepEquals = function (in_source, in_target) {
208
209
  };
209
210
  /**
210
211
  * Fetches the non semver part of a typeid string.
211
- * @param in_typeid A PropertySet typeid. For example: 'TeamLeoValidation2:ColorID-1.0.0'.
212
+ * @param in_typeid - A PropertySet typeid. For example: 'TeamLeoValidation2:ColorID-1.0.0'.
212
213
  * @returns The typeid, without a semver.
213
214
  */
214
215
  const _stripSemverFromTypeId = function (in_typeid) {
@@ -236,7 +237,7 @@ const _unresolvedTypes = function (in_template) {
236
237
  };
237
238
  /**
238
239
  * Performs basic template validation.
239
- * @param in_template The template object to validate.
240
+ * @param in_template - The template object to validate.
240
241
  */
241
242
  const _validateBasic = function (in_template) {
242
243
  if (!in_template) {
@@ -248,14 +249,17 @@ const _validateBasic = function (in_template) {
248
249
  };
249
250
  /**
250
251
  * Validations performed when the version increases between consecutive templates.
252
+ *
253
+ * @remarks
251
254
  * For example: 1.1.3 -> 2.0.0
252
255
  * This function checks the change level (PATCH, MINOR, MAJOR) and analyses the template content
253
256
  * to emit warnings if the change level should be higher, given the content that changed.
254
- * This function assumes that: in_versionPrevious < in_version
255
- * @param in_template The latest template object.
256
- * @param in_templatePrevious The previous template object.
257
- * @param in_version The latest template version. Ex.: '2.0.0'.
258
- * @param in_versionPrevious The previous template version. Ex.: '1.1.3'.
257
+ * This function assumes that: in_versionPrevious < in_version.
258
+ *
259
+ * @param in_template - The latest template object.
260
+ * @param in_templatePrevious - The previous template object.
261
+ * @param in_version - The latest template version. Ex.: '2.0.0'.
262
+ * @param in_versionPrevious - The previous template version. Ex.: '1.1.3'.
259
263
  */
260
264
  const _validatePositiveIncrement = function (in_template, in_templatePrevious, in_version, in_versionPrevious) {
261
265
  property_common_1.ConsoleUtils.assert((0, semver_1.gt)(in_version, in_versionPrevious), "property-changeset.TemplateValidator._validatePositiveIncrement called on non incremental " +
@@ -437,8 +441,8 @@ const _validatePositiveIncrement = function (in_template, in_templatePrevious, i
437
441
  * Validations performed when the version between consecutive templates doesn't change.
438
442
  * For example: 1.1.3 -> 1.1.3.
439
443
  * Templates whose version didn't change should have identical content.
440
- * @param in_template The latest template object.
441
- * @param in_templatePrevious The previous template object.
444
+ * @param in_template - The latest template object.
445
+ * @param in_templatePrevious - The previous template object.
442
446
  */
443
447
  const _validateSameVersion = function (in_template, in_templatePrevious) {
444
448
  const result = _psetDeepEquals.call(this, in_templatePrevious, in_template);
@@ -450,21 +454,25 @@ const _validateSameVersion = function (in_template, in_templatePrevious) {
450
454
  /**
451
455
  * Validate a template
452
456
  * Check that the template is syntactically correct as well as semantically correct.
453
- * @param in_template The template to check against
454
- * Produces an {object|undefined} map of key-value pairs
455
- * where the path of the invalid property is the key and the value is the error message
456
- * i.e.
457
- * <pre>
458
- * {
459
- * 'isValid': true or false,
460
- * 'typeid': 'The typeid of the object being parsed',
461
- * 'unresolvedTypes': [ 'An array', 'of strong typeids', 'that were found',
462
- * 'in the document', 'but not resolved from the local cache' ],
463
- * 'resolvedTypes': [ 'Array of', 'strong types resolved', 'during template parsing'],
464
- * 'errors': [ 'Array of', 'objects describing', 'syntax errors in the template' ]
465
- * ...
466
- * }
467
- * </pre>
457
+ * @param in_template - The template to check against.
458
+ * Produces an {object|undefined} map of key-value pairs where the path of the invalid property is the key and the
459
+ * value is the error message.
460
+ *
461
+ * i.e.
462
+ *
463
+ * ```
464
+ * <pre>
465
+ * {
466
+ * 'isValid': true or false,
467
+ * 'typeid': 'The typeid of the object being parsed',
468
+ * 'unresolvedTypes': [ 'An array', 'of strong typeids', 'that were found',
469
+ * 'in the document', 'but not resolved from the local cache' ],
470
+ * 'resolvedTypes': [ 'Array of', 'strong types resolved', 'during template parsing'],
471
+ * 'errors': [ 'Array of', 'objects describing', 'syntax errors in the template' ]
472
+ * ...
473
+ * }
474
+ * </pre>
475
+ * ```
468
476
  * @throws if context validation fails
469
477
  */
470
478
  const _validateSemanticAndSyntax = function (in_template) {
@@ -475,7 +483,7 @@ const _validateSemanticAndSyntax = function (in_template) {
475
483
  /**
476
484
  * Validate a template
477
485
  * Check that the template is syntactically correct as well as semantically correct.
478
- * @param in_template The template to check against
486
+ * @param in_template - The template to check against
479
487
  * @return {Promise} a promise that resolved to nothing
480
488
  * @ignore
481
489
  */
@@ -484,7 +492,7 @@ const _validateSemanticAndSyntaxAsync = async function (in_template) {
484
492
  };
485
493
  /**
486
494
  * Validates that the semver part of a template's typeid is valid.
487
- * @param {Object} in_template The template object to validate.
495
+ * @param {Object} in_template - The template object to validate.
488
496
  * @return {string} The semver string. For example: '1.0.0'.
489
497
  * @private
490
498
  * @this TemplateValidator
@@ -503,8 +511,8 @@ const _validateSemverFormat = function (in_template) {
503
511
  /**
504
512
  * Skip semver validation. Verify that the content is the same for both templates, while ignoring
505
513
  * the root 'typeid' property.
506
- * @param {Object} in_template The latest template object.
507
- * @param {Object} in_templatePrevious The previous template object.
514
+ * @param {Object} in_template - The latest template object.
515
+ * @param {Object} in_templatePrevious - The previous template object.
508
516
  * @private
509
517
  * @this TemplateValidator
510
518
  */
@@ -518,8 +526,8 @@ const _validateSkipSemver = function (in_template, in_templatePrevious) {
518
526
  };
519
527
  /**
520
528
  * Checks if an invalid context error should be signified
521
-
522
- * @param {String} in_context The latest template object.
529
+ *
530
+ * @param {String} in_context - The latest template object.
523
531
  * @return {Error|undefined} If exists returns the InvalidContext error
524
532
  * @private
525
533
  * @this TemplateValidator
@@ -533,7 +541,7 @@ const getInvalidContextError = function (in_context) {
533
541
  /**
534
542
  * Validate that the context is valid
535
543
  * Validate that only Named Properties are in sets
536
- * @param {object} in_template The template to check against
544
+ * @param {object} in_template - The template to check against
537
545
  * @ignore
538
546
  * @throws if the context is invalid.
539
547
  */
@@ -550,7 +558,7 @@ const _validateContext = function (in_template) {
550
558
  /**
551
559
  * Validate just the syntax of a template
552
560
  * Check that the template is well-formed, according to the schema.
553
- * @param {object} in_template The template to check against
561
+ * @param {object} in_template - The template to check against
554
562
  *
555
563
  * Context validation makes sure that elements of sets eventually inherit from NamedProperty.
556
564
  * If this is not the case, a promise rejection will occur with the appropriate error.
@@ -614,7 +622,7 @@ const _validateContextAsync = async function (in_template) {
614
622
  /**
615
623
  * Validate that the context is valid
616
624
  * Validate that only Named Properties are in sets
617
- * @param {object} in_template The template to check against
625
+ * @param {object} in_template - The template to check against
618
626
  * @ignore
619
627
  * @throws if the context is invalid.
620
628
  */
@@ -637,7 +645,7 @@ let _validateConstants = function (in_template) {
637
645
  /**
638
646
  * Analyze output of the syntax validation and build error messages
639
647
  *
640
- * @param in_template The template that was analyzed
648
+ * @param in_template - The template that was analyzed
641
649
  */
642
650
  const _processValidationResults = function (in_template) {
643
651
  let that = this;
@@ -709,7 +717,7 @@ const _processValidationResults = function (in_template) {
709
717
  /**
710
718
  * Validate just the syntax of a template
711
719
  * Check that the template is well-formed, according to the schema.
712
- * @param in_template The template to check against
720
+ * @param in_template - The template to check against
713
721
  * @throws if a property with context set is not an instance of NamedProperties
714
722
  * @ignore
715
723
  */
@@ -746,7 +754,7 @@ const createContextCheckAsyncQueue = function () {
746
754
  * Validate just the syntax of a template
747
755
  * Check that the template is well-formed, according to the schema.
748
756
  *
749
- * @param in_template The template to check against
757
+ * @param in_template - The template to check against
750
758
  * Mainly checks context. See _validateContextAsync
751
759
  * @returns Promise that resolves without any result
752
760
  * @ignore
@@ -823,8 +831,8 @@ class TemplateValidator {
823
831
  * 4. PATCH revision should be increased when _only_ the template description changes.
824
832
  * 5. Adding one or more template attributes is a MINOR change.
825
833
  * 6. Removing one or more template attributes is a MAJOR change.
826
- * @param in_template The latest template version, as a JSON object.
827
- * @param in_templatePrevious The previous template version, as a JSON object. Optional.
834
+ * @param in_template - The latest template version, as a JSON object.
835
+ * @param in_templatePrevious - The previous template version, as a JSON object. Optional.
828
836
  * @returns The validation results. Example: {
829
837
  * isValid: false,
830
838
  * errors: ['Something went wrong. Validation failed.'],
@@ -911,8 +919,8 @@ class TemplateValidator {
911
919
  * 4. PATCH revision should be increased when _only_ the template description changes.
912
920
  * 5. Adding one or more template attributes is a MINOR change.
913
921
  * 6. Removing one or more template attributes is a MAJOR change.
914
- * @param in_template The latest template version, as a JSON object.
915
- * @param in_templatePrevious The previous template version, as a JSON object. Optional.
922
+ * @param in_template - The latest template version, as a JSON object.
923
+ * @param in_templatePrevious - The previous template version, as a JSON object. Optional.
916
924
  * @returns A promise that resolves to the validation results as an object. Example: {
917
925
  * isValid: false,
918
926
  * errors: ['Something went wrong. Validation failed.'],
@@ -937,8 +945,8 @@ class TemplateValidator {
937
945
  /**
938
946
  * Called by validateAsync if a previous schema is passed in argument
939
947
  *
940
- * @param in_template The latest template version, as a JSON object.
941
- * @param in_templatePrevious The previous template version, as a JSON object. Optional.
948
+ * @param in_template - The latest template version, as a JSON object.
949
+ * @param in_templatePrevious - The previous template version, as a JSON object. Optional.
942
950
  *
943
951
  * @returns promise that resolves to the validation results as an objet. See validateAsync
944
952
  * @ignore