Skip to content

Commit

Permalink
Merge pull request #24 from yoshikinoko/console-update-v2
Browse files Browse the repository at this point in the history
Console update v2
  • Loading branch information
kerrishotts authored Oct 14, 2019
2 parents 90dd2fa + b24c9cf commit 448d198
Show file tree
Hide file tree
Showing 4 changed files with 239 additions and 1,905 deletions.
90 changes: 90 additions & 0 deletions lib/manifestSchema.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
const manifestScema = {
required: ["id", "name", "version", "host", "uiEntryPoints"],
properties: {
id: {
type: "string",
pattern: "(\\l|\\w|\\d){8}"
},
name: {
type: "string",
minLength: 3,
maxLength: 45
},
version: {
type: "string",
pattern: "^[1-9]?[0-9].[1-9]?[0-9].[1-9]?[0-9]$"
},
icons: {
type: "array",
maxItems: 2,
minItems: 2,
uniqueItems: true,
items: {
required: ["path", "width", "height"],
properties: {
path: {
type: "string"
},
width: {
type: "integer",
enum: [24, 48]
},
height: {
type: "integer",
enum: [24, 48]
}
}
}
},
host: {
type: "object",
required: ["app", "minVersion"],
properties: {
app: {
type: "string",
enum: ["XD"]
},
minVersion: {
type: "string",
pattern: "^([1-9][0-9]+|[0-9])\.([0-9]+[1-9]|[0-9])$"
},
maxVersion: {
type: "string",
pattern: "^([1-9][0-9]+|[0-9])\.([0-9]+[1-9]|[0-9])$"
}
}
},
uiEntryPoints: {
type: "array",
minItems: 1,
uniqueItems: true,
items: {
required: ["type", "label"],
properties: {
type: {
type: "string",
enum: ["menu", "panel"]
},
label: {
type: ["string", "object"]
},
commandId: {
type: "string"
},
panelId: {
type: "string"
},
shortcut: {
type: "object",
properties: {
mac: { type: "string" },
win: { type: "string" }
}
}
}
}
}
}
};

module.exports = manifestScema;
Loading

0 comments on commit 448d198

Please sign in to comment.