mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Validate plugin ID
This commit is contained in:
parent
8d4d438136
commit
7114228fd6
@ -1,4 +1,5 @@
|
||||
import { PluginManifest, PluginPermission } from './types';
|
||||
import validatePluginId from './validatePluginId';
|
||||
|
||||
export default function manifestFromObject(o: any): PluginManifest {
|
||||
|
||||
@ -28,9 +29,12 @@ export default function manifestFromObject(o: any): PluginManifest {
|
||||
author: getString('author', false),
|
||||
description: getString('description', false),
|
||||
homepage_url: getString('homepage_url', false),
|
||||
repository_url: getString('repository_url', false),
|
||||
permissions: permissions,
|
||||
};
|
||||
|
||||
validatePluginId(manifest.id);
|
||||
|
||||
if (o.permissions) {
|
||||
for (const p of o.permissions) {
|
||||
manifest.permissions.push(p);
|
||||
|
@ -11,6 +11,7 @@ export interface PluginManifest {
|
||||
author?: string;
|
||||
description?: string;
|
||||
homepage_url?: string;
|
||||
repository_url?: string;
|
||||
permissions?: PluginPermission[];
|
||||
|
||||
// Private keys
|
||||
|
Loading…
Reference in New Issue
Block a user