Clean up dependencies
All checks were successful
Build and Push / build (push) Successful in 18s

This commit is contained in:
2026-02-16 15:12:59 -05:00
parent d181f77fb2
commit 2f15523a55
14941 changed files with 0 additions and 2078483 deletions

View File

@@ -1,7 +0,0 @@
import { TextDocument } from 'vscode-languageserver-textdocument';
import { Diagnostic } from 'vscode-languageserver-types';
import { SingleYAMLDocument } from '../../parser/yaml-documents';
import { AdditionalValidator } from './types';
export declare class MapKeyOrderValidator implements AdditionalValidator {
validate(document: TextDocument, yamlDoc: SingleYAMLDocument): Diagnostic[];
}

View File

@@ -1,50 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Red Hat. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "vscode-languageserver-types", "yaml"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MapKeyOrderValidator = void 0;
const vscode_languageserver_types_1 = require("vscode-languageserver-types");
const yaml_1 = require("yaml");
class MapKeyOrderValidator {
validate(document, yamlDoc) {
const result = [];
(0, yaml_1.visit)(yamlDoc.internalDocument, (key, node) => {
if ((0, yaml_1.isMap)(node)) {
for (let i = 1; i < node.items.length; i++) {
if (compare(node.items[i - 1], node.items[i]) > 0) {
const range = createRange(document, node.items[i - 1]);
result.push(vscode_languageserver_types_1.Diagnostic.create(range, `Wrong ordering of key "${node.items[i - 1].key}" in mapping`, vscode_languageserver_types_1.DiagnosticSeverity.Error, 'mapKeyOrder'));
}
}
}
});
return result;
}
}
exports.MapKeyOrderValidator = MapKeyOrderValidator;
function createRange(document, node) {
const start = node?.srcToken.start[0]?.offset ?? node?.srcToken?.key.offset ?? node?.srcToken?.sep[0]?.offset;
const end = node?.srcToken?.value.offset ||
node?.srcToken?.sep[0]?.offset ||
node?.srcToken?.key.offset ||
node?.srcToken.start[node.srcToken.start.length - 1]?.offset;
return vscode_languageserver_types_1.Range.create(document.positionAt(start), document.positionAt(end));
}
function compare(thiz, that) {
const thatKey = String(that.key);
const thisKey = String(thiz.key);
return thisKey.localeCompare(thatKey);
}
});
//# sourceMappingURL=map-key-order.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"map-key-order.js","sourceRoot":"","sources":["../../../../../src/languageservice/services/validation/map-key-order.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;;;IAGhG,6EAAoF;IAGpF,+BAA0C;IAE1C,MAAa,oBAAoB;QAC/B,QAAQ,CAAC,QAAsB,EAAE,OAA2B;YAC1D,MAAM,MAAM,GAAG,EAAE,CAAC;YAElB,IAAA,YAAK,EAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;gBAC5C,IAAI,IAAA,YAAK,EAAC,IAAI,CAAC,EAAE;oBACf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;wBAC1C,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;4BACjD,MAAM,KAAK,GAAG,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;4BACvD,MAAM,CAAC,IAAI,CACT,wCAAU,CAAC,MAAM,CACf,KAAK,EACL,0BAA0B,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,cAAc,EAC7D,gDAAkB,CAAC,KAAK,EACxB,aAAa,CACd,CACF,CAAC;yBACH;qBACF;iBACF;YACH,CAAC,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC;QAChB,CAAC;KACF;IAxBD,oDAwBC;IAED,SAAS,WAAW,CAAC,QAAsB,EAAE,IAAU;QACrD,MAAM,KAAK,GAAG,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,IAAI,IAAI,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,IAAI,IAAI,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC;QAC9G,MAAM,GAAG,GACP,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,MAAM;YAC5B,IAAI,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM;YAC9B,IAAI,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM;YAC1B,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC;QAC/D,OAAO,mCAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5E,CAAC;IAED,SAAS,OAAO,CAAC,IAAU,EAAE,IAAU;QACrC,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjC,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjC,OAAO,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC"}

View File

