@cervio/plugin-core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/dist/index.cjs +549 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +424 -0
- package/dist/index.d.ts +424 -0
- package/dist/index.js +513 -0
- package/dist/index.js.map +1 -0
- package/manifest.schema.json +177 -0
- package/package.json +46 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://cervio.app/schemas/plugin-manifest.json",
|
|
4
|
+
"title": "Cervio Plugin Manifest",
|
|
5
|
+
"description": "Author-facing plugin manifest. The `version` field is ignored — Cervio assigns release versions.",
|
|
6
|
+
"$ref": "#/definitions/CervioPluginManifest",
|
|
7
|
+
"definitions": {
|
|
8
|
+
"CervioPluginManifest": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"plugin_key": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"pattern": "^[a-z0-9][a-z0-9-_]{1,62}$",
|
|
14
|
+
"description": "Stable plugin id. Prefer this over legacy `id`."
|
|
15
|
+
},
|
|
16
|
+
"id": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "Legacy alias for plugin_key (slashes become dashes)."
|
|
19
|
+
},
|
|
20
|
+
"plugin_name": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"name": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "Legacy alias for plugin_name."
|
|
26
|
+
},
|
|
27
|
+
"plugin_type": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": [
|
|
30
|
+
"task",
|
|
31
|
+
"form",
|
|
32
|
+
"task_form",
|
|
33
|
+
"route"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"kind": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "Legacy alias for plugin_type (task_widget→task, record_panel→form)."
|
|
39
|
+
},
|
|
40
|
+
"version": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"description": "Ignored by Cervio — the host assigns release versions."
|
|
43
|
+
},
|
|
44
|
+
"required_connection_capabilities": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"items": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"requiredConnectionCapabilities": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"items": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"connections": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"items": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"properties": {
|
|
61
|
+
"id": {
|
|
62
|
+
"type": "string"
|
|
63
|
+
},
|
|
64
|
+
"provider": {
|
|
65
|
+
"type": "string"
|
|
66
|
+
},
|
|
67
|
+
"scopes": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": {
|
|
70
|
+
"type": "string"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"allowed_apis": {
|
|
74
|
+
"type": "array",
|
|
75
|
+
"items": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"properties": {
|
|
78
|
+
"host": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
},
|
|
81
|
+
"methods": {
|
|
82
|
+
"type": "array",
|
|
83
|
+
"items": {
|
|
84
|
+
"type": "string"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"path_prefix": {
|
|
88
|
+
"type": "string"
|
|
89
|
+
},
|
|
90
|
+
"pathPrefix": {
|
|
91
|
+
"type": "string"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"required": [
|
|
95
|
+
"host",
|
|
96
|
+
"methods"
|
|
97
|
+
],
|
|
98
|
+
"additionalProperties": false
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"allowedApis": {
|
|
102
|
+
"type": "array",
|
|
103
|
+
"items": {}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"required": [
|
|
107
|
+
"id",
|
|
108
|
+
"provider",
|
|
109
|
+
"scopes"
|
|
110
|
+
],
|
|
111
|
+
"additionalProperties": false
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"entities": {
|
|
115
|
+
"type": "array",
|
|
116
|
+
"items": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"properties": {
|
|
119
|
+
"name": {
|
|
120
|
+
"type": "string"
|
|
121
|
+
},
|
|
122
|
+
"fields": {
|
|
123
|
+
"type": "array",
|
|
124
|
+
"items": {
|
|
125
|
+
"type": "string"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"forms": {
|
|
129
|
+
"type": "array",
|
|
130
|
+
"items": {
|
|
131
|
+
"type": "string"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"access": {
|
|
135
|
+
"type": "array",
|
|
136
|
+
"items": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"enum": [
|
|
139
|
+
"read",
|
|
140
|
+
"write"
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"required": [
|
|
146
|
+
"name"
|
|
147
|
+
],
|
|
148
|
+
"additionalProperties": false
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"cervio_apis": {
|
|
152
|
+
"type": "array",
|
|
153
|
+
"items": {
|
|
154
|
+
"type": "object",
|
|
155
|
+
"properties": {
|
|
156
|
+
"method": {
|
|
157
|
+
"type": "string"
|
|
158
|
+
},
|
|
159
|
+
"path_prefix": {
|
|
160
|
+
"type": "string"
|
|
161
|
+
},
|
|
162
|
+
"pathPrefix": {
|
|
163
|
+
"type": "string"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"additionalProperties": false
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"cervioApis": {
|
|
170
|
+
"type": "array",
|
|
171
|
+
"items": {}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"additionalProperties": true
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cervio/plugin-core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Shared Cervio plugin manifest validation, ZIP safety, content hash, and packing.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.cjs"
|
|
13
|
+
},
|
|
14
|
+
"./manifest.schema.json": "./manifest.schema.json"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"manifest.schema.json",
|
|
19
|
+
"README.md"
|
|
20
|
+
],
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"jszip": "^3.10.1",
|
|
23
|
+
"zod": "^3.25.76",
|
|
24
|
+
"zod-to-json-schema": "^3.24.6"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/node": "^22.15.0",
|
|
28
|
+
"tsup": "^8.5.0",
|
|
29
|
+
"typescript": "^5.8.3",
|
|
30
|
+
"vitest": "^3.2.4"
|
|
31
|
+
},
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"license": "UNLICENSED",
|
|
36
|
+
"keywords": [
|
|
37
|
+
"cervio",
|
|
38
|
+
"plugin"
|
|
39
|
+
],
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "tsup --config tsup.config.ts && node scripts/emit-manifest-schema.mjs",
|
|
42
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
43
|
+
"test": "vitest run",
|
|
44
|
+
"emit-schema": "node scripts/emit-manifest-schema.mjs"
|
|
45
|
+
}
|
|
46
|
+
}
|