GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — harper/config-app.schema.json at main · HarperFast/harper

Expand file tree

/

config-app.schema.json

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
324 lines (324 loc) · 11.2 KB
/

config-app.schema.json

Copy path

File metadata and controls

324 lines (324 loc) · 11.2 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
{
"$schema": "https://json-schema.org/draft-06/schema",
"$id": "https://harper.fast/schema/config.schema.json",
"type": "object",
"properties": {
"rest": {
"description": "Enable REST API endpoints and configure request handling.",
"oneOf": [
{ "type": "boolean" },
{
"type": "object",
"properties": {
"preconditions": {
"type": "boolean",
"default": true,
"description": "Handle HTTP request preconditions. Set false for applications that implement their own conditional request handling."
},
"preconditionLocks": {
"type": "boolean",
"default": true,
"description": "Acquire default-scope record locks for conditional single-record PUT, PATCH and DELETE on RocksDB before evaluating the precondition once against the locked record: conditional requests are checked one at a time, cluster-wide when cluster record locks are enabled (within the freshness the record lock guarantees) and node-local on a node with no replication configured; on harper-pro without replication.recordLocks enabled, a replicated table gets the best-effort pre-check described below instead. Unconditional writes are not gated and still resolve last-write-wins. Set false to opt out into a best-effort single pre-check without locking (also used on LMDB, which has no record lock). Preconditions are never re-evaluated on commit retries."
},
"lastModified": {
"type": "boolean",
"description": "Include Last-Modified response headers for versioned records."
}
}
}
]
},
"graphqlSchema": {
"type": "object",
"description": "GraphQL schema configuration.",
"additionalProperties": false,
"properties": {
"files": {
"description": "Glob(s) or path(s) to GraphQL schema files.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"required": ["files"]
},
"jsResource": {
"type": "object",
"description": "JavaScript resource(s) configuration.",
"additionalProperties": false,
"properties": {
"files": {
"description": "Path(s) to JS resource file(s).",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"required": ["files"]
},
"static": {
"type": "object",
"description": "Static file serving configuration.",
"additionalProperties": false,
"properties": {
"files": {
"description": "Glob(s) or path(s) to the files to serve.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"urlPath": {
"type": "string",
"description": "URL path prefix the files are served under."
},
"index": {
"type": "boolean",
"description": "Serve index.html files for directory requests.",
"default": true
},
"extensions": {
"type": "array",
"items": {
"type": "string"
},
"description": "File extensions to try appending when a requested path is not found (e.g. ['html'] serves /page.html for /page)."
},
"fallthrough": {
"type": "boolean",
"description": "Pass unmatched requests to the next handler. When false, this handler answers unmatched GETs itself — note it runs before the REST handler by default, so also set `after: 'rest'` if the application serves an API.",
"default": true
},
"notFound": {
"description": "File to serve when a path is not found (requires `fallthrough: false`). Either a path, or an object with `file` and `statusCode` (e.g. index.html with 200 for history-mode SPAs — combine with `after: 'rest'`).",
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"file": {
"type": "string"
},
"statusCode": {
"type": "number"
}
},
"required": ["file", "statusCode"]
}
]
},
"before": {
"description": "Run this handler before the named handler (the config key as registered, e.g. 'rest'). Defaults to 'authentication' so file requests skip credential parsing; false clears the default so registration order applies.",
"oneOf": [
{
"type": "string",
"minLength": 1
},
{
"const": false
}
]
},
"after": {
"type": "string",
"minLength": 1,
"description": "Run this handler after the named handler (the config key as registered, e.g. 'rest' to let API routes match before static fallbacks). Overrides the default `before: 'authentication'` hoist."
}
},
"required": ["files"]
},
"scheduler": {
"type": "object",
"description": "Recurring job scheduling. Jobs run once per cluster (leader-elected) and invoke a designated export from this component. Handlers should be idempotent: leadership failover and DST fall-back can occasionally deliver the same occurrence twice.",
"additionalProperties": false,
"properties": {
"jobs": {
"type": "array",
"description": "The jobs to run on a schedule.",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "Unique (within this component) name for the job."
},
"cron": {
"type": "string",
"description": "Five-field cron expression (minute hour day-of-month month day-of-week), e.g. '0 2 * * *'. Supports lists, ranges, steps, month/day names, and @daily-style macros. Always QUOTE the expression: YAML treats a leading '*' as an alias and '@' as reserved. Exactly one of cron or interval is required."
},
"interval": {
"description": "Simple cadence instead of cron: a duration like 90s, 5m, 1h, 1d (or a number of seconds). Between 1 second and 365 days.",
"oneOf": [
{
"type": "string",
"pattern": "^\\d+(\\.\\d+)?[smhd]?$"
},
{
"type": "number",
"minimum": 1
}
]
},
"timezone": {
"type": "string",
"description": "IANA timezone the cron expression is evaluated in (e.g. America/New_York). Defaults to the server timezone. Only valid with cron."
},
"handler": {
"type": "string",
"description": "Module path and named export to invoke, relative to the component directory: './jobs.ts#myExport' (omit '#...' to use the default export). Do not put a space before '#' — YAML would treat the rest as a comment."
}
},
"required": ["name", "handler"],
"oneOf": [
{
"required": ["cron"],
"not": {
"required": ["interval"]
}
},
{
"required": ["interval"],
"not": {
"anyOf": [
{
"required": ["cron"]
},
{
"required": ["timezone"]
}
]
}
}
]
}
}
},
"required": ["jobs"]
},
"package": {
"type": "string",
"description": "Package identifier for the application (npm-compatible or git URL)."
},
"loadComponent": {
"type": "string",
"description": "Conditional package loading option.",
"enum": ["always", "if-installed", "dev-only"],
"default": "always"
},
"studio": {
"type": "object",
"description": "What this component adds to Harper Studio for the cluster it is deployed to, returned to every authenticated role by get_studio_configuration. An invalid page is dropped with a logged warning; the component still loads.",
"properties": {
"navigation": {
"type": "object",
"description": "How Studio shows built-in tabs and the pages of the plugins this component loads. A bare key is a built-in tab; a dotted key is relative to this component, <key>.<pageId> for a plugin's page. The root config beats an application, an application beats its plugins, and between peers the most visible state wins.",
"propertyNames": {
"maxLength": 128,
"pattern": "^(?:[a-z0-9-]+|[A-Za-z0-9_@-][A-Za-z0-9_@/.-]*\\.[a-z0-9-]{1,64})$"
},
"additionalProperties": { "enum": ["visible", "tucked", "hidden"] }
},
"pages": {
"type": "array",
"items": {
"type": "object",
"required": ["id", "name", "placement"],
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z0-9-]{1,64}$",
"description": "Unique within the component; Studio addresses the page as <component>.<id>, for a plugin's page <application>.<key>.<id>."
},
"name": { "type": "string", "minLength": 1 },
"icon": { "type": "string", "description": "A Lucide icon name." },
"placement": {
"enum": ["tab", "config"],
"description": "tab: a top Studio tab; config: an entry in the Config page menu."
},
"description": { "type": "string" },
"navigation": {
"enum": ["visible", "tucked", "hidden"],
"description": "How Studio shows this page unless the studio.navigation of a component that loads this one, or the root config, names it."
},
"access": {
"type": "object",
"description": "Who Studio shows the page to, evaluated by Studio against the viewer's role. Not a server permission. Like content, Harper returns it unvalidated to every signed-in role.",
"properties": {
"role": { "enum": ["super_user", "structure_user"] },
"tables": {
"type": "array",
"items": {
"type": "object",
"properties": {
"database": { "type": "string" },
"table": { "type": "string" },
"actions": { "type": "array", "items": { "type": "string" } }
}
}
},
"operations": { "type": "array", "items": { "type": "string" } },
"optional": {
"type": "object",
"description": "Declared but not required to see the page: controls that need one appear only for roles that hold it.",
"properties": {
"tables": {
"$ref": "#/properties/studio/properties/pages/items/properties/access/properties/tables"
},
"operations": {
"$ref": "#/properties/studio/properties/pages/items/properties/access/properties/operations"
}
}
}
}
},
"content": {
"type": "object",
"description": "The page's content, rendered and validated by Studio. Harper never validates or strips content or access; future markers such as capability requirements (content.requires: string[], absent means the 5.4 baseline), app context and placement refinements go inside content, not as new page-level keys (5.4 strips unknown page keys). Declarations are returned to every signed-in role, so they must hold no secrets or option values."
}
}
}
}
}
}
},
"additionalProperties": true,
"examples": [
{
"rest": true,
"graphqlSchema": {
"files": "*.graphql"
},
"jsResource": {
"files": "resources.js"
}
}
]
}
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.