@@ -1,6 +0,0 @@
import { TextDocument } from 'vscode-languageserver-textdocument';
import { Diagnostic } from 'vscode-languageserver-types';
import { SingleYAMLDocument } from '../../parser/yaml-documents';
export interface AdditionalValidator {
validate(document: TextDocument, yamlDoc: SingleYAMLDocument): Diagnostic[];
}

View File

@@ -1,17 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Red Hat. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
});
//# sourceMappingURL=types.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/languageservice/services/validation/types.ts"],"names":[],"mappings":"AAAA;;;gGAGgG"}

View File

@@ -1,8 +0,0 @@
import { TextDocument } from 'vscode-languageserver-textdocument';
import { Diagnostic } from 'vscode-languageserver-types';
import { SingleYAMLDocument } from '../../parser/yaml-documents';
import { AdditionalValidator } from './types';
export declare class UnusedAnchorsValidator implements AdditionalValidator {
validate(document: TextDocument, yamlDoc: SingleYAMLDocument): Diagnostic[];
private getAnchorNode;
}

View File

@@ -1,87 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Red Hat. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "vscode-languageserver-types", "yaml", "../../../languageservice/utils/astUtils"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnusedAnchorsValidator = void 0;
const vscode_languageserver_types_1 = require("vscode-languageserver-types");
const yaml_1 = require("yaml");
const astUtils_1 = require("../../../languageservice/utils/astUtils");
class UnusedAnchorsValidator {
validate(document, yamlDoc) {
const result = [];
const anchors = new Set();
const usedAnchors = new Set();
const anchorParent = new Map();
(0, yaml_1.visit)(yamlDoc.internalDocument, (key, node, path) => {
if (!(0, yaml_1.isNode)(node)) {
return;
}
if (((0, yaml_1.isCollection)(node) || (0, yaml_1.isScalar)(node)) && node.anchor) {
anchors.add(node);
anchorParent.set(node, path[path.length - 1]);
}
if ((0, yaml_1.isAlias)(node)) {
usedAnchors.add(node.resolve(yamlDoc.internalDocument));
}
});
for (const anchor of anchors) {
if (!usedAnchors.has(anchor)) {
const aToken = this.getAnchorNode(anchorParent.get(anchor), anchor);
if (aToken) {
const range = vscode_languageserver_types_1.Range.create(document.positionAt(aToken.offset), document.positionAt(aToken.offset + aToken.source.length));
const warningDiagnostic = vscode_languageserver_types_1.Diagnostic.create(range, `Unused anchor "${aToken.source}"`, vscode_languageserver_types_1.DiagnosticSeverity.Hint, 0);
warningDiagnostic.tags = [vscode_languageserver_types_1.DiagnosticTag.Unnecessary];
result.push(warningDiagnostic);
}
}
}
return result;
}
getAnchorNode(parentNode, node) {
if (parentNode && parentNode.srcToken) {
const token = parentNode.srcToken;
if ((0, astUtils_1.isCollectionItem)(token)) {
return getAnchorFromCollectionItem(token);
}
else if (yaml_1.CST.isCollection(token)) {
for (const t of token.items) {
if (node.srcToken !== t.value)
continue;
const anchor = getAnchorFromCollectionItem(t);
if (anchor) {
return anchor;
}
}
}
}
return undefined;
}
}
exports.UnusedAnchorsValidator = UnusedAnchorsValidator;
function getAnchorFromCollectionItem(token) {
for (const t of token.start) {
if (t.type === 'anchor') {
return t;
}
}
if (token.sep && Array.isArray(token.sep)) {
for (const t of token.sep) {
if (t.type === 'anchor') {
return t;
}
}
}
}
});
//# sourceMappingURL=unused-anchors.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"unused-anchors.js","sourceRoot":"","sources":["../../../../../src/languageservice/services/validation/unused-anchors.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;;;IAGhG,6EAAmG;IACnG,+BAAiH;IAIjH,sEAA2E;IAE3E,MAAa,sBAAsB;QACjC,QAAQ,CAAC,QAAsB,EAAE,OAA2B;YAC1D,MAAM,MAAM,GAAG,EAAE,CAAC;YAClB,MAAM,OAAO,GAAG,IAAI,GAAG,EAA8B,CAAC;YACtD,M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oBACvB,OAAO,CAAC,CAAC;iBACV;aACF;SACF;IACH,CAAC"}

