From 099d2b54da0203dc83f0381cdc26c32f9dc406dd Mon Sep 17 00:00:00 2001 From: Dino Chiesa Date: Fri, 1 Nov 2024 17:18:40 -0700 Subject: [PATCH] fix: look more thoroughly for xmldom/xmldom (#487) * fix: look more thoroughly for xmldom/xmldom * update package.json to require node v20 or later * feat: PO038 check KeyValueMapOperations MapName and identifier (#485) * feat: PO038 check KeyValueMapOperations MapName and identifier * add README update * fix: BN013 correct handling of resource shortname (#486) * fix: BN013 correct handling of resource shortname * clean comments from test module * fix: look more thoroughly for xmldom/xmldom * update package.json to require node v20 or later * fix: replace myUtil with lintUtil.js,and cleanup xmldom test --- lib/package/Bundle.js | 8 +- lib/package/Endpoint.js | 8 +- lib/package/FaultRule.js | 55 +- lib/package/Flow.js | 6 +- lib/package/FlowPhase.js | 48 +- lib/package/Policy.js | 4 +- lib/package/Resource.js | 22 +- lib/package/Step.js | 83 +- lib/package/bundleLinter.js | 4 +- lib/package/{myUtil.js => lintUtil.js} | 42 +- .../plugins/BN001-checkBundleStructure.js | 2 +- .../plugins/BN003-checkCacheCoherence.js | 2 +- lib/package/plugins/BN004-unusedVariables.js | 2 +- .../plugins/BN005-checkUnattachedPolicies.js | 2 +- lib/package/plugins/BN006-policyCount.js | 2 +- .../plugins/BN007-bundleSizeResourceCount.js | 2 +- ...-checkForMultipleStatsCollectorPolicies.js | 2 +- lib/package/plugins/BN010-missingPolicies.js | 2 +- lib/package/plugins/BN011-wellFormedXml.js | 2 +- .../plugins/BN012-unreferencedTargets.js | 2 +- .../plugins/BN013-unreferenced-resources.js | 2 +- .../plugins/BN014-duplicate-policies.js | 2 +- .../CC001-checkConditionForLiterals.js | 2 +- .../plugins/CC003-checkConditionLength.js | 2 +- .../plugins/CC004-checkConditionComplexity.js | 2 +- .../plugins/CC005-unterminatedStrings.js | 2 +- .../plugins/CC006-checkConditionTruth.js | 2 +- lib/package/plugins/CC007-ConditionSyntax.js | 2 +- .../DC001-deprecationConcurrentRateLimit.js | 2 +- .../plugins/DC002-deprecationOAuthV1.js | 2 +- .../plugins/EP001-corsPolicyAttachment.js | 2 +- .../plugins/EP002-misplacedElements.js | 2 +- lib/package/plugins/FE001-authentication.js | 4 +- .../plugins/FL001-unconditionalFlows.js | 2 +- .../plugins/FR001-checkFaultRuleCondition.js | 2 +- .../plugins/FR002-checkDefaultFaultRule.js | 2 +- lib/package/plugins/FR003-singleFaultRule.js | 2 +- lib/package/plugins/PD001-missingTargets.js | 2 +- lib/package/plugins/PD002-emptyRouteRules.js | 2 +- .../plugins/PD003-emptyRouteRuleLast.js | 2 +- lib/package/plugins/PD004-proxyNameAttr.js | 2 +- .../plugins/PD005-unnecessaryVirtualHost.js | 2 +- .../plugins/PO006-checkPolicyNameAttribute.js | 2 +- .../plugins/PO007-policyNameConventions.js | 2 +- .../plugins/PO008-checkPolicyDisplayName.js | 2 +- .../plugins/PO012-assignMessageAssignTo.js | 2 +- lib/package/plugins/PO013-jsHint.js | 2 +- .../plugins/PO018-checkRegexLookAround.js | 2 +- .../PO019-serviceCalloutRequestName.js | 6 +- .../PO020-serviceCalloutResponseName.js | 6 +- .../plugins/PO022-distributedQuotaCheck.js | 2 +- .../plugins/PO023-quotaPolicyReuseCheck.js | 10 +- .../PO024-responseCacheErrorResponseCheck.js | 2 +- lib/package/plugins/PO025-eslint.js | 2 +- .../plugins/PO026-assignVariableUsage.js | 2 +- lib/package/plugins/PO027-hmacPolicy.js | 2 +- .../PO028-policyAvailabilityInProfile.js | 2 +- .../plugins/PO029-unknownPolicyTypes.js | 2 +- lib/package/plugins/PO030-ExpirySettings.js | 2 +- .../PO031-assignMessage-ContentType.js | 2 +- lib/package/plugins/PO032-CORS-hygiene.js | 2 +- .../plugins/PO033-extractVariables-hygiene.js | 4 +- lib/package/plugins/PO034-am-hygiene.js | 2 +- lib/package/plugins/PO035-quota-hygiene.js | 2 +- .../PO036-serviceCallout-response-element.js | 4 +- .../PO037-DataCapture-hygiene-checks.js | 2 +- lib/package/plugins/PO038-kvm-mapname.js | 2 +- lib/package/plugins/README.md | 2 +- .../plugins/ST001-checkForEmptySteps.js | 2 +- .../plugins/ST002-checkStepStructure.js | 2 +- .../ST003-extractJSONConditionCheck.js | 2 +- .../plugins/ST004-extractXMLConditionCheck.js | 2 +- .../ST005-extractFormParamConditionCheck.js | 2 +- ...T006-threatProtectionJSONConditionCheck.js | 2 +- ...ST007-threatProtectionXMLConditionCheck.js | 2 +- .../TD001-mgmtServerTargetEndpointCheck.js | 2 +- lib/package/plugins/TD002-useTargetServers.js | 2 +- lib/package/plugins/TD003-targetNameAttr.js | 2 +- ...TD004-targetSslInfo-enabled-and-enforce.js | 2 +- .../plugins/TD005-targetSslReferences.js | 2 +- .../TD006-target-LoadBalancer-SslInfo.js | 2 +- .../plugins/TD007-targetSslInfo-Truststore.js | 2 +- .../TD008-target-LB-multiple-fallbacks.js | 2 +- .../plugins/TD009-target-LB-multiple-LB.js | 2 +- .../TD010-target-LB-duplicate-servers.js | 2 +- ...targetSslInfo-no-ignoreValidationErrors.js | 2 +- ...TD012-targetSslInfo-exactly-one-SSLInfo.js | 2 +- .../TD013-targetSslInfo-clientAuthEnabled.js | 2 +- ...-target-exactly-one-URL-or-LoadBalancer.js | 2 +- .../plugins/TD015-target-LB-no-MaxFailures.js | 2 +- .../resources/issue481/package-lock.json | 2794 +++++++++++++++++ test/fixtures/resources/issue481/package.json | 15 + .../sample/apiproxy/json-threat-ex1.xml | 9 + ...AM-Clean-Request-Headers-From-Response.xml | 19 + .../AM-Inject-Proxy-Revision-Header.xml | 7 + .../apiproxy/policies/AM-Response-OK.xml | 8 + .../policies/JSONThreatProtection-1.xml | 8 + .../apiproxy/policies/RF-Unknown-Request.xml | 13 + .../policies/RF-Unsupported-Media-Type.xml | 13 + .../sample/apiproxy/proxies/endpoint1.xml | 65 + test/specs/testXmlNodeLabels.js | 101 +- 101 files changed, 3276 insertions(+), 238 deletions(-) rename lib/package/{myUtil.js => lintUtil.js} (90%) create mode 100644 test/fixtures/resources/issue481/package-lock.json create mode 100644 test/fixtures/resources/issue481/package.json create mode 100644 test/fixtures/resources/issue481/sample/apiproxy/json-threat-ex1.xml create mode 100644 test/fixtures/resources/issue481/sample/apiproxy/policies/AM-Clean-Request-Headers-From-Response.xml create mode 100644 test/fixtures/resources/issue481/sample/apiproxy/policies/AM-Inject-Proxy-Revision-Header.xml create mode 100644 test/fixtures/resources/issue481/sample/apiproxy/policies/AM-Response-OK.xml create mode 100644 test/fixtures/resources/issue481/sample/apiproxy/policies/JSONThreatProtection-1.xml create mode 100644 test/fixtures/resources/issue481/sample/apiproxy/policies/RF-Unknown-Request.xml create mode 100644 test/fixtures/resources/issue481/sample/apiproxy/policies/RF-Unsupported-Media-Type.xml create mode 100644 test/fixtures/resources/issue481/sample/apiproxy/proxies/endpoint1.xml diff --git a/lib/package/Bundle.js b/lib/package/Bundle.js index 33d4e6d4..b8f174f7 100644 --- a/lib/package/Bundle.js +++ b/lib/package/Bundle.js @@ -26,8 +26,8 @@ const findFolders = require("./findFolders.js"), bundleType = require("./BundleTypes.js"), DEBUG = require("debug"), debug = DEBUG("apigeelint:Bundle"), - myUtil = require("./myUtil.js"), - getcb = myUtil.curry(myUtil.diagcb, debug); + lintUtil = require("./lintUtil.js"), + getcb = lintUtil.curry(lintUtil.diagcb, debug); function _buildEndpoints(folder, tag, bundle, processFunction) { try { @@ -206,7 +206,7 @@ function processFileSystem(config, bundle, cb) { //bundle.policies = []; //process.chdir(config.source.path); bundle.report = { - filePath: myUtil.effectivePath(bundle.root, bundleTypeName), + filePath: lintUtil.effectivePath(bundle.root, bundleTypeName), errorCount: 0, warningCount: 0, fixableErrorCount: 0, @@ -352,7 +352,7 @@ Bundle.prototype.getReport = function (cb) { const docElement = new Dom().parseFromString( fs.readFileSync(item.filePath).toString() ).documentElement; - const directives = myUtil.findDirectives(docElement); + const directives = lintUtil.findDirectives(docElement); d(JSON.stringify(directives, null, 2)); if (directives.length > 0) { const keep = (item) => { diff --git a/lib/package/Endpoint.js b/lib/package/Endpoint.js index fb3b836c..7afe25f1 100644 --- a/lib/package/Endpoint.js +++ b/lib/package/Endpoint.js @@ -18,11 +18,11 @@ const Flow = require("./Flow.js"), RouteRule = require("./RouteRule.js"), FaultRule = require("./FaultRule.js"), xpath = require("xpath"), - myUtil = require("./myUtil.js"), + lintUtil = require("./lintUtil.js"), debug = require("debug")("apigeelint:Endpoint"), util = require("util"), fs = require("fs"), - getcb = myUtil.curry(myUtil.diagcb, debug), + getcb = lintUtil.curry(lintUtil.diagcb, debug), HTTPProxyConnection = require("./HTTPProxyConnection.js"), HTTPTargetConnection = require("./HTTPTargetConnection.js"), bundleTypes = require("./BundleTypes.js"); @@ -40,7 +40,7 @@ function Endpoint(element, parent, fname, bundletype) { this.httpProxyConnection = null; this.httpTargetConnection = null; this.report = { - filePath: myUtil.effectivePath(fname, this.bundleType), + filePath: lintUtil.effectivePath(fname, this.bundleType), errorCount: 0, warningCount: 0, fixableErrorCount: 0, @@ -132,7 +132,7 @@ Endpoint.prototype.getProxyName = function () { this.proxyName = this.fileName + ":" + - myUtil.buildTagBreadCrumb(this.element) + + lintUtil.buildTagBreadCrumb(this.element) + this.getName(); } return this.proxyName; diff --git a/lib/package/FaultRule.js b/lib/package/FaultRule.js index 2f20dcd8..422cca82 100644 --- a/lib/package/FaultRule.js +++ b/lib/package/FaultRule.js @@ -1,5 +1,5 @@ /* - Copyright 2019-2020 Google LLC + Copyright 2019-2020,2024 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,17 +15,17 @@ */ const Condition = require("./Condition.js"), - xpath = require("xpath"), - debug = require("debug")("apigeelint:FaultRule"), - myUtil = require("./myUtil.js"), - getcb = myUtil.curry(myUtil.diagcb, debug); + xpath = require("xpath"), + debug = require("debug")("apigeelint:FaultRule"), + lintUtil = require("./lintUtil.js"), + getcb = lintUtil.curry(lintUtil.diagcb, debug); function FaultRule(element, parent) { this.parent = parent; this.element = element; } -FaultRule.prototype.getName = function() { +FaultRule.prototype.getName = function () { if (!this.name) { var attr = xpath.select("./@name", this.element); this.name = (attr[0] && attr[0].value) || ""; @@ -33,15 +33,15 @@ FaultRule.prototype.getName = function() { return this.name; }; -FaultRule.prototype.getMessages = function() { +FaultRule.prototype.getMessages = function () { return this.parent.getMessages(); }; -FaultRule.prototype.getLines = function(start, stop) { +FaultRule.prototype.getLines = function (start, stop) { return this.parent.getLines(start, stop); }; -FaultRule.prototype.getSource = function() { +FaultRule.prototype.getSource = function () { if (!this.source) { var start = this.element.lineNumber - 1, stop = this.element.nextSibling.lineNumber - 1; @@ -50,18 +50,18 @@ FaultRule.prototype.getSource = function() { return this.source; }; -FaultRule.prototype.getType = function() { +FaultRule.prototype.getType = function () { return this.element.tagName; }; -FaultRule.prototype.getSteps = function() { +FaultRule.prototype.getSteps = function () { if (!this.steps) { var doc = xpath.select("./Step", this.element), fr = this, Step = require("./Step.js"); fr.steps = []; if (doc) { - doc.forEach(function(stElement) { + doc.forEach(function (stElement) { fr.steps.push(new Step(stElement, fr)); }); } @@ -69,7 +69,7 @@ FaultRule.prototype.getSteps = function() { return this.steps; }; -FaultRule.prototype.getCondition = function() { +FaultRule.prototype.getCondition = function () { if (!this.condition) { var doc = xpath.select("./Condition", this.element); this.condition = doc && doc[0] && new Condition(doc[0], this); @@ -77,50 +77,55 @@ FaultRule.prototype.getCondition = function() { return this.condition; }; -FaultRule.prototype.getElement = function() { +FaultRule.prototype.getElement = function () { return this.element; }; -FaultRule.prototype.getParent = function() { +FaultRule.prototype.getParent = function () { return this.parent; }; -FaultRule.prototype.addMessage = function(msg) { +FaultRule.prototype.addMessage = function (msg) { if (!msg.hasOwnProperty("entity")) { msg.entity = this; } this.parent.addMessage(msg); }; -FaultRule.prototype.onConditions = function(pluginFunction, callback) { +FaultRule.prototype.onConditions = function (pluginFunction, callback) { let faultRule = this, - steps = faultRule.getSteps(); + steps = faultRule.getSteps(); if (faultRule.getCondition()) { - pluginFunction(faultRule.getCondition(), getcb(`onConditions '${faultRule.getName()}'`)); + pluginFunction( + faultRule.getCondition(), + getcb(`onConditions '${faultRule.getName()}'`), + ); } if (steps && steps.length > 0) { steps.forEach((step, ix) => - step.onConditions(pluginFunction, getcb(`onConditions step ${ix}`))); + step.onConditions(pluginFunction, getcb(`onConditions step ${ix}`)), + ); } callback(null, {}); }; -FaultRule.prototype.onSteps = function(pluginFunction, callback) { +FaultRule.prototype.onSteps = function (pluginFunction, callback) { let faultRule = this, - steps = faultRule.getSteps(); + steps = faultRule.getSteps(); if (steps && steps.length > 0) { steps.forEach((step, ix) => - step.onSteps(pluginFunction, getcb(`onSteps step ${ix}`))); + step.onSteps(pluginFunction, getcb(`onSteps step ${ix}`)), + ); } callback(null, {}); }; -FaultRule.prototype.summarize = function() { +FaultRule.prototype.summarize = function () { var summary = {}; summary.name = this.getName(); var theSteps = this.getSteps(); summary.steps = []; - theSteps.forEach(function(step) { + theSteps.forEach(function (step) { summary.steps.push(step.summarize()); }); summary.condition = diff --git a/lib/package/Flow.js b/lib/package/Flow.js index 53965255..fb7fd8fe 100644 --- a/lib/package/Flow.js +++ b/lib/package/Flow.js @@ -17,9 +17,9 @@ const xpath = require("xpath"), FlowPhase = require("./FlowPhase.js"), Condition = require("./Condition.js"), - myUtil = require("./myUtil.js"), + lintUtil = require("./lintUtil.js"), debug = require("debug")("apigeelint:Flow"), - getcb = myUtil.curry(myUtil.diagcb, debug); + getcb = lintUtil.curry(lintUtil.diagcb, debug); function Flow(element, parent) { this.parent = parent; // like ProxyEndpoint , TargetEndpoint @@ -59,7 +59,7 @@ Flow.prototype.getType = function () { Flow.prototype.getFlowName = function () { if (!this.flowName) { this.flowName = - myUtil.getFileName(this) + ":" + myUtil.buildTagBreadCrumb(this.element); + lintUtil.getFileName(this) + ":" + lintUtil.buildTagBreadCrumb(this.element); if (this.getName()) { this.flowName += this.name; } diff --git a/lib/package/FlowPhase.js b/lib/package/FlowPhase.js index 4c0ff60f..3f7f0260 100644 --- a/lib/package/FlowPhase.js +++ b/lib/package/FlowPhase.js @@ -1,5 +1,5 @@ /* - Copyright 2019 Google LLC + Copyright 2019,2024 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,10 +15,10 @@ */ const xpath = require("xpath"), - Step = require("./Step.js"), - myUtil = require("./myUtil.js"), - debug = require("debug")("apigeelint:FlowPhase"), - getcb = myUtil.curry(myUtil.diagcb, debug); + Step = require("./Step.js"), + lintUtil = require("./lintUtil.js"), + debug = require("debug")("apigeelint:FlowPhase"), + getcb = lintUtil.curry(lintUtil.diagcb, debug); function FlowPhase(element, parent) { this.parent = parent; @@ -26,7 +26,7 @@ function FlowPhase(element, parent) { debug(`parent is ${parent.getType()}`); } -FlowPhase.prototype.getType = function() { +FlowPhase.prototype.getType = function () { if (!this.type) { this.type = "FlowPhase"; //this.type = this.getPhase(); @@ -34,24 +34,24 @@ FlowPhase.prototype.getType = function() { return this.type; }; -FlowPhase.prototype.getMessages = function() { +FlowPhase.prototype.getMessages = function () { return this.parent.getMessages(); }; -FlowPhase.prototype.getPhase = function() { +FlowPhase.prototype.getPhase = function () { if (!this.phase) { this.phase = this.element.tagName; } return this.phase; }; -FlowPhase.prototype.getSteps = function() { +FlowPhase.prototype.getSteps = function () { if (!this.steps) { let doc = xpath.select("./Step", this.element), - fp = this; + fp = this; fp.steps = []; if (doc) { - doc.forEach(function(stepElement) { + doc.forEach(function (stepElement) { fp.steps.push(new Step(stepElement, fp)); }); } @@ -59,33 +59,33 @@ FlowPhase.prototype.getSteps = function() { return this.steps; }; -FlowPhase.prototype.onSteps = function(pluginFunction, cb) { +FlowPhase.prototype.onSteps = function (pluginFunction, cb) { let steps = this.getSteps(); if (steps && steps.length > 0) { - steps.forEach( (step, ix) => - pluginFunction(step, getcb(`step ${ix}`))); + steps.forEach((step, ix) => pluginFunction(step, getcb(`step ${ix}`))); } cb(null, {}); }; -FlowPhase.prototype.onConditions = function(pluginFunction, cb) { +FlowPhase.prototype.onConditions = function (pluginFunction, cb) { let steps = this.getSteps(); if (steps && steps.length > 0) { - steps.forEach( (step, ix) => - step.onConditions(pluginFunction, getcb(`step ${ix}`))); + steps.forEach((step, ix) => + step.onConditions(pluginFunction, getcb(`step ${ix}`)), + ); } cb(null, {}); }; -FlowPhase.prototype.getElement = function() { +FlowPhase.prototype.getElement = function () { return this.element; }; -FlowPhase.prototype.getLines = function(start, stop) { +FlowPhase.prototype.getLines = function (start, stop) { return this.parent.getLines(start, stop); }; -FlowPhase.prototype.getSource = function() { +FlowPhase.prototype.getSource = function () { if (!this.source) { var start = this.element.lineNumber - 1, stop = this.element.nextSibling.lineNumber - 1; @@ -94,22 +94,22 @@ FlowPhase.prototype.getSource = function() { return this.source; }; -FlowPhase.prototype.getParent = function() { +FlowPhase.prototype.getParent = function () { return this.parent; }; -FlowPhase.prototype.addMessage = function(msg) { +FlowPhase.prototype.addMessage = function (msg) { if (!msg.hasOwnProperty("entity")) { msg.entity = this; } this.parent.addMessage(msg); }; -FlowPhase.prototype.summarize = function() { +FlowPhase.prototype.summarize = function () { var summary = {}; summary.steps = []; var theSteps = this.getSteps(); - theSteps.forEach(function(step) { + theSteps.forEach(function (step) { summary.steps.push(step.summarize()); }); return summary; diff --git a/lib/package/Policy.js b/lib/package/Policy.js index af302e5b..29765991 100644 --- a/lib/package/Policy.js +++ b/lib/package/Policy.js @@ -16,7 +16,7 @@ const fs = require("fs"), xpath = require("xpath"), - myUtil = require("./myUtil.js"), + lintUtil = require("./lintUtil.js"), Dom = require("@xmldom/xmldom").DOMParser, debug = require("debug")("apigeelint:Policy"); @@ -28,7 +28,7 @@ function Policy(path, fn, parent, doc) { this.parent = parent; if (doc) this.element = doc; this.report = { - filePath: myUtil.effectivePath(this.filePath, this.bundleType), + filePath: lintUtil.effectivePath(this.filePath, this.bundleType), errorCount: 0, warningCount: 0, fixableErrorCount: 0, diff --git a/lib/package/Resource.js b/lib/package/Resource.js index 7abc0013..64021cd0 100644 --- a/lib/package/Resource.js +++ b/lib/package/Resource.js @@ -1,5 +1,5 @@ /* - Copyright 2019-2022 Google LLC + Copyright 2019-2022,2024 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ */ const fs = require("fs"), - myUtil = require("./myUtil.js"); + lintUtil = require("./lintUtil.js"); function Resource(parent, path, fname) { this.parent = parent; @@ -24,24 +24,24 @@ function Resource(parent, path, fname) { this.bundleType = parent.bundletype ? parent.bundletype : "apiproxy"; this.messages = { warnings: [], errors: [] }; this.report = { - filePath: myUtil.effectivePath(this.path, this.bundleType), + filePath: lintUtil.effectivePath(this.path, this.bundleType), errorCount: 0, warningCount: 0, fixableErrorCount: 0, fixableWarningCount: 0, - messages: [] + messages: [], }; } -Resource.prototype.getFileName = function() { +Resource.prototype.getFileName = function () { return this.fname; }; -Resource.prototype.getParent = function() { +Resource.prototype.getParent = function () { return this.parent; }; -Resource.prototype.addMessage = function(msg) { +Resource.prototype.addMessage = function (msg) { if (msg.hasOwnProperty("plugin")) { msg.ruleId = msg.plugin.ruleId; if (!msg.severity) msg.severity = msg.plugin.severity; @@ -78,11 +78,11 @@ Resource.prototype.addMessage = function(msg) { } }; -Resource.prototype.getReport = function() { +Resource.prototype.getReport = function () { return this.report; }; -Resource.prototype.summarize = function() { +Resource.prototype.summarize = function () { var summary = {}; summary.fileName = this.getFileName(); //summary.parent = this.getParent(); @@ -90,7 +90,7 @@ Resource.prototype.summarize = function() { return summary; }; -Resource.prototype.getContents = function() { +Resource.prototype.getContents = function () { if (!this.contents) { //read the file contents and return them this.contents = fs.readFileSync(this.path).toString(); @@ -98,7 +98,7 @@ Resource.prototype.getContents = function() { return this.contents; }; -Resource.prototype.getLines = function(start, stop) { +Resource.prototype.getLines = function (start, stop) { //actually parse the source into lines if we haven't already and return the requested subset var result = ""; if (!this.lines) { diff --git a/lib/package/Step.js b/lib/package/Step.js index 3c577311..6eb9152b 100644 --- a/lib/package/Step.js +++ b/lib/package/Step.js @@ -1,5 +1,5 @@ /* - Copyright 2019 Google LLC + Copyright 2019,2024 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,26 +15,26 @@ */ const Condition = require("./Condition.js"), - FaultRule = require("./FaultRule.js"), - xpath = require("xpath"), - myUtil = require("./myUtil.js"), - debug = require("debug")("apigeelint:Step"), - getcb = myUtil.curry(myUtil.diagcb, debug); + FaultRule = require("./FaultRule.js"), + xpath = require("xpath"), + lintUtil = require("./lintUtil.js"), + debug = require("debug")("apigeelint:Step"), + getcb = lintUtil.curry(lintUtil.diagcb, debug); function Step(element, parent) { this.parent = parent; this.element = element; } -Step.prototype.getLines = function(start, stop) { +Step.prototype.getLines = function (start, stop) { return this.parent.getLines(start, stop); }; -Step.prototype.getMessages = function() { +Step.prototype.getMessages = function () { return this.parent.getMessages(); }; -Step.prototype.getSource = function() { +Step.prototype.getSource = function () { if (!this.source) { var start = this.element.lineNumber - 1, stop = @@ -45,7 +45,7 @@ Step.prototype.getSource = function() { return this.source; }; -Step.prototype.getName = function() { +Step.prototype.getName = function () { if (!this.name) { var doc = xpath.select("./Name", this.element); this.name = @@ -58,31 +58,31 @@ Step.prototype.getName = function() { return this.name; }; -Step.prototype.getType = function() { +Step.prototype.getType = function () { if (!this.type) { this.type = xpath.select("name(/*)", this.element); } return this.type; }; -Step.prototype.getFlowName = function() { +Step.prototype.getFlowName = function () { if (!this.flowName) { this.flowName = - myUtil.getFileName(this) + + lintUtil.getFileName(this) + ":" + - myUtil.buildTagBreadCrumb(this.element) + + lintUtil.buildTagBreadCrumb(this.element) + this.getName(); } return this.flowName; }; -Step.prototype.getFaultRules = function() { +Step.prototype.getFaultRules = function () { if (!this.faultRules) { var doc = xpath.select("./FaultRules/FaultRule", this.element), st = this; st.faultRules = []; if (doc) { - doc.forEach(function(frElement) { + doc.forEach(function (frElement) { //flows get a flow from here st.faultRules.push(new FaultRule(frElement, st)); }); @@ -91,7 +91,7 @@ Step.prototype.getFaultRules = function() { return this.faultRules; }; -Step.prototype.getCondition = function() { +Step.prototype.getCondition = function () { if (!this.condition) { var element = xpath.select("./Condition", this.element); this.condition = element && element[0] && new Condition(element[0], this); @@ -99,57 +99,68 @@ Step.prototype.getCondition = function() { return this.condition; }; -Step.prototype.select = function(xs) { +Step.prototype.select = function (xs) { return xpath.select(xs, this.element); }; -Step.prototype.getElement = function() { +Step.prototype.getElement = function () { return this.element; }; -Step.prototype.getParent = function() { +Step.prototype.getParent = function () { return this.parent; }; -Step.prototype.addMessage = function(msg) { +Step.prototype.addMessage = function (msg) { if (!msg.hasOwnProperty("entity")) { msg.entity = this; } this.parent.addMessage(msg); }; -Step.prototype.onConditions = function(pluginFunction, callback) { +Step.prototype.onConditions = function (pluginFunction, callback) { let step = this, - faultRules = step.getFaultRules(); + faultRules = step.getFaultRules(); if (step.getCondition()) { - pluginFunction(step.getCondition(), getcb(`onConditions ${this.getName()}`)); + pluginFunction( + step.getCondition(), + getcb(`onConditions ${this.getName()}`), + ); } if (faultRules && faultRules.length > 0) { - faultRules.forEach(fr => - fr.onConditions(pluginFunction, getcb(`onConditions FaultRule '${fr.getName()}'`))); + faultRules.forEach((fr) => + fr.onConditions( + pluginFunction, + getcb(`onConditions FaultRule '${fr.getName()}'`), + ), + ); } callback(null, {}); }; -Step.prototype.onSteps = function(pluginFunction, callback) { +Step.prototype.onSteps = function (pluginFunction, callback) { let step = this, - faultRules = step.getFaultRules(); + faultRules = step.getFaultRules(); pluginFunction(step, getcb(`onSteps ${this.getName()}`)); if (faultRules && faultRules.length > 0) { - faultRules.forEach(fr => - fr.onSteps(pluginFunction, getcb(`onSteps FaultRule '${this.getName()}'`))); + faultRules.forEach((fr) => + fr.onSteps( + pluginFunction, + getcb(`onSteps FaultRule '${this.getName()}'`), + ), + ); } callback(null, {}); - }; -Step.prototype.summarize = function() { +Step.prototype.summarize = function () { return { - name : this.getName(), - flowName : this.getFlowName(), - condition : (this.getCondition() && this.getCondition().summarize()) || {}, - faultRules : this.getFaultRules() && this.faultRules.map( fr => fr.summarize()) + name: this.getName(), + flowName: this.getFlowName(), + condition: (this.getCondition() && this.getCondition().summarize()) || {}, + faultRules: + this.getFaultRules() && this.faultRules.map((fr) => fr.summarize()), }; }; diff --git a/lib/package/bundleLinter.js b/lib/package/bundleLinter.js index a5dc4a6c..538e4e18 100644 --- a/lib/package/bundleLinter.js +++ b/lib/package/bundleLinter.js @@ -19,9 +19,9 @@ const fs = require("fs"), path = require("path"), Bundle = require("./Bundle.js"), pluralize = require("pluralize"), - myUtil = require("./myUtil.js"), + lintUtil = require("./lintUtil.js"), debug = require("debug")("apigeelint:bundleLinter"), - getcb = myUtil.curry(myUtil.diagcb, debug); + getcb = lintUtil.curry(lintUtil.diagcb, debug); function contains(a, obj, f) { if (!a || !a.length) { diff --git a/lib/package/myUtil.js b/lib/package/lintUtil.js similarity index 90% rename from lib/package/myUtil.js rename to lib/package/lintUtil.js index c8789cbd..695dbb33 100644 --- a/lib/package/myUtil.js +++ b/lib/package/lintUtil.js @@ -16,31 +16,36 @@ const xpath = require("xpath"), util = require("util"), - debug = require("debug"); + DEBUG = require("debug"); const path = require("node:path"), fs = require("node:fs"); -function isNodeModulesDirectory(spec) { - const isNodeModules = - spec.endsWith("node_modules") || spec.endsWith("node_modules/"), - exists = isNodeModules && fs.existsSync(spec), +function isDirectory(spec) { + const exists = fs.existsSync(spec), stats = exists && fs.lstatSync(spec); return stats && stats.isDirectory(); } +function isNodeModulesDirectory(spec) { + const isNodeModules = + spec.endsWith("node_modules") || spec.endsWith("node_modules/"); + return isNodeModules && isDirectory(spec); +} + /* exported for testing */ function getNodeModulesPathFor() { + const checkCandidate = (candidate) => { + if (isNodeModulesDirectory(candidate)) { + let p = path.join(candidate, "@xmldom/xmldom"); + return isDirectory(p) && p; + } + }; const r = (acc, c) => { if (!acc) { let candidate = path.join(__dirname, c); - if (isNodeModulesDirectory(candidate)) { - return path.join(candidate, "@xmldom/xmldom"); - } - candidate = path.join(candidate, "node_modules"); - if (isNodeModulesDirectory(candidate)) { - return path.join(candidate, "@xmldom/xmldom"); - } + return checkCandidate(candidate) + || checkCandidate(path.join(candidate, "node_modules")); } return acc; }; @@ -216,25 +221,28 @@ const xmlNodeTypeAsString = (function () { * dom.js file within that module, to get it. This changes in xmldom v0.9.x, but * v.0.9.x has been in "beta" for more than a year. **/ + const d = DEBUG("apigeelint:xmldom"); + const xmlDomPath = getNodeModulesPathFor("@xmldom/xmldom"), Node = require(`${xmlDomPath}/lib/dom.js`).Node, keys = Object.keys(Node.prototype).filter((key) => key.endsWith("_NODE")); + d(`keys(${keys})`); - return (typ) => keys.find((key) => Node[key] == typ) || "unknown"; + return (typ) => + keys.find((key) => Node[key] == typ) || "unknown"; })(); const directiveRe = new RegExp("^\\s*apigeelint\\s+disable\\s?=(.+)$"); const isApigeelintDirective = (textContent) => { const match = directiveRe.exec(textContent); - if (match) { - return match[1].split(",").map((s) => s.trim()); - } + return match && + match[1].split(",").map((s) => s.trim()); }; function findDirectives(elt, indent) { const xmlDomPath = getNodeModulesPathFor("@xmldom/xmldom"), Node = require(`${xmlDomPath}/lib/dom.js`).Node; - const d = debug("apigeelint:directives"); + const d = DEBUG("apigeelint:directives"); if (!indent) { d( `root: (nodeType: ${elt.nodeType}, ${xmlNodeTypeAsString( diff --git a/lib/package/plugins/BN001-checkBundleStructure.js b/lib/package/plugins/BN001-checkBundleStructure.js index b6634d63..af505d2b 100644 --- a/lib/package/plugins/BN001-checkBundleStructure.js +++ b/lib/package/plugins/BN001-checkBundleStructure.js @@ -15,7 +15,7 @@ */ const fs = require("fs"), - ruleId = require("../myUtil.js").getRuleId(); + ruleId = require("../lintUtil.js").getRuleId(); const plugin = { ruleId, diff --git a/lib/package/plugins/BN003-checkCacheCoherence.js b/lib/package/plugins/BN003-checkCacheCoherence.js index 90875dea..65d3eb0b 100644 --- a/lib/package/plugins/BN003-checkCacheCoherence.js +++ b/lib/package/plugins/BN003-checkCacheCoherence.js @@ -17,7 +17,7 @@ //BN003 Cache Coherence A bundle that includes cache reads should include cache writes with the same keys. const xpath = require("xpath"), - ruleId = require("../myUtil.js").getRuleId(), + ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/BN004-unusedVariables.js b/lib/package/plugins/BN004-unusedVariables.js index b0f24e8d..e664a603 100644 --- a/lib/package/plugins/BN004-unusedVariables.js +++ b/lib/package/plugins/BN004-unusedVariables.js @@ -15,7 +15,7 @@ */ const xpath = require("xpath"), - ruleId = require("../myUtil.js").getRuleId(), + ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); var plugin = { diff --git a/lib/package/plugins/BN005-checkUnattachedPolicies.js b/lib/package/plugins/BN005-checkUnattachedPolicies.js index 6aea422e..2cd0735e 100644 --- a/lib/package/plugins/BN005-checkUnattachedPolicies.js +++ b/lib/package/plugins/BN005-checkUnattachedPolicies.js @@ -16,7 +16,7 @@ const debug = require("debug")("apigeelint:BN005"); const plugin = { - ruleId: require("../myUtil.js").getRuleId(), + ruleId: require("../lintUtil.js").getRuleId(), name: "Check for unattached policies", message: "Unattached policies are dead code. They should be removed from bundles before releasing the bundle to produciton.", diff --git a/lib/package/plugins/BN006-policyCount.js b/lib/package/plugins/BN006-policyCount.js index 96f09595..15d73e7a 100644 --- a/lib/package/plugins/BN006-policyCount.js +++ b/lib/package/plugins/BN006-policyCount.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(); +const ruleId = require("../lintUtil.js").getRuleId(); // debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/BN007-bundleSizeResourceCount.js b/lib/package/plugins/BN007-bundleSizeResourceCount.js index 67f53cdc..a8665f44 100644 --- a/lib/package/plugins/BN007-bundleSizeResourceCount.js +++ b/lib/package/plugins/BN007-bundleSizeResourceCount.js @@ -17,7 +17,7 @@ //bundleSizeResourceCount //|   |:white_medium_square:| BN007 | Bundle size - resource callouts. | Large bundles are a symptom of poor design. A high number of resource callouts is indicative of underutilizing out of the box Apigee policies. | -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/BN009-checkForMultipleStatsCollectorPolicies.js b/lib/package/plugins/BN009-checkForMultipleStatsCollectorPolicies.js index 29f2fb92..dff1fd72 100644 --- a/lib/package/plugins/BN009-checkForMultipleStatsCollectorPolicies.js +++ b/lib/package/plugins/BN009-checkForMultipleStatsCollectorPolicies.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/BN010-missingPolicies.js b/lib/package/plugins/BN010-missingPolicies.js index ce97c685..d1c34ea3 100644 --- a/lib/package/plugins/BN010-missingPolicies.js +++ b/lib/package/plugins/BN010-missingPolicies.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(); +const ruleId = require("../lintUtil.js").getRuleId(); const plugin = { ruleId, diff --git a/lib/package/plugins/BN011-wellFormedXml.js b/lib/package/plugins/BN011-wellFormedXml.js index 15aed605..4cb88061 100644 --- a/lib/package/plugins/BN011-wellFormedXml.js +++ b/lib/package/plugins/BN011-wellFormedXml.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), plugin = { ruleId, name: "Check for not well-formed XML", diff --git a/lib/package/plugins/BN012-unreferencedTargets.js b/lib/package/plugins/BN012-unreferencedTargets.js index aeb1b5ad..6b1b1376 100644 --- a/lib/package/plugins/BN012-unreferencedTargets.js +++ b/lib/package/plugins/BN012-unreferencedTargets.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), util = require("util"), debug = require("debug")("apigeelint:" + ruleId); diff --git a/lib/package/plugins/BN013-unreferenced-resources.js b/lib/package/plugins/BN013-unreferenced-resources.js index c9b93815..ca9ca66e 100644 --- a/lib/package/plugins/BN013-unreferenced-resources.js +++ b/lib/package/plugins/BN013-unreferenced-resources.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), util = require("util"), xpath = require("xpath"), debug = require("debug")("apigeelint:" + ruleId); diff --git a/lib/package/plugins/BN014-duplicate-policies.js b/lib/package/plugins/BN014-duplicate-policies.js index bb02967a..114115f5 100644 --- a/lib/package/plugins/BN014-duplicate-policies.js +++ b/lib/package/plugins/BN014-duplicate-policies.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId), xpath = require("xpath"); diff --git a/lib/package/plugins/CC001-checkConditionForLiterals.js b/lib/package/plugins/CC001-checkConditionForLiterals.js index 6f2ac7f2..30885d4d 100644 --- a/lib/package/plugins/CC001-checkConditionForLiterals.js +++ b/lib/package/plugins/CC001-checkConditionForLiterals.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/CC003-checkConditionLength.js b/lib/package/plugins/CC003-checkConditionLength.js index 295c37b7..317ad31e 100644 --- a/lib/package/plugins/CC003-checkConditionLength.js +++ b/lib/package/plugins/CC003-checkConditionLength.js @@ -17,7 +17,7 @@ //checkConditionLength.js const plugin = { - ruleId : require("../myUtil.js").getRuleId(), + ruleId : require("../lintUtil.js").getRuleId(), name: "Condition Length", message: "Overly long conditions on Steps are difficult to debug and maintain.", diff --git a/lib/package/plugins/CC004-checkConditionComplexity.js b/lib/package/plugins/CC004-checkConditionComplexity.js index b5a2d9e2..e75444d4 100644 --- a/lib/package/plugins/CC004-checkConditionComplexity.js +++ b/lib/package/plugins/CC004-checkConditionComplexity.js @@ -15,7 +15,7 @@ */ const plugin = { - ruleId : require("../myUtil.js").getRuleId(), + ruleId : require("../lintUtil.js").getRuleId(), name: "Overly Complex Condition", message: "Condition complexity should be limited to a relatively modest number of variables, constants, and comparators.", diff --git a/lib/package/plugins/CC005-unterminatedStrings.js b/lib/package/plugins/CC005-unterminatedStrings.js index f98846cc..114804ec 100644 --- a/lib/package/plugins/CC005-unterminatedStrings.js +++ b/lib/package/plugins/CC005-unterminatedStrings.js @@ -17,7 +17,7 @@ // CC005-unterminatedStrings.js const util = require("util"), - ruleId = require("../myUtil.js").getRuleId(), + ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/CC006-checkConditionTruth.js b/lib/package/plugins/CC006-checkConditionTruth.js index 445049fb..61a95e0b 100644 --- a/lib/package/plugins/CC006-checkConditionTruth.js +++ b/lib/package/plugins/CC006-checkConditionTruth.js @@ -17,7 +17,7 @@ //checkConditionTruth.js const plugin = { - ruleId : require("../myUtil.js").getRuleId(), + ruleId : require("../lintUtil.js").getRuleId(), name: "Detect Logical Absurdities", message: "Conditions should not have internal logic conflicts.", fatal: false, diff --git a/lib/package/plugins/CC007-ConditionSyntax.js b/lib/package/plugins/CC007-ConditionSyntax.js index c96b8a3d..920854a3 100644 --- a/lib/package/plugins/CC007-ConditionSyntax.js +++ b/lib/package/plugins/CC007-ConditionSyntax.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), util = require("util"), debug = require("debug")("apigeelint:" + ruleId); const parser = require("../../../build/ConditionParser.js"); diff --git a/lib/package/plugins/DC001-deprecationConcurrentRateLimit.js b/lib/package/plugins/DC001-deprecationConcurrentRateLimit.js index 520746ca..7439ff91 100644 --- a/lib/package/plugins/DC001-deprecationConcurrentRateLimit.js +++ b/lib/package/plugins/DC001-deprecationConcurrentRateLimit.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/DC002-deprecationOAuthV1.js b/lib/package/plugins/DC002-deprecationOAuthV1.js index 3d11dda4..feea46f2 100644 --- a/lib/package/plugins/DC002-deprecationOAuthV1.js +++ b/lib/package/plugins/DC002-deprecationOAuthV1.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/EP001-corsPolicyAttachment.js b/lib/package/plugins/EP001-corsPolicyAttachment.js index 80f897fb..2acb6a4a 100644 --- a/lib/package/plugins/EP001-corsPolicyAttachment.js +++ b/lib/package/plugins/EP001-corsPolicyAttachment.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/EP002-misplacedElements.js b/lib/package/plugins/EP002-misplacedElements.js index 2d49a8a2..b1ecd7a2 100644 --- a/lib/package/plugins/EP002-misplacedElements.js +++ b/lib/package/plugins/EP002-misplacedElements.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId), xpath = require("xpath"); diff --git a/lib/package/plugins/FE001-authentication.js b/lib/package/plugins/FE001-authentication.js index 34735303..005d3741 100644 --- a/lib/package/plugins/FE001-authentication.js +++ b/lib/package/plugins/FE001-authentication.js @@ -14,10 +14,10 @@ limitations under the License. */ -const myUtil = require("../myUtil.js"), +const lintUtil = require("../lintUtil.js"), xpath = require("xpath"), //util = require("util"), - ruleId = myUtil.getRuleId(), + ruleId = lintUtil.getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/FL001-unconditionalFlows.js b/lib/package/plugins/FL001-unconditionalFlows.js index 795d2e14..24cd317a 100644 --- a/lib/package/plugins/FL001-unconditionalFlows.js +++ b/lib/package/plugins/FL001-unconditionalFlows.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(); +const ruleId = require("../lintUtil.js").getRuleId(); const plugin = { ruleId, diff --git a/lib/package/plugins/FR001-checkFaultRuleCondition.js b/lib/package/plugins/FR001-checkFaultRuleCondition.js index 84eabb53..dff2c000 100644 --- a/lib/package/plugins/FR001-checkFaultRuleCondition.js +++ b/lib/package/plugins/FR001-checkFaultRuleCondition.js @@ -17,7 +17,7 @@ //checkFaultRuleCondition //FR001 | No Condition on FaultRule | -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")(`apigeelint:${ruleId}`), RULE_WARNING = 1, RULE_ERROR = 2, diff --git a/lib/package/plugins/FR002-checkDefaultFaultRule.js b/lib/package/plugins/FR002-checkDefaultFaultRule.js index b9be45bb..565282b0 100644 --- a/lib/package/plugins/FR002-checkDefaultFaultRule.js +++ b/lib/package/plugins/FR002-checkDefaultFaultRule.js @@ -16,7 +16,7 @@ const util = require('util'), xpath = require("xpath"), - ruleId = require("../myUtil.js").getRuleId(), + ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/FR003-singleFaultRule.js b/lib/package/plugins/FR003-singleFaultRule.js index 99365537..d8fa649d 100644 --- a/lib/package/plugins/FR003-singleFaultRule.js +++ b/lib/package/plugins/FR003-singleFaultRule.js @@ -16,7 +16,7 @@ //FR003 | Single FaultRule | -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")(`apigeelint:${ruleId}`), RULE_WARNING = 1, RULE_ERROR = 2, diff --git a/lib/package/plugins/PD001-missingTargets.js b/lib/package/plugins/PD001-missingTargets.js index 47653685..657e3881 100644 --- a/lib/package/plugins/PD001-missingTargets.js +++ b/lib/package/plugins/PD001-missingTargets.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/PD002-emptyRouteRules.js b/lib/package/plugins/PD002-emptyRouteRules.js index 5f3ec555..3a70487e 100644 --- a/lib/package/plugins/PD002-emptyRouteRules.js +++ b/lib/package/plugins/PD002-emptyRouteRules.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), util = require("util"), debug = require("debug")("apigeelint:" + ruleId); diff --git a/lib/package/plugins/PD003-emptyRouteRuleLast.js b/lib/package/plugins/PD003-emptyRouteRuleLast.js index 62f4502d..24b2d281 100644 --- a/lib/package/plugins/PD003-emptyRouteRuleLast.js +++ b/lib/package/plugins/PD003-emptyRouteRuleLast.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/PD004-proxyNameAttr.js b/lib/package/plugins/PD004-proxyNameAttr.js index 27c9d5d7..40c53373 100644 --- a/lib/package/plugins/PD004-proxyNameAttr.js +++ b/lib/package/plugins/PD004-proxyNameAttr.js @@ -15,7 +15,7 @@ */ const path = require("path"), - ruleId = require("../myUtil.js").getRuleId(), + ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/PD005-unnecessaryVirtualHost.js b/lib/package/plugins/PD005-unnecessaryVirtualHost.js index bdfcdf57..7b17b587 100644 --- a/lib/package/plugins/PD005-unnecessaryVirtualHost.js +++ b/lib/package/plugins/PD005-unnecessaryVirtualHost.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/PO006-checkPolicyNameAttribute.js b/lib/package/plugins/PO006-checkPolicyNameAttribute.js index 8fb637ce..3f389596 100644 --- a/lib/package/plugins/PO006-checkPolicyNameAttribute.js +++ b/lib/package/plugins/PO006-checkPolicyNameAttribute.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(); +const ruleId = require("../lintUtil.js").getRuleId(); const plugin = { ruleId, diff --git a/lib/package/plugins/PO007-policyNameConventions.js b/lib/package/plugins/PO007-policyNameConventions.js index 41c18629..1b6c889b 100644 --- a/lib/package/plugins/PO007-policyNameConventions.js +++ b/lib/package/plugins/PO007-policyNameConventions.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(); +const ruleId = require("../lintUtil.js").getRuleId(); const plugin = { ruleId, diff --git a/lib/package/plugins/PO008-checkPolicyDisplayName.js b/lib/package/plugins/PO008-checkPolicyDisplayName.js index 38708e8d..23e4faf7 100644 --- a/lib/package/plugins/PO008-checkPolicyDisplayName.js +++ b/lib/package/plugins/PO008-checkPolicyDisplayName.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(); +const ruleId = require("../lintUtil.js").getRuleId(); const plugin = { ruleId, diff --git a/lib/package/plugins/PO012-assignMessageAssignTo.js b/lib/package/plugins/PO012-assignMessageAssignTo.js index 4f659462..e78e0f50 100644 --- a/lib/package/plugins/PO012-assignMessageAssignTo.js +++ b/lib/package/plugins/PO012-assignMessageAssignTo.js @@ -16,7 +16,7 @@ const xpath = require("xpath"), util = require("util"), - ruleId = require("../myUtil.js").getRuleId(), + ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/PO013-jsHint.js b/lib/package/plugins/PO013-jsHint.js index 5a676f99..415dfbcf 100644 --- a/lib/package/plugins/PO013-jsHint.js +++ b/lib/package/plugins/PO013-jsHint.js @@ -15,7 +15,7 @@ */ /* global process */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), path = require("path"), fs = require("fs"), minimatch = require("minimatch"), diff --git a/lib/package/plugins/PO018-checkRegexLookAround.js b/lib/package/plugins/PO018-checkRegexLookAround.js index d9895dfc..6d6b5dfe 100644 --- a/lib/package/plugins/PO018-checkRegexLookAround.js +++ b/lib/package/plugins/PO018-checkRegexLookAround.js @@ -18,7 +18,7 @@ //PO018 | Regex Lookahead/Lookbehind are Expensive - Threat Protection Policy const xpath = require("xpath"), - ruleId = require("../myUtil.js").getRuleId(); + ruleId = require("../lintUtil.js").getRuleId(); const plugin = { ruleId, diff --git a/lib/package/plugins/PO019-serviceCalloutRequestName.js b/lib/package/plugins/PO019-serviceCalloutRequestName.js index 1076627a..870064ec 100644 --- a/lib/package/plugins/PO019-serviceCalloutRequestName.js +++ b/lib/package/plugins/PO019-serviceCalloutRequestName.js @@ -14,8 +14,8 @@ limitations under the License. */ -const myUtil = require("../myUtil.js"), - ruleId = myUtil.getRuleId(), +const lintUtil = require("../lintUtil.js"), + ruleId = lintUtil.getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { @@ -33,7 +33,7 @@ const onPolicy = function (policy, cb) { try { if ( policy.getType() === "ServiceCallout" && - myUtil.selectAttributeValue( + lintUtil.selectAttributeValue( policy, "/ServiceCallout/Request/@variable" ) === "request" diff --git a/lib/package/plugins/PO020-serviceCalloutResponseName.js b/lib/package/plugins/PO020-serviceCalloutResponseName.js index 67bf1073..cf933275 100644 --- a/lib/package/plugins/PO020-serviceCalloutResponseName.js +++ b/lib/package/plugins/PO020-serviceCalloutResponseName.js @@ -14,8 +14,8 @@ limitations under the License. */ -const myUtil = require("../myUtil.js"), - ruleId = myUtil.getRuleId(), +const lintUtil = require("../lintUtil.js"), + ruleId = lintUtil.getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { @@ -33,7 +33,7 @@ const onPolicy = function(policy,cb) { let hadWarning = false; if ( policy.getType() === "ServiceCallout" && - myUtil.selectTagValue(policy, "/ServiceCallout/Response") === "response" + lintUtil.selectTagValue(policy, "/ServiceCallout/Response") === "response" ) { hadWarning = true; policy.addMessage({ diff --git a/lib/package/plugins/PO022-distributedQuotaCheck.js b/lib/package/plugins/PO022-distributedQuotaCheck.js index 681efb25..a43d0e12 100644 --- a/lib/package/plugins/PO022-distributedQuotaCheck.js +++ b/lib/package/plugins/PO022-distributedQuotaCheck.js @@ -16,7 +16,7 @@ //distributedQuotaCheck -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId), xpath = require("xpath"); diff --git a/lib/package/plugins/PO023-quotaPolicyReuseCheck.js b/lib/package/plugins/PO023-quotaPolicyReuseCheck.js index 337f1e4e..a210ffe7 100644 --- a/lib/package/plugins/PO023-quotaPolicyReuseCheck.js +++ b/lib/package/plugins/PO023-quotaPolicyReuseCheck.js @@ -15,8 +15,8 @@ */ //|   |:white_medium_square:| PO023 | Quota Policy Reuse | When the same Quota policy is used more than once you must ensure that the conditions of execution are mutually exclusive or that you intend for a call to count more than once per message processed. | -const myUtil = require("../myUtil.js") -const ruleId = require("../myUtil.js").getRuleId(), +const lintUtil = require("../lintUtil.js") +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { @@ -38,7 +38,7 @@ const onPolicy = function(policy,cb) { if(steps){ let parentMap = {}; for (const step of steps) { - if(myUtil.isEmpty(step)) + if(lintUtil.isEmpty(step)) return; let key = getFlowKey(step); parentMap[key]={ @@ -49,7 +49,7 @@ const onPolicy = function(policy,cb) { }; let mapCount = {}; for (const step of steps) { - if(myUtil.isEmpty(step)) + if(lintUtil.isEmpty(step)) return; let key = getFlowKey(step); if(!mapCount[key]){ @@ -89,7 +89,7 @@ function getStepCondition(step){ } function getFlowKey(step){ - return myUtil.cyrb53(step.getParent().getPhase()+ //Request/Response + return lintUtil.cyrb53(step.getParent().getPhase()+ //Request/Response step.getParent().getParent().getFlowName()+ //full file path, Proxy or Targetendpoint and flow name step.getParent().getParent().getSource()+ //flow xml getStepCondition(step)); // policy condition diff --git a/lib/package/plugins/PO024-responseCacheErrorResponseCheck.js b/lib/package/plugins/PO024-responseCacheErrorResponseCheck.js index 6a2384f0..24598ed5 100644 --- a/lib/package/plugins/PO024-responseCacheErrorResponseCheck.js +++ b/lib/package/plugins/PO024-responseCacheErrorResponseCheck.js @@ -14,7 +14,7 @@ limitations under the License. */ const xpath = require("xpath"), - ruleId = require("../myUtil.js").getRuleId(), + ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/PO025-eslint.js b/lib/package/plugins/PO025-eslint.js index 6c4000d0..dd93be55 100644 --- a/lib/package/plugins/PO025-eslint.js +++ b/lib/package/plugins/PO025-eslint.js @@ -1,5 +1,5 @@ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId), Linter = require("eslint"); diff --git a/lib/package/plugins/PO026-assignVariableUsage.js b/lib/package/plugins/PO026-assignVariableUsage.js index 2753abc3..f4f12a6a 100644 --- a/lib/package/plugins/PO026-assignVariableUsage.js +++ b/lib/package/plugins/PO026-assignVariableUsage.js @@ -18,7 +18,7 @@ const xpath = require("xpath"), util = require("util"), - ruleId = require("../myUtil.js").getRuleId(), + ruleId = require("../lintUtil.js").getRuleId(), pluginUtil = require("./_pluginUtil.js"), debug = require("debug")("apigeelint:" + ruleId); diff --git a/lib/package/plugins/PO027-hmacPolicy.js b/lib/package/plugins/PO027-hmacPolicy.js index 69f178d2..0202a73e 100644 --- a/lib/package/plugins/PO027-hmacPolicy.js +++ b/lib/package/plugins/PO027-hmacPolicy.js @@ -17,7 +17,7 @@ const path = require('path'), xpath = require("xpath"), util = require('util'), - ruleId = require("../myUtil.js").getRuleId(), + ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/PO028-policyAvailabilityInProfile.js b/lib/package/plugins/PO028-policyAvailabilityInProfile.js index bd61abab..b98e3302 100644 --- a/lib/package/plugins/PO028-policyAvailabilityInProfile.js +++ b/lib/package/plugins/PO028-policyAvailabilityInProfile.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(); +const ruleId = require("../lintUtil.js").getRuleId(); const plugin = { ruleId, diff --git a/lib/package/plugins/PO029-unknownPolicyTypes.js b/lib/package/plugins/PO029-unknownPolicyTypes.js index 409dfe2a..1ba097c4 100644 --- a/lib/package/plugins/PO029-unknownPolicyTypes.js +++ b/lib/package/plugins/PO029-unknownPolicyTypes.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(); +const ruleId = require("../lintUtil.js").getRuleId(); const plugin = { ruleId, diff --git a/lib/package/plugins/PO030-ExpirySettings.js b/lib/package/plugins/PO030-ExpirySettings.js index 75de2596..88feea38 100644 --- a/lib/package/plugins/PO030-ExpirySettings.js +++ b/lib/package/plugins/PO030-ExpirySettings.js @@ -16,7 +16,7 @@ const xpath = require("xpath"), util = require('util'), - ruleId = require("../myUtil.js").getRuleId(), + ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/PO031-assignMessage-ContentType.js b/lib/package/plugins/PO031-assignMessage-ContentType.js index 1eae8f98..07c95ae2 100644 --- a/lib/package/plugins/PO031-assignMessage-ContentType.js +++ b/lib/package/plugins/PO031-assignMessage-ContentType.js @@ -16,7 +16,7 @@ const xpath = require("xpath"), util = require('util'), - ruleId = require("../myUtil.js").getRuleId(), + ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/PO032-CORS-hygiene.js b/lib/package/plugins/PO032-CORS-hygiene.js index 904053ca..ff033307 100644 --- a/lib/package/plugins/PO032-CORS-hygiene.js +++ b/lib/package/plugins/PO032-CORS-hygiene.js @@ -16,7 +16,7 @@ const xpath = require("xpath"), util = require('util'), - ruleId = require("../myUtil.js").getRuleId(), + ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/PO033-extractVariables-hygiene.js b/lib/package/plugins/PO033-extractVariables-hygiene.js index b0545027..13ed2eae 100644 --- a/lib/package/plugins/PO033-extractVariables-hygiene.js +++ b/lib/package/plugins/PO033-extractVariables-hygiene.js @@ -14,9 +14,9 @@ limitations under the License. */ -const myUtil = require("../myUtil.js"), +const lintUtil = require("../lintUtil.js"), xpath = require("xpath"), - ruleId = myUtil.getRuleId(), + ruleId = lintUtil.getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/PO034-am-hygiene.js b/lib/package/plugins/PO034-am-hygiene.js index 4d1971a9..901ce46d 100644 --- a/lib/package/plugins/PO034-am-hygiene.js +++ b/lib/package/plugins/PO034-am-hygiene.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId), xpath = require("xpath"), util = require("util"); diff --git a/lib/package/plugins/PO035-quota-hygiene.js b/lib/package/plugins/PO035-quota-hygiene.js index 15960b7e..8fcc109c 100644 --- a/lib/package/plugins/PO035-quota-hygiene.js +++ b/lib/package/plugins/PO035-quota-hygiene.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId), xpath = require("xpath"); diff --git a/lib/package/plugins/PO036-serviceCallout-response-element.js b/lib/package/plugins/PO036-serviceCallout-response-element.js index e32dd4ce..7f2529c2 100644 --- a/lib/package/plugins/PO036-serviceCallout-response-element.js +++ b/lib/package/plugins/PO036-serviceCallout-response-element.js @@ -14,9 +14,9 @@ limitations under the License. */ -const myUtil = require("../myUtil.js"), +const lintUtil = require("../lintUtil.js"), xpath = require("xpath"), - ruleId = myUtil.getRuleId(), + ruleId = lintUtil.getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/PO037-DataCapture-hygiene-checks.js b/lib/package/plugins/PO037-DataCapture-hygiene-checks.js index 3cac6e4e..bbe16c76 100644 --- a/lib/package/plugins/PO037-DataCapture-hygiene-checks.js +++ b/lib/package/plugins/PO037-DataCapture-hygiene-checks.js @@ -25,7 +25,7 @@ * */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), xpath = require("xpath"), debug = require("debug")("apigeelint:" + ruleId); diff --git a/lib/package/plugins/PO038-kvm-mapname.js b/lib/package/plugins/PO038-kvm-mapname.js index f5cd3a48..8a56d73d 100644 --- a/lib/package/plugins/PO038-kvm-mapname.js +++ b/lib/package/plugins/PO038-kvm-mapname.js @@ -16,7 +16,7 @@ const xpath = require("xpath"), util = require("util"), - ruleId = require("../myUtil.js").getRuleId(), + ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/README.md b/lib/package/plugins/README.md index 04c759e7..b69f4b3f 100644 --- a/lib/package/plugins/README.md +++ b/lib/package/plugins/README.md @@ -67,7 +67,7 @@ Consider all of these fields to be mandatory. Notes: -* *ruleId* can be inferred from the filename by calling a helper function: `require("../myUtil.js").getRuleId()` +* *ruleId* can be inferred from the filename by calling a helper function: `require("../lintUtil.js").getRuleId()` * *severity* is an enum: 0 implies ignore the output of this rule; 1 is a warning; 2 is an error. diff --git a/lib/package/plugins/ST001-checkForEmptySteps.js b/lib/package/plugins/ST001-checkForEmptySteps.js index 9760f552..d38f2dd9 100644 --- a/lib/package/plugins/ST001-checkForEmptySteps.js +++ b/lib/package/plugins/ST001-checkForEmptySteps.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId), xpath = require("xpath"); diff --git a/lib/package/plugins/ST002-checkStepStructure.js b/lib/package/plugins/ST002-checkStepStructure.js index 559f2e5e..93723b6b 100644 --- a/lib/package/plugins/ST002-checkStepStructure.js +++ b/lib/package/plugins/ST002-checkStepStructure.js @@ -16,7 +16,7 @@ const //util = require('util'), xpath = require("xpath"), - ruleId = require("../myUtil.js").getRuleId(), + ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/ST003-extractJSONConditionCheck.js b/lib/package/plugins/ST003-extractJSONConditionCheck.js index a3306710..78b05b7a 100644 --- a/lib/package/plugins/ST003-extractJSONConditionCheck.js +++ b/lib/package/plugins/ST003-extractJSONConditionCheck.js @@ -16,7 +16,7 @@ //|   |:white_medium_square:| ST003 | Extract Variables with JSONPayload | A check for a body element must be performed before policy execution. | -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/ST004-extractXMLConditionCheck.js b/lib/package/plugins/ST004-extractXMLConditionCheck.js index d7a6e49b..d3f84073 100644 --- a/lib/package/plugins/ST004-extractXMLConditionCheck.js +++ b/lib/package/plugins/ST004-extractXMLConditionCheck.js @@ -16,7 +16,7 @@ //|   |:white_check_mark:| ST004 | Extract Variables with XMLPayload | A check for a body element must be performed before policy execution. | -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/ST005-extractFormParamConditionCheck.js b/lib/package/plugins/ST005-extractFormParamConditionCheck.js index 374bfe5f..b5498f2a 100644 --- a/lib/package/plugins/ST005-extractFormParamConditionCheck.js +++ b/lib/package/plugins/ST005-extractFormParamConditionCheck.js @@ -17,7 +17,7 @@ //extractFormParamConditionCheck //|   |:white_medium_square:| ST005 | Extract Variables with FormParam | A check for a body element must be performed before policy execution. | -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId), xpath = require("xpath"); diff --git a/lib/package/plugins/ST006-threatProtectionJSONConditionCheck.js b/lib/package/plugins/ST006-threatProtectionJSONConditionCheck.js index 5a7f80e1..7439968e 100644 --- a/lib/package/plugins/ST006-threatProtectionJSONConditionCheck.js +++ b/lib/package/plugins/ST006-threatProtectionJSONConditionCheck.js @@ -16,7 +16,7 @@ //|   |:white_medium_square:| ST006 | JSON Threat Protection | A check for a body element must be performed before policy execution. | -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/ST007-threatProtectionXMLConditionCheck.js b/lib/package/plugins/ST007-threatProtectionXMLConditionCheck.js index 7d8e6084..177b92da 100644 --- a/lib/package/plugins/ST007-threatProtectionXMLConditionCheck.js +++ b/lib/package/plugins/ST007-threatProtectionXMLConditionCheck.js @@ -16,7 +16,7 @@ //|   |:white_medium_square:| ST007 | XML Threat Protection | A check for a body element must be performed before policy execution. | -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/TD001-mgmtServerTargetEndpointCheck.js b/lib/package/plugins/TD001-mgmtServerTargetEndpointCheck.js index 010faa8b..6f97111a 100644 --- a/lib/package/plugins/TD001-mgmtServerTargetEndpointCheck.js +++ b/lib/package/plugins/TD001-mgmtServerTargetEndpointCheck.js @@ -19,7 +19,7 @@ const xpath = require("xpath"), regexp = "(/v1/organizations/|enterprise.apigee.com)", - ruleId = require("../myUtil.js").getRuleId(), + ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); const plugin = { diff --git a/lib/package/plugins/TD002-useTargetServers.js b/lib/package/plugins/TD002-useTargetServers.js index e360221b..26e4e7f8 100644 --- a/lib/package/plugins/TD002-useTargetServers.js +++ b/lib/package/plugins/TD002-useTargetServers.js @@ -18,7 +18,7 @@ //|   |:white_medium_square:| TD002 | Use Target Server | Discourage use of direct URLs in Target Server. | const xpath = require("xpath"), - ruleId = require("../myUtil.js").getRuleId(), + ruleId = require("../lintUtil.js").getRuleId(), debug = require("debug")("apigeelint:" + ruleId); var plugin = { diff --git a/lib/package/plugins/TD003-targetNameAttr.js b/lib/package/plugins/TD003-targetNameAttr.js index 73624bc6..6f32e817 100644 --- a/lib/package/plugins/TD003-targetNameAttr.js +++ b/lib/package/plugins/TD003-targetNameAttr.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(); +const ruleId = require("../lintUtil.js").getRuleId(); const plugin = { ruleId, diff --git a/lib/package/plugins/TD004-targetSslInfo-enabled-and-enforce.js b/lib/package/plugins/TD004-targetSslInfo-enabled-and-enforce.js index daa9e854..73adcb01 100644 --- a/lib/package/plugins/TD004-targetSslInfo-enabled-and-enforce.js +++ b/lib/package/plugins/TD004-targetSslInfo-enabled-and-enforce.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(); +const ruleId = require("../lintUtil.js").getRuleId(); const plugin = { ruleId, diff --git a/lib/package/plugins/TD005-targetSslReferences.js b/lib/package/plugins/TD005-targetSslReferences.js index 8e882502..f0b720a0 100644 --- a/lib/package/plugins/TD005-targetSslReferences.js +++ b/lib/package/plugins/TD005-targetSslReferences.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(); +const ruleId = require("../lintUtil.js").getRuleId(); const plugin = { ruleId, diff --git a/lib/package/plugins/TD006-target-LoadBalancer-SslInfo.js b/lib/package/plugins/TD006-target-LoadBalancer-SslInfo.js index c972e898..beb08390 100644 --- a/lib/package/plugins/TD006-target-LoadBalancer-SslInfo.js +++ b/lib/package/plugins/TD006-target-LoadBalancer-SslInfo.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(); +const ruleId = require("../lintUtil.js").getRuleId(); const plugin = { ruleId, diff --git a/lib/package/plugins/TD007-targetSslInfo-Truststore.js b/lib/package/plugins/TD007-targetSslInfo-Truststore.js index 85ad54ec..55e30ee9 100644 --- a/lib/package/plugins/TD007-targetSslInfo-Truststore.js +++ b/lib/package/plugins/TD007-targetSslInfo-Truststore.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(); +const ruleId = require("../lintUtil.js").getRuleId(); const plugin = { ruleId, diff --git a/lib/package/plugins/TD008-target-LB-multiple-fallbacks.js b/lib/package/plugins/TD008-target-LB-multiple-fallbacks.js index 4736f00b..5242d2a8 100644 --- a/lib/package/plugins/TD008-target-LB-multiple-fallbacks.js +++ b/lib/package/plugins/TD008-target-LB-multiple-fallbacks.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), xpath = require("xpath"); const plugin = { diff --git a/lib/package/plugins/TD009-target-LB-multiple-LB.js b/lib/package/plugins/TD009-target-LB-multiple-LB.js index b43813f9..988f4731 100644 --- a/lib/package/plugins/TD009-target-LB-multiple-LB.js +++ b/lib/package/plugins/TD009-target-LB-multiple-LB.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(); +const ruleId = require("../lintUtil.js").getRuleId(); const plugin = { ruleId, diff --git a/lib/package/plugins/TD010-target-LB-duplicate-servers.js b/lib/package/plugins/TD010-target-LB-duplicate-servers.js index 6ec7b683..45bc40cd 100644 --- a/lib/package/plugins/TD010-target-LB-duplicate-servers.js +++ b/lib/package/plugins/TD010-target-LB-duplicate-servers.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), xpath = require("xpath"); const plugin = { diff --git a/lib/package/plugins/TD011-targetSslInfo-no-ignoreValidationErrors.js b/lib/package/plugins/TD011-targetSslInfo-no-ignoreValidationErrors.js index 8c507034..ef139431 100644 --- a/lib/package/plugins/TD011-targetSslInfo-no-ignoreValidationErrors.js +++ b/lib/package/plugins/TD011-targetSslInfo-no-ignoreValidationErrors.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(); +const ruleId = require("../lintUtil.js").getRuleId(); const plugin = { ruleId, diff --git a/lib/package/plugins/TD012-targetSslInfo-exactly-one-SSLInfo.js b/lib/package/plugins/TD012-targetSslInfo-exactly-one-SSLInfo.js index 5f80b7b1..e363514c 100644 --- a/lib/package/plugins/TD012-targetSslInfo-exactly-one-SSLInfo.js +++ b/lib/package/plugins/TD012-targetSslInfo-exactly-one-SSLInfo.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(); +const ruleId = require("../lintUtil.js").getRuleId(); const plugin = { ruleId, diff --git a/lib/package/plugins/TD013-targetSslInfo-clientAuthEnabled.js b/lib/package/plugins/TD013-targetSslInfo-clientAuthEnabled.js index f1d4d8a1..431a25d1 100644 --- a/lib/package/plugins/TD013-targetSslInfo-clientAuthEnabled.js +++ b/lib/package/plugins/TD013-targetSslInfo-clientAuthEnabled.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(); +const ruleId = require("../lintUtil.js").getRuleId(); const plugin = { ruleId, diff --git a/lib/package/plugins/TD014-target-exactly-one-URL-or-LoadBalancer.js b/lib/package/plugins/TD014-target-exactly-one-URL-or-LoadBalancer.js index a284b642..35ca6311 100644 --- a/lib/package/plugins/TD014-target-exactly-one-URL-or-LoadBalancer.js +++ b/lib/package/plugins/TD014-target-exactly-one-URL-or-LoadBalancer.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(); +const ruleId = require("../lintUtil.js").getRuleId(); const plugin = { ruleId, diff --git a/lib/package/plugins/TD015-target-LB-no-MaxFailures.js b/lib/package/plugins/TD015-target-LB-no-MaxFailures.js index cda6e02c..66d80a92 100644 --- a/lib/package/plugins/TD015-target-LB-no-MaxFailures.js +++ b/lib/package/plugins/TD015-target-LB-no-MaxFailures.js @@ -14,7 +14,7 @@ limitations under the License. */ -const ruleId = require("../myUtil.js").getRuleId(), +const ruleId = require("../lintUtil.js").getRuleId(), xpath = require("xpath"); const plugin = { diff --git a/test/fixtures/resources/issue481/package-lock.json b/test/fixtures/resources/issue481/package-lock.json new file mode 100644 index 00000000..63871dcc --- /dev/null +++ b/test/fixtures/resources/issue481/package-lock.json @@ -0,0 +1,2794 @@ +{ + "name": "apigeelint-bug-repro", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "apigeelint-bug-repro", + "version": "1.0.0", + "devDependencies": { + "apigeelint": "2.57.0", + "debug": "4.3.5" + }, + "engines": { + "node": ">=20", + "npm": ">=10.5" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", + "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.4", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.7.0.tgz", + "integrity": "sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "9.13.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.13.0.tgz", + "integrity": "sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", + "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.2.tgz", + "integrity": "sha512-CXtq5nR4Su+2I47WPOlWud98Y5Lv8Kyxp2ukhgFx/eW6Blm18VXJO5WuQylPugRo8nbluoi6GvvxBLqHcvqUUw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@foliojs-fork/fontkit": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@foliojs-fork/fontkit/-/fontkit-1.9.2.tgz", + "integrity": "sha512-IfB5EiIb+GZk+77TRB86AHroVaqfq8JRFlUbz0WEwsInyCG0epX2tCPOy+UfaWPju30DeVoUAXfzWXmhn753KA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@foliojs-fork/restructure": "^2.0.2", + "brotli": "^1.2.0", + "clone": "^1.0.4", + "deep-equal": "^1.0.0", + "dfa": "^1.2.0", + "tiny-inflate": "^1.0.2", + "unicode-properties": "^1.2.2", + "unicode-trie": "^2.0.0" + } + }, + "node_modules/@foliojs-fork/linebreak": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@foliojs-fork/linebreak/-/linebreak-1.1.2.tgz", + "integrity": "sha512-ZPohpxxbuKNE0l/5iBJnOAfUaMACwvUIKCvqtWGKIMv1lPYoNjYXRfhi9FeeV9McBkBLxsMFWTVVhHJA8cyzvg==", + "dev": true, + "license": "MIT", + "dependencies": { + "base64-js": "1.3.1", + "unicode-trie": "^2.0.0" + } + }, + "node_modules/@foliojs-fork/pdfkit": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@foliojs-fork/pdfkit/-/pdfkit-0.14.0.tgz", + "integrity": "sha512-nMOiQAv6id89MT3tVTCgc7HxD5ZMANwio2o5yvs5sexQkC0KI3BLaLakpsrHmFfeGFAhqPmZATZGbJGXTUebpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@foliojs-fork/fontkit": "^1.9.1", + "@foliojs-fork/linebreak": "^1.1.1", + "crypto-js": "^4.2.0", + "png-js": "^1.0.0" + } + }, + "node_modules/@foliojs-fork/restructure": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@foliojs-fork/restructure/-/restructure-2.0.2.tgz", + "integrity": "sha512-59SgoZ3EXbkfSX7b63tsou/SDGzwUEK6MuB5sKqgVK1/XE0fxmpsOb9DQI8LXW3KfGnAjImCGhhEb7uPPAUVNA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@xmldom/xmldom": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz", + "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/apigeelint": { + "version": "2.57.0", + "resolved": "https://registry.npmjs.org/apigeelint/-/apigeelint-2.57.0.tgz", + "integrity": "sha512-H3iJ3tIEOJDBMM4nEF7KAmJRwzqK1pWXVT3jspdVrS5u2hW8eg+mfXGCn7p0m3K2400agfjewvuGfrFGDDq/cA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@xmldom/xmldom": "^0.8.10", + "babel-code-frame": "latest", + "chalk": "4.1.2", + "commander": "^2.9.0", + "debug": "^4.3.6", + "decompress": "latest", + "eslint": "latest", + "fast-xml-parser": "^4.3.1", + "js-yaml": "latest", + "jshint": "^2.10.1", + "lodash": "^4.17.21", + "minimatch": "^3.0.4", + "pdfmake": "latest", + "pluralize": "latest", + "strip-ansi": "^6.0.1", + "table": "latest", + "text-table": "latest", + "xpath": "latest" + }, + "bin": { + "apigeelint": "cli.js" + }, + "engines": { + "node": ">= 20", + "npm": ">= 10.5.0" + } + }, + "node_modules/apigeelint/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/apigeelint/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "node_modules/babel-code-frame/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/babel-code-frame/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", + "dev": true, + "license": "MIT" + }, + "node_modules/bl": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", + "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/bl/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/bl/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/bl/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/bl/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/brotli": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/brotli/-/brotli-1.3.3.tgz", + "integrity": "sha512-oTKjJdShmDuGW94SyyaoQvAjf30dZaHnjJ8uAF+u2/vGJkJbJPJAT1gDiOJP5v1Zb6f9KEyW/1HpuaWIXtGHPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "base64-js": "^1.1.2" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "node_modules/buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true, + "license": "MIT" + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/cli": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", + "integrity": "sha512-41U72MB56TfUMGndAKK8vJ78eooOD4Z5NOL4xEfjc0c23s+6EYKXlXsmACBVclLP1yOfWCgEganVzddVrSNoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "exit": "0.1.2", + "glob": "^7.1.1" + }, + "engines": { + "node": ">=0.2.5" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha512-duS7VP5pvfsNLDvL1O4VOEbw37AI3A4ZUQYemvDlnpGrNu9tprR7BYWpDYwC0Xia0Zxz5ZupdiIrUp0GH1aXfg==", + "dev": true, + "dependencies": { + "date-now": "^0.1.4" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypto-js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha512-AsElvov3LoNB7tf5k37H2jYSB+ZZPMT5sG2QjJCcdlV5chIv6htBUBUui2IKRjgtKAKtCBN7Zbwa+MtwLjSeNw==", + "dev": true + }, + "node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decompress": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", + "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "decompress-tar": "^4.0.0", + "decompress-tarbz2": "^4.0.0", + "decompress-targz": "^4.0.0", + "decompress-unzip": "^4.0.1", + "graceful-fs": "^4.1.10", + "make-dir": "^1.0.0", + "pify": "^2.3.0", + "strip-dirs": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-tar": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", + "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "file-type": "^5.2.0", + "is-stream": "^1.1.0", + "tar-stream": "^1.5.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-tarbz2": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", + "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "decompress-tar": "^4.1.0", + "file-type": "^6.1.0", + "is-stream": "^1.1.0", + "seek-bzip": "^1.0.5", + "unbzip2-stream": "^1.0.9" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-tarbz2/node_modules/file-type": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", + "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-targz": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", + "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "decompress-tar": "^4.1.1", + "file-type": "^5.2.0", + "is-stream": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-unzip": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", + "integrity": "sha512-1fqeluvxgnn86MOh66u8FjbtJpAFv5wgCT9Iw8rcBqQcCo5tO8eiJw7NNTrvt9n4CRBVq7CstiS922oPgyGLrw==", + "dev": true, + "license": "MIT", + "dependencies": { + "file-type": "^3.8.0", + "get-stream": "^2.2.0", + "pify": "^2.3.0", + "yauzl": "^2.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-unzip/node_modules/file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/deep-equal": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.2.tgz", + "integrity": "sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arguments": "^1.1.1", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.5.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/dfa": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/dfa/-/dfa-1.2.0.tgz", + "integrity": "sha512-ED3jP8saaweFTjeGX8HQPjeC1YYyZs98jGNZx6IiBvxW7JG5v492kamAQB3m2wop07CvU/RQmzcKr6bgcC5D/Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + } + }, + "node_modules/dom-serializer/node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/dom-serializer/node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true, + "license": "BSD-2-Clause", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/domhandler": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", + "integrity": "sha512-q9bUwjfp7Eif8jWxxxPSykdRZAb6GkguBGSgvvCrhI9wB71W2K/Kvv4E61CF/mcCfnVJDeDWx/Vb/uAqbDj6UQ==", + "dev": true, + "dependencies": { + "domelementtype": "1" + } + }, + "node_modules/domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw==", + "dev": true, + "dependencies": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/entities": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", + "integrity": "sha512-LbLqfXgJMmy81t+7c14mnulFHJ170cM6E+0vMXR9k/ZiZwgX8i5pNgjTCX3SO4VeUsFLV+8InixoretwU+MjBQ==", + "dev": true, + "license": "BSD-like" + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.13.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.13.0.tgz", + "integrity": "sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.11.0", + "@eslint/config-array": "^0.18.0", + "@eslint/core": "^0.7.0", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "9.13.0", + "@eslint/plugin-kit": "^0.2.0", + "@humanfs/node": "^0.16.5", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.3.1", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.1.0", + "eslint-visitor-keys": "^4.1.0", + "espree": "^10.2.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.14.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.3.tgz", + "integrity": "sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/fast-xml-parser": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.0.tgz", + "integrity": "sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + }, + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + ], + "license": "MIT", + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true, + "license": "MIT" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", + "integrity": "sha512-AUGhbbemXxrZJRD5cDvKtQxLuYaIbNtDTK8YqupCI393Q2KSTreEsLUN3ZxAWFGiKTzL6nKuzfcIvieflUX9qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-ansi/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/htmlparser2": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", + "integrity": "sha512-hBxEg3CYXe+rPIua8ETe7tmG3XDn9B0edOE/e9wH2nLczxzgdu0m0aNHY+5wFZiviLWLdANPJTssa92dMcXQ5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "domelementtype": "1", + "domhandler": "2.3", + "domutils": "1.5", + "entities": "1.0", + "readable-stream": "1.1" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-natural-number": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", + "integrity": "sha512-Y4LTamMe0DDQIIAlaer9eKebAlDSV6huy+TWhJVPlzZh2o4tRP5SQWFlLn5N0To4mDD22/qdOq+veo1cSISLgQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jshint": { + "version": "2.13.6", + "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.13.6.tgz", + "integrity": "sha512-IVdB4G0NTTeQZrBoM8C5JFVLjV2KtZ9APgybDA1MK73xb09qFs0jCXyQLnCOp1cSZZZbvhq/6mfXHUTaDkffuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "cli": "~1.0.0", + "console-browserify": "1.1.x", + "exit": "0.1.x", + "htmlparser2": "3.8.x", + "lodash": "~4.17.21", + "minimatch": "~3.0.2", + "strip-json-comments": "1.0.x" + }, + "bin": { + "jshint": "bin/jshint" + } + }, + "node_modules/jshint/node_modules/minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/jshint/node_modules/strip-json-comments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "integrity": "sha512-AOPG8EBc5wAikaG1/7uFCNFJwnKOuQwFTpYBdTW6OvWHeZBQBrAA/amefHGrEiOnCPcLFZK6FUPtWVKpQVIRgg==", + "dev": true, + "license": "MIT", + "bin": { + "strip-json-comments": "cli.js" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", + "dev": true, + "license": "MIT" + }, + "node_modules/make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/make-dir/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-is": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", + "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==", + "dev": true, + "license": "MIT" + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pdfmake": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/pdfmake/-/pdfmake-0.2.14.tgz", + "integrity": "sha512-x9gXFAY37/CAC/WaZB/683E4Pi0cVW/RMTTNxMpe4I2kRsKv8AE3Pz6+n7iTfn+84/GtSg99BjZkYh7oGFCKmg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@foliojs-fork/linebreak": "^1.1.1", + "@foliojs-fork/pdfkit": "^0.14.0", + "iconv-lite": "^0.6.3", + "xmldoc": "^1.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true, + "license": "MIT" + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "pinkie": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/png-js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/png-js/-/png-js-1.0.0.tgz", + "integrity": "sha512-k+YsbhpA9e+EFfKjTCH3VW6aoKlyNYI6NYdTfDL4CIvFnvsuO84ttonmZE7rc+v23SLTH8XX+5w/Ak9v0xGY4g==", + "dev": true + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz", + "integrity": "sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/sax": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", + "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", + "dev": true, + "license": "ISC" + }, + "node_modules/seek-bzip": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", + "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "commander": "^2.8.1" + }, + "bin": { + "seek-bunzip": "bin/seek-bunzip", + "seek-table": "bin/seek-bzip-table" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-dirs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", + "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-natural-number": "^4.0.1" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", + "dev": true, + "license": "MIT" + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/table": { + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.2.tgz", + "integrity": "sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/table/node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tar-stream/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/tar-stream/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/tar-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/tar-stream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "license": "MIT" + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tiny-inflate": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz", + "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==", + "dev": true, + "license": "MIT" + }, + "node_modules/to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "node_modules/unicode-properties": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/unicode-properties/-/unicode-properties-1.4.1.tgz", + "integrity": "sha512-CLjCCLQ6UuMxWnbIylkisbRj31qxHPAurvena/0iwSVbQ2G1VY5/HjV0IRabOEbDHlzZlRdCrD4NhB0JtU40Pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.0", + "unicode-trie": "^2.0.0" + } + }, + "node_modules/unicode-trie": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-2.0.0.tgz", + "integrity": "sha512-x7bc76x0bm4prf1VLg79uhAzKw8DVboClSN5VxJuQ+LKDOVEW9CdH+VY7SP+vX7xCYQqzzgQpFqz15zeLvAtZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "pako": "^0.2.5", + "tiny-inflate": "^1.0.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/xmldoc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/xmldoc/-/xmldoc-1.3.0.tgz", + "integrity": "sha512-y7IRWW6PvEnYQZNZFMRLNJw+p3pezM4nKYPfr15g4OOW9i8VpeydycFuipE2297OvZnh3jSb2pxOt9QpkZUVng==", + "dev": true, + "license": "MIT", + "dependencies": { + "sax": "^1.2.4" + } + }, + "node_modules/xpath": { + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.34.tgz", + "integrity": "sha512-FxF6+rkr1rNSQrhUNYrAFJpRXNzlDoMxeXN5qI84939ylEv3qqPFKa85Oxr6tDaJKqwW6KKyo2v26TSv3k6LeA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/test/fixtures/resources/issue481/package.json b/test/fixtures/resources/issue481/package.json new file mode 100644 index 00000000..5c64e8cf --- /dev/null +++ b/test/fixtures/resources/issue481/package.json @@ -0,0 +1,15 @@ +{ + "name": "apigeelint-bug-repro", + "version": "1.0.0", + "description": "Reproduce bug in apigeelint with @xmldom/xmldom", + "devDependencies": { + "apigeelint": "2.57.0", + "debug": "4.3.5" + }, + "private": true, + "packageManager": "yarn@4.5.0", + "engines": { + "node": ">=20", + "npm": ">=10.5" + } +} diff --git a/test/fixtures/resources/issue481/sample/apiproxy/json-threat-ex1.xml b/test/fixtures/resources/issue481/sample/apiproxy/json-threat-ex1.xml new file mode 100644 index 00000000..a0f6ff73 --- /dev/null +++ b/test/fixtures/resources/issue481/sample/apiproxy/json-threat-ex1.xml @@ -0,0 +1,9 @@ + + + 1432835315778 + dino + + json-threat-ex1 + 1432836208357 + orgAdmin + diff --git a/test/fixtures/resources/issue481/sample/apiproxy/policies/AM-Clean-Request-Headers-From-Response.xml b/test/fixtures/resources/issue481/sample/apiproxy/policies/AM-Clean-Request-Headers-From-Response.xml new file mode 100644 index 00000000..4633dafe --- /dev/null +++ b/test/fixtures/resources/issue481/sample/apiproxy/policies/AM-Clean-Request-Headers-From-Response.xml @@ -0,0 +1,19 @@ + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+ + + diff --git a/test/fixtures/resources/issue481/sample/apiproxy/policies/AM-Inject-Proxy-Revision-Header.xml b/test/fixtures/resources/issue481/sample/apiproxy/policies/AM-Inject-Proxy-Revision-Header.xml new file mode 100644 index 00000000..02ed60b3 --- /dev/null +++ b/test/fixtures/resources/issue481/sample/apiproxy/policies/AM-Inject-Proxy-Revision-Header.xml @@ -0,0 +1,7 @@ + + + +
{apiproxy.name} r{apiproxy.revision}
+
+
+
diff --git a/test/fixtures/resources/issue481/sample/apiproxy/policies/AM-Response-OK.xml b/test/fixtures/resources/issue481/sample/apiproxy/policies/AM-Response-OK.xml new file mode 100644 index 00000000..9154f48e --- /dev/null +++ b/test/fixtures/resources/issue481/sample/apiproxy/policies/AM-Response-OK.xml @@ -0,0 +1,8 @@ + + + { + "status": "OK" +} + + + diff --git a/test/fixtures/resources/issue481/sample/apiproxy/policies/JSONThreatProtection-1.xml b/test/fixtures/resources/issue481/sample/apiproxy/policies/JSONThreatProtection-1.xml new file mode 100644 index 00000000..f1238efb --- /dev/null +++ b/test/fixtures/resources/issue481/sample/apiproxy/policies/JSONThreatProtection-1.xml @@ -0,0 +1,8 @@ + + request + 3 + 4 + 5 + 15 + 128 + diff --git a/test/fixtures/resources/issue481/sample/apiproxy/policies/RF-Unknown-Request.xml b/test/fixtures/resources/issue481/sample/apiproxy/policies/RF-Unknown-Request.xml new file mode 100644 index 00000000..00d758a8 --- /dev/null +++ b/test/fixtures/resources/issue481/sample/apiproxy/policies/RF-Unknown-Request.xml @@ -0,0 +1,13 @@ + + true + + + { + "error" : "that request was unknown", + "message" : "try a different request." +} + + 404 + + + diff --git a/test/fixtures/resources/issue481/sample/apiproxy/policies/RF-Unsupported-Media-Type.xml b/test/fixtures/resources/issue481/sample/apiproxy/policies/RF-Unsupported-Media-Type.xml new file mode 100644 index 00000000..c89dc17d --- /dev/null +++ b/test/fixtures/resources/issue481/sample/apiproxy/policies/RF-Unsupported-Media-Type.xml @@ -0,0 +1,13 @@ + + true + + + { + "error" : "unsupported media type", + "message" : "try using content-type:application/json." +} + + 415 + + + diff --git a/test/fixtures/resources/issue481/sample/apiproxy/proxies/endpoint1.xml b/test/fixtures/resources/issue481/sample/apiproxy/proxies/endpoint1.xml new file mode 100644 index 00000000..fb3654f6 --- /dev/null +++ b/test/fixtures/resources/issue481/sample/apiproxy/proxies/endpoint1.xml @@ -0,0 +1,65 @@ + + Endpoint to show off JSON Threat Protection policy + + /json-threat-ex1 + + + + + true + + AM-Inject-Proxy-Revision-Header + + + + + + + + AM-Clean-Request-Headers-From-Response + + + + + + + + AM-Inject-Proxy-Revision-Header + + + + + + + test json threat protection + + + RF-Unsupported-Media-Type + request.header.content-type != "application/json" + + + JSONThreatProtection-1 + + + + + AM-Response-OK + + + (proxy.pathsuffix MatchesPath "/t1") and (request.verb = "POST") + + + + + + RF-Unknown-Request + + + + + + + + + + diff --git a/test/specs/testXmlNodeLabels.js b/test/specs/testXmlNodeLabels.js index 7ea44975..c799cc2c 100644 --- a/test/specs/testXmlNodeLabels.js +++ b/test/specs/testXmlNodeLabels.js @@ -14,36 +14,105 @@ limitations under the License. */ -/* global describe, before, it, __dirname */ +/* global require, describe, before, after, it, __dirname */ const assert = require("assert"), Dom = require("@xmldom/xmldom").DOMParser, - myUtil = require("../../lib/package/myUtil.js"), - xpath = require("xpath"); + lintUtil = require("../../lib/package/lintUtil.js"), + util = require("node:util"), + child_process = require("node:child_process"), + debug = require("debug")("apigeelint:xmldom-test"); describe("xmldom related tests", function () { describe("path resolution verification", function () { + const path = require("node:path"), + fs = require("node:fs"), + proxyDir = path.resolve(__dirname, "../fixtures/resources/issue481"), + node_modules = path.resolve(proxyDir, "node_modules"); + + before(function () { + fs.rmSync(node_modules, { force: true, recursive: true }); + }); + after(function () { + fs.rmSync(node_modules, { force: true, recursive: true }); + }); + it("should resolve to a path", function (done) { try { - const p = myUtil.getNodeModulesPathFor("@xmldom/xmldom"); + const p = lintUtil.getNodeModulesPathFor("@xmldom/xmldom"); assert.ok(p); } catch (e) { assert.fail(); } done(); }); + + it("should find xmldom", function (done) { + this.timeout(22000); + + const opts = { + cwd: proxyDir, + encoding: "utf8", + }; + + if (debug.enabled) { + const r = child_process.spawnSync("which", ["node"], opts); + debug(`node: ` + JSON.stringify(r)); + } + + child_process.exec("npm install", opts, (e, stdout, stderr) => { + assert.equal(e, null); + debug(stdout); + // copy current implementation over, to allow testing of it. + const srcPackageDir = path.resolve(__dirname, "../../lib/package"), + destPackageDir = path.resolve(node_modules, "apigeelint/lib/package"); + fs.cpSync(srcPackageDir, destPackageDir, { recursive: true }); + + try { + // run apigeelint after npm install + const proc = child_process.spawn( + "node", + ["./node_modules/apigeelint/cli.js", "-s", "sample/apiproxy"], + { ...opts, timeout: 20000 }, + ); + let stdout = [], + stderr = []; + proc.stdout.on("data", (data) => { + stdout.push(data); + debug(`stdout: ${data}`); + }); + proc.stderr.on("data", (data) => { + stderr.push(data); + debug(`stderr: ${data}`); + }); + proc.on("close", (code) => { + debug(`child process exited with code ${code}`); + if (code != 0) { + //console.log(`stdout: ${stdout.join('\n')}`); + console.log(`stderr: ${stderr.join("\n")}`); + } + assert.equal(code, 0); + done(); + }); + } catch (ex1) { + console.log(ex1.stack); + assert.fail(); + done(); + } + }); + }); }); describe("element name tests", function () { let xml; - const exampleXml = ''; + const exampleXml = ``; before(function () { xml = new Dom().parseFromString(exampleXml); }); it("should properly name the document node", function (done) { assert.ok(xml); - const nodeTypeString = myUtil.xmlNodeTypeAsString(xml.nodeType); + const nodeTypeString = lintUtil.xmlNodeTypeAsString(xml.nodeType); assert.ok(nodeTypeString); assert.equal(nodeTypeString, "DOCUMENT_NODE"); done(); @@ -51,8 +120,8 @@ describe("xmldom related tests", function () { it("should properly name the root element node", function (done) { assert.ok(xml.documentElement.nodeType); - const nodeTypeString = myUtil.xmlNodeTypeAsString( - xml.documentElement.nodeType + const nodeTypeString = lintUtil.xmlNodeTypeAsString( + xml.documentElement.nodeType, ); assert.ok(nodeTypeString); assert.equal(nodeTypeString, "ELEMENT_NODE"); @@ -62,28 +131,22 @@ describe("xmldom related tests", function () { it("should properly name the comment node", function (done) { const fc = xml.documentElement.firstChild; assert.ok(fc); - const nodeTypeString = myUtil.xmlNodeTypeAsString(fc.nodeType); + const nodeTypeString = lintUtil.xmlNodeTypeAsString(fc.nodeType); assert.ok(nodeTypeString); assert.equal(nodeTypeString, "COMMENT_NODE"); done(); }); - /* - Not sure why. This test does not pass in xmldom v0.8.x - it("should properly name the attribute node", function (done) { const attr = xml.documentElement.getAttributeNode("attr1"); - console.log(`attrs(${attr})`); - const util = require("node:util"); - console.log(`attrs(${util.format(attr)})`); + debug(`attrs(${attr})`); + debug(`attrs(${util.format(attr)})`); assert.ok(attr); - //assert.ok(attrs[0]); - let nodeTypeString = myUtil.xmlNodeTypeAsString(attr); + let nodeTypeString = lintUtil.xmlNodeTypeAsString(attr.nodeType); + debug(`nodeTypeString(${nodeTypeString})`); assert.ok(nodeTypeString); assert.equal(nodeTypeString, "ATTRIBUTE_NODE"); done(); }); - - */ }); });