diff --git a/dist/graphql.js b/dist/graphql.js index 899ea55e..b09f14ef 100644 --- a/dist/graphql.js +++ b/dist/graphql.js @@ -2001,17 +2001,17 @@ var RepositoryRuleType; RepositoryRuleType["Creation"] = "CREATION"; /** Only allow users with bypass permissions to delete matching refs. */ RepositoryRuleType["Deletion"] = "DELETION"; - /** Prevent users with push access from force pushing to branches. */ + /** Prevent users with push access from force pushing to refs. */ RepositoryRuleType["NonFastForward"] = "NON_FAST_FORWARD"; /** Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. */ RepositoryRuleType["PullRequest"] = "PULL_REQUEST"; - /** Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. */ + /** Choose which environments must be successfully deployed to before refs can be merged into a branch that matches this rule. */ RepositoryRuleType["RequiredDeployments"] = "REQUIRED_DEPLOYMENTS"; - /** Prevent merge commits from being pushed to matching branches. */ + /** Prevent merge commits from being pushed to matching refs. */ RepositoryRuleType["RequiredLinearHistory"] = "REQUIRED_LINEAR_HISTORY"; - /** Commits pushed to matching branches must have verified signatures. */ + /** Commits pushed to matching refs must have verified signatures. */ RepositoryRuleType["RequiredSignatures"] = "REQUIRED_SIGNATURES"; - /** Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. */ + /** Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a ref that matches this rule after status checks have passed. */ RepositoryRuleType["RequiredStatusChecks"] = "REQUIRED_STATUS_CHECKS"; /** Tag name pattern */ RepositoryRuleType["TagNamePattern"] = "TAG_NAME_PATTERN"; diff --git a/dist/vendor.js b/dist/vendor.js index bd877325..036c9758 100644 --- a/dist/vendor.js +++ b/dist/vendor.js @@ -7209,6 +7209,7 @@ Builder.prototype.j2x = function(jObj, level) { let attrStr = ''; let val = ''; for (let key in jObj) { + if(!jObj.hasOwnProperty(key)) continue; if (typeof jObj[key] === 'undefined') { // supress undefined node only if it is not an attribute if (this.isAttribute(key)) { @@ -7427,6 +7428,8 @@ function arrToStr(arr, options, jPath, indentation) { for (let i = 0; i < arr.length; i++) { const tagObj = arr[i]; const tagName = propName(tagObj); + if(tagName === undefined) continue; + let newJPath = ""; if (jPath.length === 0) newJPath = tagName else newJPath = `${jPath}.${tagName}`; @@ -7496,6 +7499,7 @@ function propName(obj) { const keys = Object.keys(obj); for (let i = 0; i < keys.length; i++) { const key = keys[i]; + if(!obj.hasOwnProperty(key)) continue; if (key !== ":@") return key; } } @@ -7504,6 +7508,7 @@ function attr_to_str(attrMap, options) { let attrStr = ""; if (attrMap && !options.ignoreAttributes) { for (let attr in attrMap) { + if(!attrMap.hasOwnProperty(attr)) continue; let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); attrVal = replaceEntitiesValue(attrVal, options); if (attrVal === true && options.suppressBooleanAttributes) { @@ -8038,6 +8043,7 @@ const parseXml = function(xmlData) { }else {//Opening tag let result = readTagExp(xmlData,i, this.options.removeNSPrefix); let tagName= result.tagName; + const rawTagName = result.rawTagName; let tagExp = result.tagExp; let attrExpPresent = result.attrExpPresent; let closeIndex = result.closeIndex; @@ -8063,7 +8069,7 @@ const parseXml = function(xmlData) { if(tagName !== xmlObj.tagname){ jPath += jPath ? "." + tagName : tagName; } - if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { //TODO: namespace + if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { let tagContent = ""; //self-closing tag if(tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1){ @@ -8076,8 +8082,8 @@ const parseXml = function(xmlData) { //normal tag else{ //read until closing tag is found - const result = this.readStopNodeData(xmlData, tagName, closeIndex + 1); - if(!result) throw new Error(`Unexpected end of ${tagName}`); + const result = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); + if(!result) throw new Error(`Unexpected end of ${rawTagName}`); i = result.i; tagContent = result.tagContent; } @@ -8262,6 +8268,7 @@ function readTagExp(xmlData,i, removeNSPrefix, closingChar = ">"){ tagExp = tagExp.substr(separatorIndex + 1); } + const rawTagName = tagName; if(removeNSPrefix){ const colonIndex = tagName.indexOf(":"); if(colonIndex !== -1){ @@ -8275,6 +8282,7 @@ function readTagExp(xmlData,i, removeNSPrefix, closingChar = ">"){ tagExp: tagExp, closeIndex: closeIndex, attrExpPresent: attrExpPresent, + rawTagName: rawTagName, } } /** diff --git a/graphql/graphql.ts b/graphql/graphql.ts index aff82c22..6c5aac14 100644 --- a/graphql/graphql.ts +++ b/graphql/graphql.ts @@ -21678,17 +21678,17 @@ export enum RepositoryRuleType { Creation = 'CREATION', /** Only allow users with bypass permissions to delete matching refs. */ Deletion = 'DELETION', - /** Prevent users with push access from force pushing to branches. */ + /** Prevent users with push access from force pushing to refs. */ NonFastForward = 'NON_FAST_FORWARD', /** Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. */ PullRequest = 'PULL_REQUEST', - /** Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. */ + /** Choose which environments must be successfully deployed to before refs can be merged into a branch that matches this rule. */ RequiredDeployments = 'REQUIRED_DEPLOYMENTS', - /** Prevent merge commits from being pushed to matching branches. */ + /** Prevent merge commits from being pushed to matching refs. */ RequiredLinearHistory = 'REQUIRED_LINEAR_HISTORY', - /** Commits pushed to matching branches must have verified signatures. */ + /** Commits pushed to matching refs must have verified signatures. */ RequiredSignatures = 'REQUIRED_SIGNATURES', - /** Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. */ + /** Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a ref that matches this rule after status checks have passed. */ RequiredStatusChecks = 'REQUIRED_STATUS_CHECKS', /** Tag name pattern */ TagNamePattern = 'TAG_NAME_PATTERN', @@ -22128,14 +22128,14 @@ export type RequirableByPullRequestIsRequiredArgs = { pullRequestNumber?: InputMaybe; }; -/** Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. */ +/** Choose which environments must be successfully deployed to before refs can be merged into a branch that matches this rule. */ export type RequiredDeploymentsParameters = { __typename?: 'RequiredDeploymentsParameters'; /** The environments that must be successfully deployed to before branches can be merged. */ requiredDeploymentEnvironments: Array; }; -/** Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. */ +/** Choose which environments must be successfully deployed to before refs can be merged into a branch that matches this rule. */ export type RequiredDeploymentsParametersInput = { /** The environments that must be successfully deployed to before branches can be merged. */ requiredDeploymentEnvironments: Array; @@ -22158,7 +22158,7 @@ export type RequiredStatusCheckInput = { context: Scalars['String']['input']; }; -/** Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. */ +/** Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a ref that matches this rule after status checks have passed. */ export type RequiredStatusChecksParameters = { __typename?: 'RequiredStatusChecksParameters'; /** Status checks that are required. */ @@ -22167,7 +22167,7 @@ export type RequiredStatusChecksParameters = { strictRequiredStatusChecksPolicy: Scalars['Boolean']['output']; }; -/** Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. */ +/** Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a ref that matches this rule after status checks have passed. */ export type RequiredStatusChecksParametersInput = { /** Status checks that are required. */ requiredStatusChecks: Array;