View File

@@ -1,12 +0,0 @@
import { TextDocument } from 'vscode-languageserver-textdocument';
import { Diagnostic } from 'vscode-languageserver-types';
import { SingleYAMLDocument } from '../../parser/yaml-documents';
import { LanguageSettings } from '../../yamlLanguageService';
import { AdditionalValidator } from './types';
export declare class YAMLStyleValidator implements AdditionalValidator {
private forbidSequence;
private forbidMapping;
constructor(settings: LanguageSettings);
validate(document: TextDocument, yamlDoc: SingleYAMLDocument): Diagnostic[];
private getRangeOf;
}

View File

@@ -1,38 +0,0 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "vscode-languageserver-types", "yaml"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.YAMLStyleValidator = void 0;
const vscode_languageserver_types_1 = require("vscode-languageserver-types");
const yaml_1 = require("yaml");
class YAMLStyleValidator {
constructor(settings) {
this.forbidMapping = settings.flowMapping === 'forbid';
this.forbidSequence = settings.flowSequence === 'forbid';
}
validate(document, yamlDoc) {
const result = [];
(0, yaml_1.visit)(yamlDoc.internalDocument, (key, node) => {
if (this.forbidMapping && (0, yaml_1.isMap)(node) && node.srcToken?.type === 'flow-collection') {
result.push(vscode_languageserver_types_1.Diagnostic.create(this.getRangeOf(document, node.srcToken), 'Flow style mapping is forbidden', vscode_languageserver_types_1.DiagnosticSeverity.Error, 'flowMap'));
}
if (this.forbidSequence && (0, yaml_1.isSeq)(node) && node.srcToken?.type === 'flow-collection') {
result.push(vscode_languageserver_types_1.Diagnostic.create(this.getRangeOf(document, node.srcToken), 'Flow style sequence is forbidden', vscode_languageserver_types_1.DiagnosticSeverity.Error, 'flowSeq'));
}
});
return result;
}
getRangeOf(document, node) {
return vscode_languageserver_types_1.Range.create(document.positionAt(node.start.offset), document.positionAt(node.end.pop().offset));
}
}
exports.YAMLStyleValidator = YAMLStyleValidator;
});
//# sourceMappingURL=yaml-style.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"yaml-style.js","sourceRoot":"","sources":["../../../../../src/languageservice/services/validation/yaml-style.ts"],"names":[],"mappings":";;;;;;;;;;;;IACA,6EAAoF;IACpF,+BAA2C;IAM3C,MAAa,kBAAkB;QAI7B,YAAY,QAA0B;YACpC,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,WAAW,KAAK,QAAQ,CAAC;YACvD,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,YAAY,KAAK,QAAQ,CAAC;QAC3D,CAAC;QACD,QAAQ,CAAC,QAAsB,EAAE,OAA2B;YAC1D,MAAM,MAAM,GAAG,EAAE,CAAC;YAClB,IAAA,YAAK,EAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;gBAC5C,IAAI,IAAI,CAAC,aAAa,IAAI,IAAA,YAAK,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,KAAK,iBAAiB,EAAE;oBAClF,MAAM,CAAC,IAAI,CACT,wCAAU,CAAC,MAAM,CACf,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,EACxC,iCAAiC,EACjC,gDAAkB,CAAC,KAAK,EACxB,SAAS,CACV,CACF,CAAC;iBACH;gBACD,IAAI,IAAI,CAAC,cAAc,IAAI,IAAA,YAAK,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,KAAK,iBAAiB,EAAE;oBACnF,MAAM,CAAC,IAAI,CACT,wCAAU,CAAC,MAAM,CACf,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,EACxC,kCAAkC,EAClC,gDAAkB,CAAC,KAAK,EACxB,SAAS,CACV,CACF,CAAC;iBACH;YACH,CAAC,CAAC,CAAC;YACH,OAAO,MAAM,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