@fresh-editor/fresh-editor 0.1.88 → 0.1.93

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.
@@ -0,0 +1,192 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/sinelaw/fresh/main/crates/fresh-editor/plugins/schemas/package.schema.json",
4
+ "title": "Fresh Package Manifest",
5
+ "description": "Schema for Fresh plugin and theme package.json files",
6
+ "type": "object",
7
+ "required": ["name", "version", "description", "type"],
8
+ "properties": {
9
+ "name": {
10
+ "type": "string",
11
+ "pattern": "^[a-z0-9-]+$",
12
+ "description": "Package name (lowercase, hyphens allowed)"
13
+ },
14
+ "version": {
15
+ "type": "string",
16
+ "pattern": "^\\d+\\.\\d+\\.\\d+",
17
+ "description": "Semantic version (e.g., 1.0.0)"
18
+ },
19
+ "description": {
20
+ "type": "string",
21
+ "description": "Short package description"
22
+ },
23
+ "type": {
24
+ "type": "string",
25
+ "enum": ["plugin", "theme", "theme-pack", "language"],
26
+ "description": "Package type"
27
+ },
28
+ "author": {
29
+ "type": "string",
30
+ "description": "Author name and optional email (e.g., 'Name <email>')"
31
+ },
32
+ "license": {
33
+ "type": "string",
34
+ "description": "SPDX license identifier"
35
+ },
36
+ "repository": {
37
+ "type": "string",
38
+ "format": "uri",
39
+ "description": "Git repository URL"
40
+ },
41
+ "keywords": {
42
+ "type": "array",
43
+ "items": { "type": "string" },
44
+ "description": "Search keywords"
45
+ },
46
+ "fresh": {
47
+ "type": "object",
48
+ "description": "Fresh-specific configuration",
49
+ "properties": {
50
+ "min_version": {
51
+ "type": "string",
52
+ "pattern": "^\\d+\\.\\d+\\.\\d+",
53
+ "description": "Minimum required Fresh version"
54
+ },
55
+ "entry": {
56
+ "type": "string",
57
+ "description": "Plugin entry point file (for plugins)"
58
+ },
59
+ "themes": {
60
+ "type": "array",
61
+ "description": "Theme definitions (for theme packs)",
62
+ "items": {
63
+ "type": "object",
64
+ "required": ["file", "name"],
65
+ "properties": {
66
+ "file": {
67
+ "type": "string",
68
+ "description": "Theme JSON file path"
69
+ },
70
+ "name": {
71
+ "type": "string",
72
+ "description": "Display name for the theme"
73
+ },
74
+ "variant": {
75
+ "type": "string",
76
+ "enum": ["dark", "light"],
77
+ "description": "Theme variant (dark or light)"
78
+ }
79
+ }
80
+ }
81
+ },
82
+ "config_schema": {
83
+ "type": "object",
84
+ "description": "JSON Schema for plugin configuration options"
85
+ },
86
+ "main": {
87
+ "type": "string",
88
+ "description": "Plugin entry point file (alias for entry)"
89
+ },
90
+ "theme": {
91
+ "type": "string",
92
+ "description": "Theme JSON file path (for single theme packages)"
93
+ },
94
+ "grammar": {
95
+ "type": "object",
96
+ "description": "Grammar configuration (for language packs)",
97
+ "required": ["file"],
98
+ "properties": {
99
+ "file": {
100
+ "type": "string",
101
+ "description": "Path to TextMate grammar file (.tmLanguage.json)"
102
+ },
103
+ "extensions": {
104
+ "type": "array",
105
+ "items": { "type": "string" },
106
+ "description": "File extensions this grammar handles (e.g., [\"rs\", \"rust\"])"
107
+ },
108
+ "firstLine": {
109
+ "type": "string",
110
+ "description": "Regex pattern for shebang detection"
111
+ }
112
+ }
113
+ },
114
+ "language": {
115
+ "type": "object",
116
+ "description": "Language configuration (for language packs)",
117
+ "properties": {
118
+ "commentPrefix": {
119
+ "type": "string",
120
+ "description": "Line comment prefix (e.g., \"//\" or \"#\")"
121
+ },
122
+ "blockCommentStart": {
123
+ "type": "string",
124
+ "description": "Block comment start marker (e.g., \"/*\")"
125
+ },
126
+ "blockCommentEnd": {
127
+ "type": "string",
128
+ "description": "Block comment end marker (e.g., \"*/\")"
129
+ },
130
+ "tabSize": {
131
+ "type": "integer",
132
+ "minimum": 1,
133
+ "description": "Default tab size for this language"
134
+ },
135
+ "useTabs": {
136
+ "type": "boolean",
137
+ "description": "Use tabs instead of spaces"
138
+ },
139
+ "autoIndent": {
140
+ "type": "boolean",
141
+ "description": "Enable automatic indentation"
142
+ },
143
+ "formatter": {
144
+ "type": "object",
145
+ "required": ["command"],
146
+ "properties": {
147
+ "command": {
148
+ "type": "string",
149
+ "description": "Formatter command (e.g., \"rustfmt\")"
150
+ },
151
+ "args": {
152
+ "type": "array",
153
+ "items": { "type": "string" },
154
+ "description": "Arguments to pass to the formatter"
155
+ }
156
+ }
157
+ }
158
+ }
159
+ },
160
+ "lsp": {
161
+ "type": "object",
162
+ "description": "LSP server configuration (for language packs)",
163
+ "required": ["command"],
164
+ "properties": {
165
+ "command": {
166
+ "type": "string",
167
+ "description": "LSP server command"
168
+ },
169
+ "args": {
170
+ "type": "array",
171
+ "items": { "type": "string" },
172
+ "description": "Arguments to pass to the server"
173
+ },
174
+ "autoStart": {
175
+ "type": "boolean",
176
+ "description": "Auto-start the server when a matching file is opened"
177
+ },
178
+ "initializationOptions": {
179
+ "type": "object",
180
+ "description": "LSP initialization options"
181
+ }
182
+ }
183
+ }
184
+ }
185
+ },
186
+ "dependencies": {
187
+ "type": "object",
188
+ "description": "Package dependencies (reserved for future use)",
189
+ "additionalProperties": { "type": "string" }
190
+ }
191
+ }
192
+ }