1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-27 23:28:38 +02:00

Tools: Various improvements on plugin-repo-cli

This commit is contained in:
Laurent Cozic
2021-01-21 00:12:59 +00:00
parent f37d37e613
commit f9b0e2f6df
13 changed files with 539 additions and 3286 deletions

View File

@ -1,5 +1,7 @@
export default function(id: string): void {
if (!id) throw new Error('ID cannot be empty');
// Allow a few exceptions that existed before the limit was added
if (id.length < 16 && !['Outline', 'outline', 'MyPlugin'].includes(id)) throw new Error('ID cannot be shorter than 16 characters');
if (id.length > 256) throw new Error('ID cannot be longer than 256 characters');
const whitelist = '0-9a-zA-Z._-';