3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Update to Knub 24. Update Node typings to fix error with [util.inspect.custom] property.

This commit is contained in:
Dragory 2019-09-22 17:06:22 +03:00
parent 1681a45069
commit 4d7ab10fcf
12 changed files with 183 additions and 122 deletions

67
package-lock.json generated
View file

@ -2560,9 +2560,9 @@
}
},
"@types/node": {
"version": "10.12.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.0.tgz",
"integrity": "sha512-3TUHC3jsBAB7qVRGxT6lWyYo2v96BMmD2PTcl47H25Lu7UXtFH/2qqmKiVrnel6Ne//0TFYf6uvNX+HW2FRkLQ=="
"version": "12.7.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.5.tgz",
"integrity": "sha512-9fq4jZVhPNW8r+UYKnxF1e2HkDWOWKM5bC2/7c9wPV835I0aOrVbS/Hw/pWPk2uKrNXQqg9Z959Kz+IYDd5p3w=="
},
"@types/oauth": {
"version": "0.9.1",
@ -8299,16 +8299,49 @@
"dev": true
},
"knub": {
"version": "22.0.0",
"resolved": "https://registry.npmjs.org/knub/-/knub-22.0.0.tgz",
"integrity": "sha512-QHMqSS8eVBVX0vMff8lEkWhO7mOVXdobUrNOuAMI7ldto0Aakf0oNdDnwRXFj0yNb5Sp1fvzYFt35nsx/ORqkw==",
"version": "24.0.0",
"resolved": "https://registry.npmjs.org/knub/-/knub-24.0.0.tgz",
"integrity": "sha512-qQimi9L3p1kVV08TI3MeSN8J2CzjrYwGLVpN8IiwBvvbRFPJcVcSzvw3CSTbs594m6Zr8/MnXdh5fDQBGuMI6Q==",
"requires": {
"escape-string-regexp": "^1.0.5",
"lodash.at": "^4.6.0",
"lodash.difference": "^4.5.0",
"lodash.merge": "^4.6.2",
"reflect-metadata": "^0.1.10",
"ts-essentials": "^2.0.3"
"escape-string-regexp": "^2.0.0",
"knub-command-manager": "^5.1.0",
"reflect-metadata": "^0.1.13",
"ts-essentials": "^2.0.12"
},
"dependencies": {
"escape-string-regexp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
"integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w=="
},
"knub-command-manager": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/knub-command-manager/-/knub-command-manager-5.1.0.tgz",
"integrity": "sha512-zxYwglsdAVbskoU0WYc6nB9+nJVYQIhwLz0olvQyYprV0EIU0Wo7QDeAHbcEQUMDZEmJ1jfVAEzGGwvSHItIpA==",
"requires": {
"escape-string-regexp": "^2.0.0"
}
},
"reflect-metadata": {
"version": "0.1.13",
"resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz",
"integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg=="
}
}
},
"knub-command-manager": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/knub-command-manager/-/knub-command-manager-5.1.0.tgz",
"integrity": "sha512-zxYwglsdAVbskoU0WYc6nB9+nJVYQIhwLz0olvQyYprV0EIU0Wo7QDeAHbcEQUMDZEmJ1jfVAEzGGwvSHItIpA==",
"requires": {
"escape-string-regexp": "^2.0.0"
},
"dependencies": {
"escape-string-regexp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
"integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w=="
}
}
},
"last-commit-log": {
@ -8561,11 +8594,6 @@
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
"dev": true
},
"lodash.at": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.at/-/lodash.at-4.6.0.tgz",
"integrity": "sha1-k83OZk8KGZTqM9181A4jr9EbD/g="
},
"lodash.chunk": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.chunk/-/lodash.chunk-4.2.0.tgz",
@ -8597,11 +8625,6 @@
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
"integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA="
},
"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=="
},
"lodash.pick": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz",

View file

@ -30,7 +30,8 @@
"humanize-duration": "^3.15.0",
"io-ts": "^2.0.0",
"js-yaml": "^3.13.1",
"knub": "^22.0.0",
"knub": "^24.0.0",
"knub-command-manager": "^5.1.0",
"last-commit-log": "^2.1.0",
"lodash.chunk": "^4.2.0",
"lodash.clonedeep": "^4.5.0",
@ -63,7 +64,7 @@
"@types/js-yaml": "^3.12.1",
"@types/lodash.at": "^4.6.3",
"@types/moment-timezone": "^0.5.6",
"@types/node": "^10.12.0",
"@types/node": "^12.7.5",
"@types/passport": "^1.0.0",
"@types/passport-oauth2": "^1.4.8",
"@types/tmp": "0.0.33",

