Files
ry.kazcloud.dev/node_modules/yaml-language-server/lib/umd/languageserver/commandExecutor.js
Ryan Kazokas d181f77fb2
All checks were successful
Build and Push / build (push) Successful in 55s
Updates dockerfile
2026-02-16 15:09:37 -05:00

35 lines
1.5 KiB
JavaScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Red Hat, Inc. 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 });
exports.commandExecutor = exports.CommandExecutor = void 0;
class CommandExecutor {
constructor() {
this.commands = new Map();
}
executeCommand(params) {
if (this.commands.has(params.command)) {
const handler = this.commands.get(params.command);
return handler(...params.arguments);
}
throw new Error(`Command '${params.command}' not found`);
}
registerCommand(commandId, handler) {
this.commands.set(commandId, handler);
}
}
exports.CommandExecutor = CommandExecutor;
exports.commandExecutor = new CommandExecutor();
});
//# sourceMappingURL=commandExecutor.js.map