Remove unused webdriver-manager dependency to eliminate vulnerable form-data ~2.3.2 (#11060)

* Initial plan

* Remove webdriver-manager to eliminate form-data ~2.3.2 dependency

Co-authored-by: eromano <1030050+eromano@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: eromano <1030050+eromano@users.noreply.github.com>
This commit is contained in:
Copilot
2025-07-30 13:28:22 -04:00
committed by MichalKinas
parent c7e6051b1a
commit ecd4fed2ac
12 changed files with 692 additions and 1134 deletions

View File

@@ -1,24 +1,59 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Docset = exports.Text = exports.Link = exports.Paragraph = exports.Heading = exports.Root = exports.Parent = exports.Node = exports.schema = void 0;
var mdToString = require("mdast-util-to-string");
var jsyaml = require("js-yaml");
exports.schema = "\n type Query {\n documents(idFilter: String = \"\"): [Root]\n }\n\n type Root {\n id: ID\n type: String\n folder(depth: Int = 1): String\n metadata(key: String): String\n heading(depth: Int = 0): Heading\n headings(depth: Int = 0): [Heading]\n paragraph: Paragraph\n paragraphs: [Paragraph]\n link: Link\n links: [Link]\n text: Text\n texts: [Text]\n children: [Node]\n }\n\n type Heading {\n depth: Int\n plaintext: String\n paragraph: Paragraph\n paragraphs: [Paragraph]\n link: Link\n links: [Link]\n children: [Node]\n }\n\n type Paragraph {\n plaintext: String\n }\n\n type Link {\n plaintext: String\n title: String\n url: String\n paragraph: Paragraph\n paragraphs: [Paragraph]\n text: Text\n texts: [Text]\n }\n\n type Text {\n value: String\n }\n\n type Node {\n type: String\n children: [Node]\n }\n";
'use strict';
/*!
* @license
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var __extends =
(this && this.__extends) ||
(function () {
var extendStatics = function (d, b) {
extendStatics =
Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array &&
function (d, b) {
d.__proto__ = b;
}) ||
function (d, b) {
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
};
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== 'function' && b !== null) throw new TypeError('Class extends value ' + String(b) + ' is not a constructor or null');
extendStatics(d, b);
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());
};
})();
Object.defineProperty(exports, '__esModule', { value: true });
exports.Docset =
exports.Text =
exports.Link =
exports.Paragraph =
exports.Heading =
exports.Root =
exports.Parent =
exports.Node =
exports.schema =
void 0;
var mdast_util_to_string_1 = require('mdast-util-to-string');
var jsyaml = require('js-yaml');
exports.schema =
'\n type Query {\n documents(idFilter: String = ""): [Root]\n }\n\n type Root {\n id: ID\n type: String\n folder(depth: Int = 1): String\n metadata(key: String): String\n heading(depth: Int = 0): Heading\n headings(depth: Int = 0): [Heading]\n paragraph: Paragraph\n paragraphs: [Paragraph]\n link: Link\n links: [Link]\n text: Text\n texts: [Text]\n children: [Node]\n }\n\n type Heading {\n depth: Int\n plaintext: String\n paragraph: Paragraph\n paragraphs: [Paragraph]\n link: Link\n links: [Link]\n children: [Node]\n }\n\n type Paragraph {\n plaintext: String\n }\n\n type Link {\n plaintext: String\n title: String\n url: String\n paragraph: Paragraph\n paragraphs: [Paragraph]\n text: Text\n texts: [Text]\n }\n\n type Text {\n value: String\n }\n\n type Node {\n type: String\n children: [Node]\n }\n';
var Node = /** @class */ (function () {
function Node(orig) {
this.orig = orig;
@@ -52,56 +87,78 @@ var Node = /** @class */ (function () {
};
Node.prototype.children = function () {
if (this.orig['children']) {
return this.orig['children'].map(function (x) { return new Node(x); });
}
else {
return this.orig['children'].map(function (x) {
return new Node(x);
});
} else {
return null;
}
};
return Node;
}());
})();
exports.Node = Node;
var Parent = /** @class */ (function () {
function Parent(orig) {
this.orig = orig;
}
Parent.prototype.plaintext = function () {
return mdToString(this.orig);
return (0, mdast_util_to_string_1.toString)(this.orig);
};
Parent.prototype.paragraph = function () {
return new Paragraph(this.orig.children.find(function (ch) { return (ch.type === 'paragraph'); }));
return new Paragraph(
this.orig.children.find(function (ch) {
return ch.type === 'paragraph';
})
);
};
Parent.prototype.paragraphs = function () {
return this.orig.children.filter(function (ch) {
return (ch.type === 'paragraph');
})
.map(function (ch) { return new Paragraph(ch); });
return this.orig.children
.filter(function (ch) {
return ch.type === 'paragraph';
})
.map(function (ch) {
return new Paragraph(ch);
});
};
Parent.prototype.link = function () {
return new Link(this.orig.children.find(function (ch) { return (ch.type === 'link'); }));
return new Link(
this.orig.children.find(function (ch) {
return ch.type === 'link';
})
);
};
Parent.prototype.links = function () {
return this.orig.children.filter(function (ch) {
return (ch.type === 'link');
})
.map(function (ch) { return new Link(ch); });
return this.orig.children
.filter(function (ch) {
return ch.type === 'link';
})
.map(function (ch) {
return new Link(ch);
});
};
Parent.prototype.text = function () {
return new Text(this.orig.children.find(function (ch) { return (ch.type === 'text'); }));
return new Text(
this.orig.children.find(function (ch) {
return ch.type === 'text';
})
);
};
Parent.prototype.texts = function () {
return this.orig.children.filter(function (ch) {
return (ch.type === 'text');
})
.map(function (ch) { return new Text(ch); });
return this.orig.children
.filter(function (ch) {
return ch.type === 'text';
})
.map(function (ch) {
return new Text(ch);
});
};
return Parent;
}());
})();
exports.Parent = Parent;
var Root = /** @class */ (function (_super) {
__extends(Root, _super);
function Root() {
return _super !== null && _super.apply(this, arguments) || this;
return (_super !== null && _super.apply(this, arguments)) || this;
}
Root.prototype.type = function () {
return 'root';
@@ -114,62 +171,65 @@ var Root = /** @class */ (function (_super) {
};
Root.prototype.metadata = function (args) {
if (!this._meta) {
var yamlElement = this.orig.children.find(function (ch) { return (ch.type === 'yaml'); });
var yamlElement = this.orig.children.find(function (ch) {
return ch.type === 'yaml';
});
if (yamlElement) {
this._meta = jsyaml.safeLoad(yamlElement.value);
}
else {
} else {
this._meta = {};
}
}
if (this._meta[args['key']]) {
return this._meta[args['key']];
}
else {
} else {
return '';
}
};
Root.prototype.heading = function (args) {
var depth = args['depth'];
return new Heading(this.orig.children.find(function (ch) {
return (ch.type === 'heading') &&
((depth === 0) || (depth === ch.depth));
}));
return new Heading(
this.orig.children.find(function (ch) {
return ch.type === 'heading' && (depth === 0 || depth === ch.depth);
})
);
};
Root.prototype.headings = function (args) {
var depth = args['depth'];
return this.orig.children.filter(function (ch) {
return (ch.type === 'heading') &&
((depth === 0) || (depth === ch.depth));
})
.map(function (ch) { return new Heading(ch); });
return this.orig.children
.filter(function (ch) {
return ch.type === 'heading' && (depth === 0 || depth === ch.depth);
})
.map(function (ch) {
return new Heading(ch);
});
};
return Root;
}(Parent));
})(Parent);
exports.Root = Root;
var Heading = /** @class */ (function (_super) {
__extends(Heading, _super);
function Heading() {
return _super !== null && _super.apply(this, arguments) || this;
return (_super !== null && _super.apply(this, arguments)) || this;
}
Heading.prototype.depth = function () {
return this.orig.depth;
};
return Heading;
}(Parent));
})(Parent);
exports.Heading = Heading;
var Paragraph = /** @class */ (function (_super) {
__extends(Paragraph, _super);
function Paragraph() {
return _super !== null && _super.apply(this, arguments) || this;
return (_super !== null && _super.apply(this, arguments)) || this;
}
return Paragraph;
}(Parent));
})(Parent);
exports.Paragraph = Paragraph;
var Link = /** @class */ (function (_super) {
__extends(Link, _super);
function Link() {
return _super !== null && _super.apply(this, arguments) || this;
return (_super !== null && _super.apply(this, arguments)) || this;
}
Link.prototype.title = function () {
return this.orig.title;
@@ -178,7 +238,7 @@ var Link = /** @class */ (function (_super) {
return this.orig.url;
};
return Link;
}(Parent));
})(Parent);
exports.Link = Link;
var Text = /** @class */ (function () {
function Text(orig) {
@@ -188,7 +248,7 @@ var Text = /** @class */ (function () {
return this.orig.value;
};
return Text;
}());
})();
exports.Text = Text;
var libNamesRegex = /content-services|core|extensions|insights|process-services|process-services-cloud/;
var Docset = /** @class */ (function () {
@@ -197,8 +257,7 @@ var Docset = /** @class */ (function () {
this.docs = [];
var pathnames = Object.keys(mdCache);
pathnames.forEach(function (pathname) {
if (!pathname.match(/README/) &&
pathname.match(libNamesRegex)) {
if (!pathname.match(/README/) && pathname.match(libNamesRegex)) {
var doc = new Root(mdCache[pathname].mdInTree);
doc.id = pathname.replace(/\\/g, '/');
_this.docs.push(doc);
@@ -208,14 +267,15 @@ var Docset = /** @class */ (function () {
Docset.prototype.documents = function (args) {
if (args['idFilter'] === '') {
return this.docs;
}
else {
return this.docs.filter(function (doc) { return doc.id.indexOf(args['idFilter'] + '/') !== -1; });
} else {
return this.docs.filter(function (doc) {
return doc.id.indexOf(args['idFilter'] + '/') !== -1;
});
}
};
Docset.prototype.size = function () {
return this.docs.length;
};
return Docset;
}());
})();
exports.Docset = Docset;