Skip to content

Commit ef04b75

Browse files
Copilothotlong
andcommitted
feat: Add PluginDefinition and field types to complete spec
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 33d6d8d commit ef04b75

2 files changed

Lines changed: 27 additions & 7 deletions

File tree

packages/foundation/core/tsconfig.json

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
{
2-
"extends": "../../../tsconfig.base.json",
32
"compilerOptions": {
4-
"outDir": "dist",
5-
"rootDir": "src"
3+
"target": "ES2019",
4+
"module": "commonjs",
5+
"moduleResolution": "node",
6+
"declaration": true,
7+
"declarationMap": true,
8+
"composite": true,
9+
"outDir": "./dist",
10+
"rootDir": "./src",
11+
"strict": true,
12+
"esModuleInterop": true,
13+
"skipLibCheck": true,
14+
"forceConsistentCasingInFileNames": true
615
},
716
"include": ["src/**/*"],
8-
"exclude": [
9-
"node_modules",
10-
"dist"
11-
],
17+
"exclude": ["node_modules", "dist"],
1218
"references": [
1319
{ "path": "../types" },
1420
{ "path": "../plugin-validator" },

packages/foundation/spec/src/index.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export namespace Data {
2525
| 'text'
2626
| 'textarea'
2727
| 'html'
28+
| 'markdown'
2829
| 'number'
2930
| 'currency'
3031
| 'percent'
@@ -39,6 +40,7 @@ export namespace Data {
3940
| 'email'
4041
| 'url'
4142
| 'phone'
43+
| 'password'
4244
| 'image'
4345
| 'file'
4446
| 'location'
@@ -166,6 +168,18 @@ export namespace UI {
166168
* System namespace - System-level interfaces
167169
*/
168170
export namespace System {
171+
/**
172+
* Plugin Definition
173+
*/
174+
export interface PluginDefinition {
175+
id?: string;
176+
name: string;
177+
version?: string;
178+
onEnable?(context: any): void | Promise<void>;
179+
onDisable?(context: any): void | Promise<void>;
180+
[key: string]: any;
181+
}
182+
169183
/**
170184
* Driver Interface
171185
*/

0 commit comments

Comments
 (0)