add schemas for repos and plugins
This commit is contained in:
parent
9a2142688b
commit
906dfa7c34
@ -1,3 +1,4 @@
|
||||
/src/
|
||||
/schema/
|
||||
/tsconfig.json
|
||||
/tslint.json
|
||||
/tslint.json
|
||||
|
@ -3,6 +3,7 @@
|
||||
"version": "3.3.4",
|
||||
"description": "Squeebot v3 core for the execution environment",
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
"module": "lib/",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
|
47
schema/plugin.schema.json
Normal file
47
schema/plugin.schema.json
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://squeebot.lunasqu.ee/pkg/plugin.schema.json",
|
||||
"title": "plugin",
|
||||
"description": "Squeebot plugin definition",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"main": {
|
||||
"type": "string",
|
||||
"description": "Plugin's entry file, must export a class that extends Plugin"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Name of the plugin"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"description": "A short description of the plugin's functions"
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"description": "A list of descriptive tags",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "Semantic version(ing)"
|
||||
},
|
||||
"dependencies": {
|
||||
"type": "array",
|
||||
"description": "A list of plugin dependencies. ? suffix denotes optional.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"npmDependencies": {
|
||||
"type": "array",
|
||||
"description": "A list of NPM dependencies, package@version format",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["main", "name", "version"]
|
||||
}
|
38
schema/repository.schema.json
Normal file
38
schema/repository.schema.json
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://squeebot.lunasqu.ee/pkg/repository.schema.json",
|
||||
"title": "repository",
|
||||
"description": "Squeebot repository definition",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created": {
|
||||
"type": "integer",
|
||||
"description": "When was the repository last built"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Name of the repository"
|
||||
},
|
||||
"plugins": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Name of the plugin"
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "Plugin version"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
"type": "boolean",
|
||||
"description": "Is TypeScript enabled?"
|
||||
}
|
||||
},
|
||||
"required": ["name", "plugins"]
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
export * from './channel';
|
||||
export * from './common';
|
||||
export * from './core';
|
||||
export * from './npm';
|
||||
export * from './plugin';
|
||||
export * from './types';
|
||||
export * from './util';
|
Loading…
Reference in New Issue
Block a user