export async function delay(ms: number, result?: T): Promise { return new Promise((resolve) => setTimeout(() => resolve(result), ms)); } export const getPluginSpecificData = (url: string): Record => { const pluginMatch = url.match(/\/\/(plibo-[\w-]+)-\d+-\d+-\d+-\d+/); const versionMatch = url.match(/plibo-[\w-]+-(\d+)-(\d+)-(\d+)-\d+/); return { pluginName: pluginMatch ? pluginMatch[1] : undefined, pluginVersion: versionMatch ? `${versionMatch[1]}.${versionMatch[2]}.${versionMatch[3]}` : undefined, endpointName: url.split('/').pop() }; };