View file

@ -11,7 +11,7 @@ export class PluginRuntimeError {
this.guildId = guildId;
}
[util.inspect.custom](depth, options) {
[util.inspect.custom](depth?, options?) {
return `PRE [${this.pluginName}] [${this.guildId}] ${this.message}`;
}

View file

@ -2,10 +2,9 @@ import express from "express";
import { availablePlugins } from "../plugins/availablePlugins";
import { ZeppelinPlugin } from "../plugins/ZeppelinPlugin";
import { notFound } from "./responses";
import { CommandManager, ICommandConfig } from "knub/dist/CommandManager";
import { dropPropertiesByName, indentLines } from "../utils";
const commandManager = new CommandManager();
import { IPluginCommandConfig, Plugin, pluginUtils } from "knub";
import { parseParameters } from "knub-command-manager";
function formatConfigSchema(schema) {
if (schema._tag === "InterfaceType" || schema._tag === "PartialType") {
@ -79,20 +78,20 @@ export function initDocs(app: express.Express) {
const props = Reflect.ownKeys(pluginClass.prototype);
const commands = props.reduce((arr, prop) => {
if (typeof prop !== "string") return arr;
const propCommands = Reflect.getMetadata("commands", pluginClass.prototype, prop);
if (propCommands) {
const decoratorCommands = pluginUtils.getPluginDecoratorCommands(pluginClass as typeof Plugin);
if (decoratorCommands) {
arr.push(
...propCommands.map(cmd => {
const trigger = typeof cmd.command === "string" ? cmd.command : cmd.command.source;
...decoratorCommands.map(cmd => {
const trigger = typeof cmd.trigger === "string" ? cmd.trigger : cmd.trigger.source;
const parameters = cmd.parameters
? typeof cmd.parameters === "string"
? commandManager.parseParameterString(cmd.parameters)
? parseParameters(cmd.parameters)
: cmd.parameters
: [];
const config: ICommandConfig = cmd.options || {};
const config: IPluginCommandConfig = cmd.config || {};
if (config.overloads) {
config.overloads = config.overloads.map(overload => {
return typeof overload === "string" ? commandManager.parseParameterString(overload) : overload;
return typeof overload === "string" ? parseParameters(overload) : overload;
});
}

View file

@ -6,41 +6,42 @@ import {
resolveUser,
UnknownUser,
} from "./utils";
import { CommandArgumentTypeError } from "knub";
import { Client, GuildChannel, Message } from "eris";
import { TypeConversionError } from "knub-command-manager";
import { ICommandContext } from "knub";
export const customArgumentTypes = {
delay(value) {
const result = convertDelayStringToMS(value);
if (result == null) {
throw new CommandArgumentTypeError(`Could not convert ${value} to a delay`);
throw new TypeConversionError(`Could not convert ${value} to a delay`);
}
return result;
},
async resolvedUser(value, msg, bot: Client) {
const result = await resolveUser(bot, value);
async resolvedUser(value, context: ICommandContext) {
const result = await resolveUser(context.bot, value);
if (result == null || result instanceof UnknownUser) {
throw new CommandArgumentTypeError(`User \`${disableCodeBlocks(value)}\` was not found`);
throw new TypeConversionError(`User \`${disableCodeBlocks(value)}\` was not found`);
}
return result;
},
async resolvedUserLoose(value, msg, bot: Client) {
const result = await resolveUser(bot, value);
async resolvedUserLoose(value, context: ICommandContext) {
const result = await resolveUser(context.bot, value);
if (result == null) {
throw new CommandArgumentTypeError(`Invalid user: \`${disableCodeBlocks(value)}\``);
throw new TypeConversionError(`Invalid user: \`${disableCodeBlocks(value)}\``);
}
return result;
},
async resolvedMember(value, msg: Message, bot: Client) {
if (!(msg.channel instanceof GuildChannel)) return null;
async resolvedMember(value, context: ICommandContext) {
if (!(context.message.channel instanceof GuildChannel)) return null;
const result = await resolveMember(bot, msg.channel.guild, value);
const result = await resolveMember(context.bot, context.message.channel.guild, value);
if (result == null) {
throw new CommandArgumentTypeError(
throw new TypeConversionError(
`Member \`${disableCodeBlocks(value)}\` was not found or they have left the server`,
);
}

View file

@ -1,4 +1,4 @@
import { decorators as d, logger } from "knub";
import { decorators as d, ICommandContext, logger } from "knub";
import { GlobalZeppelinPlugin } from "./GlobalZeppelinPlugin";
import { Attachment, GuildChannel, Message, TextChannel } from "eris";
import { confirm, downloadFile, errorMessage, noop, SECONDS, trimLines } from "../utils";
@ -57,8 +57,8 @@ export class ChannelArchiverPlugin extends ZeppelinPlugin {
},
],
preFilters: [
(msg, command, plugin: ChannelArchiverPlugin) => {
return plugin.isOwner(msg.author.id);
(command, context: ICommandContext) => {
return (context.plugin as ChannelArchiverPlugin).isOwner(context.message.author.id);
},
],
})

View file

@ -87,7 +87,7 @@ export class CustomEventsPlugin extends ZeppelinPlugin<TConfigSchema> {
onLoad() {
for (const [key, event] of Object.entries(this.getConfig().events)) {
if (event.trigger.type === "command") {
this.commands.add(
this.addCommand(
event.trigger.name,
event.trigger.params,
(msg, args) => {
@ -95,8 +95,9 @@ export class CustomEventsPlugin extends ZeppelinPlugin<TConfigSchema> {
this.runEvent(event, { msg, args }, { args, msg: strippedMsg });
},
{
extra: {
requiredPermission: `events.${key}.trigger.can_use`,
locks: [],
},
},
);
}

View file

@ -78,9 +78,11 @@ export class LocatePlugin extends ZeppelinPlugin<TConfigSchema> {
}
@d.command("where", "<member:resolvedMember>", {
extra: {
info: {
description: "Posts an instant invite to the voice channel that `<member>` is in",
},
},
})
@d.permission("can_where")
async whereCmd(msg: Message, args: { member: Member; time?: number; reminder?: string }) {
@ -90,9 +92,11 @@ export class LocatePlugin extends ZeppelinPlugin<TConfigSchema> {
@d.command("vcalert", "<member:resolvedMember> [duration:delay] [reminder:string$]", {
aliases: ["vca"],
extra: {
info: {
description: "Sets up an alert that notifies you any time `<member>` switches or joins voice channels",
},
},
})
@d.permission("can_alert")
async vcalertCmd(msg: Message, args: { member: Member; duration?: number; reminder?: string }) {

View file

@ -483,10 +483,12 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
@d.command("update", "<caseNumber:number> [note:string$]", {
overloads: ["[note:string$]"],
extra: {
info: {
description:
"Update the specified case (or, if case number is omitted, your latest case) by adding more notes/details to it",
},
},
})
@d.permission("can_note")
async updateCmd(msg: Message, args: { caseNumber?: number; note?: string }) {
@ -527,9 +529,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
}
@d.command("note", "<user:string> <note:string$>", {
extra: {
info: {
description: "Add a note to the specified user",
},
},
})
@d.permission("can_note")
async noteCmd(msg: Message, args: { user: string; note: string }) {
@ -552,9 +556,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
@d.command("warn", "<user:string> <reason:string$>", {
options: [{ name: "mod", type: "member" }],
extra: {
info: {
description: "Send a warning to the specified user",
},
},
})
@d.permission("can_warn")
async warnCmd(msg: Message, args: { user: string; reason: string; mod?: Member }) {
@ -757,9 +763,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
@d.command("mute", "<user:string> <time:delay> <reason:string$>", {
overloads: ["<user:string> <time:delay>", "<user:string> [reason:string$]"],
options: [{ name: "mod", type: "member" }],
extra: {
info: {
description: "Mute the specified member",
},
},
})
@d.permission("can_mute")
async muteCmd(msg: Message, args: { user: string; time?: number; reason?: string; mod: Member }) {
@ -798,9 +806,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
@d.command("forcemute", "<user:string> <time:delay> <reason:string$>", {
overloads: ["<user:string> <time:delay>", "<user:string> [reason:string$]"],
options: [{ name: "mod", type: "member" }],
extra: {
info: {
description: "Force-mute the specified user, even if they're not on the server",
},
},
})
@d.permission("can_mute")
async forcemuteCmd(msg: Message, args: { user: string; time?: number; reason?: string; mod: Member }) {
@ -876,9 +886,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
@d.command("unmute", "<user:string> <time:delay> <reason:string$>", {
overloads: ["<user:string> <time:delay>", "<user:string> [reason:string$]"],
options: [{ name: "mod", type: "member" }],
extra: {
info: {
description: "Unmute the specified member",
},
},
})
@d.permission("can_mute")
async unmuteCmd(msg: Message, args: { user: string; time?: number; reason?: string; mod?: Member }) {
@ -921,9 +933,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
@d.command("forceunmute", "<user:string> <time:delay> <reason:string$>", {
overloads: ["<user:string> <time:delay>", "<user:string> [reason:string$]"],
options: [{ name: "mod", type: "member" }],
extra: {
info: {
description: "Force-unmute the specified user, even if they're not on the server",
},
},
})
@d.permission("can_mute")
async forceunmuteCmd(msg: Message, args: { user: string; time?: number; reason?: string; mod?: Member }) {
@ -950,9 +964,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
@d.command("kick", "<user:string> [reason:string$]", {
options: [{ name: "mod", type: "member" }],
extra: {
info: {
description: "Kick the specified member",
},
},
})
@d.permission("can_kick")
async kickCmd(msg, args: { user: string; reason: string; mod: Member }) {
@ -1011,9 +1027,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
@d.command("ban", "<user:string> [reason:string$]", {
options: [{ name: "mod", type: "member" }],
extra: {
info: {
description: "Ban the specified member",
},
},
})
@d.permission("can_ban")
async banCmd(msg, args: { user: string; reason?: string; mod?: Member }) {
@ -1072,10 +1090,12 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
@d.command("softban", "<user:string> [reason:string$]", {
options: [{ name: "mod", type: "member" }],
extra: {
info: {
description:
'"Softban" the specified user by banning and immediately unbanning them. Effectively a kick with message deletions.',
},
},
})
@d.permission("can_ban")
async softbanCmd(msg, args: { user: string; reason: string; mod?: Member }) {
@ -1162,9 +1182,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
@d.command("unban", "<user:string> [reason:string$]", {
options: [{ name: "mod", type: "member" }],
extra: {
info: {
description: "Unban the specified member",
},
},
})
@d.permission("can_ban")
async unbanCmd(msg: Message, args: { user: string; reason: string; mod: Member }) {
@ -1216,9 +1238,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
@d.command("forceban", "<user:string> [reason:string$]", {
options: [{ name: "mod", type: "member" }],
extra: {
info: {
description: "Force-ban the specified user, even if they aren't on the server",
},
},
})
@d.permission("can_ban")
async forcebanCmd(msg: Message, args: { user: string; reason?: string; mod?: Member }) {
@ -1283,9 +1307,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
}
@d.command("massban", "<userIds:string...>", {
extra: {
info: {
description: "Mass-ban a list of user IDs",
},
},
})
@d.permission("can_massban")
async massbanCmd(msg: Message, args: { userIds: string[] }) {
@ -1370,9 +1396,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
@d.command("addcase", "<type:string> <user:string> [reason:string$]", {
options: [{ name: "mod", type: "member" }],
extra: {
info: {
description: "Add an arbitrary case to the specified user without taking any action",
},
},
})
@d.permission("can_addcase")
async addcaseCmd(msg: Message, args: { type: string; user: string; reason?: string; mod?: Member }) {
@ -1434,9 +1462,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
}
@d.command("case", "<caseNumber:number>", {
extra: {
info: {
description: "Show information about a specific case",
},
},
})
@d.permission("can_view")
async showCaseCmd(msg: Message, args: { caseNumber: number }) {
@ -1465,9 +1495,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
shortcut: "h",
},
],
extra: {
info: {
description: "Show a list of cases the specified user has",
},
},
})
@d.permission("can_view")
async userCasesCmd(msg: Message, args: { user: string; expand?: boolean; hidden?: boolean }) {
@ -1532,9 +1564,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
@d.command("cases", null, {
options: [{ name: "mod", type: "Member" }],
extra: {
info: {
description: "Show the most recent 5 cases by the specified --mod",
},
},
})
@d.permission("can_view")
async recentCasesCmd(msg: Message, args: { mod?: Member }) {
@ -1561,9 +1595,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
}
@d.command("hidecase", "<caseNum:number>", {
extra: {
info: {
description: "Hide the specified case so it doesn't appear in !cases or !info",
},
},
})
@d.permission("can_hidecase")
async hideCaseCmd(msg: Message, args: { caseNum: number }) {
@ -1580,9 +1616,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
}
@d.command("unhidecase", "<caseNum:number>", {
extra: {
info: {
description: "Un-hide the specified case, making it appear in !cases and !info again",
},
},
})
@d.permission("can_hidecase")
async unhideCaseCmd(msg: Message, args: { caseNum: number }) {

View file

@ -10,6 +10,7 @@ import { ZeppelinPlugin } from "./ZeppelinPlugin";
import { parseTemplate, renderTemplate, TemplateParseError } from "../templateFormatter";
import { GuildArchives } from "../data/GuildArchives";
import * as t from "io-ts";
import { parseArguments } from "knub-command-manager";
const ConfigSchema = t.type({
prefix: t.string,
@ -233,7 +234,7 @@ export class TagsPlugin extends ZeppelinPlugin<TConfigSchema> {
// Substitute variables (matched with Knub's argument parser -> supports quotes etc.)
const variableStr = msg.data.content.slice(prefix.length + tagName.length).trim();
const tagArgs = this.commands.parseArguments(variableStr).map(v => v.value);
const tagArgs = parseArguments(variableStr).map(v => v.value);
// Format the string
try {

View file

@ -1,4 +1,11 @@
import { decorators as d, getCommandSignature, IPluginOptions, ICommandDefinition, waitForReaction } from "knub";
import {
decorators as d,
getCommandSignature,
ICommandContext,
ICommandExtraData,
IPluginOptions,
waitForReaction,
} from "knub";
import {
CategoryChannel,
Channel,
@ -45,6 +52,7 @@ import { ZeppelinPlugin } from "./ZeppelinPlugin";
import { getCurrentUptime } from "../uptime";
import LCL from "last-commit-log";
import * as t from "io-ts";
import { ICommandDefinition } from "knub-command-manager";
const ConfigSchema = t.type({
can_roles: t.boolean,
@ -959,17 +967,18 @@ export class UtilityPlugin extends ZeppelinPlugin<TConfigSchema> {
helpCmd(msg: Message, args: { command: string }) {
const searchStr = args.command.toLowerCase();
const matchingCommands: ICommandDefinition[] = [];
const matchingCommands: Array<ICommandDefinition<ICommandContext, ICommandExtraData>> = [];
const guildData = this.knub.getGuildData(this.guildId);
for (const plugin of guildData.loadedPlugins.values()) {
if (!(plugin instanceof ZeppelinPlugin)) continue;
const commands = plugin.getRegisteredCommands();
for (const command of commands) {
const trigger = command.trigger.source.toLowerCase();
if (trigger.startsWith(searchStr)) {
matchingCommands.push(command);
const registeredCommands = plugin.getRegisteredCommands();
for (const registeredCommand of registeredCommands) {
for (const trigger of registeredCommand.command.triggers) {
if (trigger.source.startsWith(searchStr)) {
matchingCommands.push(registeredCommand.command);
}
}
}
}
@ -977,16 +986,7 @@ export class UtilityPlugin extends ZeppelinPlugin<TConfigSchema> {
const totalResults = matchingCommands.length;
const limitedResults = matchingCommands.slice(0, 15);
const signatures = limitedResults.map(command => {
return (
"`" +
getCommandSignature(
guildData.config.prefix,
command.trigger.source,
command.parameters,
command.config.options,
) +
"`"
);
return "`" + getCommandSignature(command) + "`";
});
if (totalResults === 0) {

View file

@ -184,13 +184,6 @@ export class ZeppelinPlugin<TConfig extends {} = IBasePluginConfig> extends Plug
}
}
/**
* Intended for cross-plugin functionality
*/
public getRegisteredCommands() {
return this.commands.commands;
}
/**
* Intended for cross-plugin functionality
*/