@bridgething/catalog 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/dist/blend.d.ts +17 -0
- package/dist/blend.d.ts.map +1 -0
- package/dist/blend.js +27 -0
- package/dist/blend.js.map +1 -0
- package/dist/generated/schema.v1.validator.d.mts +6 -0
- package/dist/generated/schema.v1.validator.mjs +1436 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/resolve.d.ts +55 -0
- package/dist/resolve.d.ts.map +1 -0
- package/dist/resolve.js +142 -0
- package/dist/resolve.js.map +1 -0
- package/dist/sources.d.ts +45 -0
- package/dist/sources.d.ts.map +1 -0
- package/dist/sources.js +95 -0
- package/dist/sources.js.map +1 -0
- package/dist/types.d.ts +55 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/validate.d.ts +9 -0
- package/dist/validate.d.ts.map +1 -0
- package/dist/validate.js +57 -0
- package/dist/validate.js.map +1 -0
- package/dist/versions.d.ts +5 -0
- package/dist/versions.d.ts.map +1 -0
- package/dist/versions.js +19 -0
- package/dist/versions.js.map +1 -0
- package/package.json +30 -0
- package/schema.v1.json +236 -0
package/schema.v1.json
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://apps.bridgething.com/schemas/catalog/v1.json",
|
|
4
|
+
"title": "bridgething App Catalog",
|
|
5
|
+
"description": "A federated catalog of installable webapps for a bridgething-flashed Spotify Car Thing. Served at any source URL; the companion aggregates entries across subscribed sources.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schema", "updated_at", "repo", "apps", "recommended_sources"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"format": "uri",
|
|
13
|
+
"description": "Optional pointer to this schema. Editors auto-validate when present."
|
|
14
|
+
},
|
|
15
|
+
"schema": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"const": "catalog.v1",
|
|
18
|
+
"description": "Schema discriminant. Consumers MUST refuse a catalog whose schema they do not implement."
|
|
19
|
+
},
|
|
20
|
+
"updated_at": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"format": "date-time",
|
|
23
|
+
"description": "ISO 8601 UTC timestamp of when this catalog was last regenerated."
|
|
24
|
+
},
|
|
25
|
+
"repo": {
|
|
26
|
+
"$ref": "#/$defs/Repo"
|
|
27
|
+
},
|
|
28
|
+
"apps": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": {
|
|
31
|
+
"$ref": "#/$defs/AppEntry"
|
|
32
|
+
},
|
|
33
|
+
"description": "Installable webapps offered by this source."
|
|
34
|
+
},
|
|
35
|
+
"recommended_sources": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": {
|
|
38
|
+
"$ref": "#/$defs/RecommendedSource"
|
|
39
|
+
},
|
|
40
|
+
"description": "Other catalog sources this source suggests adding. Empty on most sources; the official catalog populates it as a quick-add list plus the attestation lever."
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"$defs": {
|
|
44
|
+
"Uuid": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"format": "uuid",
|
|
47
|
+
"description": "Stable webapp identity. Drives upgrade-in-place and the KV namespace on the device, so it MUST NOT change across versions."
|
|
48
|
+
},
|
|
49
|
+
"Version": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"pattern": "^[A-Za-z0-9](?:[A-Za-z0-9.+\\-]*[A-Za-z0-9])?$",
|
|
52
|
+
"minLength": 1,
|
|
53
|
+
"maxLength": 100,
|
|
54
|
+
"description": "Opaque webapp version identifier. Semver is recommended but not enforced."
|
|
55
|
+
},
|
|
56
|
+
"Semver": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:[.+\\-][0-9A-Za-z.\\-]+)?$",
|
|
59
|
+
"description": "Dotted semver, no leading 'v'. The device's libbridgething_version is reported v-prefixed on the wire; the companion strips the prefix before comparing."
|
|
60
|
+
},
|
|
61
|
+
"Sha256": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"pattern": "^[a-f0-9]{64}$",
|
|
64
|
+
"description": "Lowercase hex SHA-256 digest of the artifact bytes. Integrity, not authenticity."
|
|
65
|
+
},
|
|
66
|
+
"Repo": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"additionalProperties": false,
|
|
69
|
+
"required": ["name", "description", "homepage", "icon"],
|
|
70
|
+
"properties": {
|
|
71
|
+
"name": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"minLength": 1,
|
|
74
|
+
"maxLength": 100,
|
|
75
|
+
"description": "Display name of this catalog source."
|
|
76
|
+
},
|
|
77
|
+
"description": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"minLength": 1,
|
|
80
|
+
"maxLength": 300
|
|
81
|
+
},
|
|
82
|
+
"homepage": {
|
|
83
|
+
"type": ["string", "null"],
|
|
84
|
+
"format": "uri"
|
|
85
|
+
},
|
|
86
|
+
"icon": {
|
|
87
|
+
"type": ["string", "null"],
|
|
88
|
+
"format": "uri",
|
|
89
|
+
"description": "Square source icon for the companion's source list."
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"AppEntry": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"additionalProperties": false,
|
|
96
|
+
"required": ["id", "name", "description", "author", "icon", "homepage", "source", "versions"],
|
|
97
|
+
"properties": {
|
|
98
|
+
"id": {
|
|
99
|
+
"$ref": "#/$defs/Uuid"
|
|
100
|
+
},
|
|
101
|
+
"name": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"minLength": 1,
|
|
104
|
+
"maxLength": 100,
|
|
105
|
+
"description": "Display name."
|
|
106
|
+
},
|
|
107
|
+
"description": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"minLength": 1,
|
|
110
|
+
"maxLength": 300,
|
|
111
|
+
"description": "One-line tagline for store cards."
|
|
112
|
+
},
|
|
113
|
+
"author": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"minLength": 1,
|
|
116
|
+
"maxLength": 100
|
|
117
|
+
},
|
|
118
|
+
"icon": {
|
|
119
|
+
"type": ["string", "null"],
|
|
120
|
+
"format": "uri",
|
|
121
|
+
"description": "Hosted square icon. The publish step extracts the bundle's icon and uploads it; null until then."
|
|
122
|
+
},
|
|
123
|
+
"homepage": {
|
|
124
|
+
"type": ["string", "null"],
|
|
125
|
+
"format": "uri"
|
|
126
|
+
},
|
|
127
|
+
"source": {
|
|
128
|
+
"type": ["string", "null"],
|
|
129
|
+
"format": "uri",
|
|
130
|
+
"description": "Repository or source URL, for users who want to check it themselves."
|
|
131
|
+
},
|
|
132
|
+
"versions": {
|
|
133
|
+
"type": "array",
|
|
134
|
+
"minItems": 1,
|
|
135
|
+
"items": {
|
|
136
|
+
"$ref": "#/$defs/AppVersion"
|
|
137
|
+
},
|
|
138
|
+
"description": "Published versions, newest-first. The companion installs the newest version compatible with the connected device."
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"AppVersion": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"additionalProperties": false,
|
|
145
|
+
"required": [
|
|
146
|
+
"version",
|
|
147
|
+
"released_at",
|
|
148
|
+
"download",
|
|
149
|
+
"permissions",
|
|
150
|
+
"min_libbridgething_version",
|
|
151
|
+
"changelog"
|
|
152
|
+
],
|
|
153
|
+
"properties": {
|
|
154
|
+
"version": {
|
|
155
|
+
"$ref": "#/$defs/Version"
|
|
156
|
+
},
|
|
157
|
+
"released_at": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"format": "date-time"
|
|
160
|
+
},
|
|
161
|
+
"download": {
|
|
162
|
+
"$ref": "#/$defs/Download"
|
|
163
|
+
},
|
|
164
|
+
"permissions": {
|
|
165
|
+
"type": "array",
|
|
166
|
+
"items": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"minLength": 1
|
|
169
|
+
},
|
|
170
|
+
"uniqueItems": true,
|
|
171
|
+
"description": "Permission catalog keys this version requests (net.fetch, geo, ...). Shown at install, informational, never a gate."
|
|
172
|
+
},
|
|
173
|
+
"role": {
|
|
174
|
+
"enum": ["standard", "launcher"],
|
|
175
|
+
"description": "Mirrors the bundle manifest's role. A launcher can take the device's launcher slot and replace the built-in hub. Absent means standard."
|
|
176
|
+
},
|
|
177
|
+
"provides_overlay": {
|
|
178
|
+
"type": "boolean",
|
|
179
|
+
"description": "Whether this version ships an overlay the device can inject over every webapp. Absent means it does not."
|
|
180
|
+
},
|
|
181
|
+
"min_libbridgething_version": {
|
|
182
|
+
"$ref": "#/$defs/Semver"
|
|
183
|
+
},
|
|
184
|
+
"changelog": {
|
|
185
|
+
"type": ["string", "null"],
|
|
186
|
+
"description": "Markdown changelog for this version."
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"Download": {
|
|
191
|
+
"type": "object",
|
|
192
|
+
"additionalProperties": false,
|
|
193
|
+
"required": ["url", "size", "sha256"],
|
|
194
|
+
"properties": {
|
|
195
|
+
"url": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"format": "uri",
|
|
198
|
+
"description": "Direct download URL for the webapp zip."
|
|
199
|
+
},
|
|
200
|
+
"size": {
|
|
201
|
+
"type": "integer",
|
|
202
|
+
"minimum": 0,
|
|
203
|
+
"description": "Size of the artifact in bytes."
|
|
204
|
+
},
|
|
205
|
+
"sha256": {
|
|
206
|
+
"$ref": "#/$defs/Sha256"
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"RecommendedSource": {
|
|
211
|
+
"type": "object",
|
|
212
|
+
"additionalProperties": false,
|
|
213
|
+
"required": ["name", "url", "description", "attested"],
|
|
214
|
+
"properties": {
|
|
215
|
+
"name": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"minLength": 1,
|
|
218
|
+
"maxLength": 100
|
|
219
|
+
},
|
|
220
|
+
"url": {
|
|
221
|
+
"type": "string",
|
|
222
|
+
"format": "uri",
|
|
223
|
+
"description": "A catalog.v1 manifest URL the companion can subscribe to."
|
|
224
|
+
},
|
|
225
|
+
"description": {
|
|
226
|
+
"type": ["string", "null"],
|
|
227
|
+
"maxLength": 300
|
|
228
|
+
},
|
|
229
|
+
"attested": {
|
|
230
|
+
"type": "boolean",
|
|
231
|
+
"description": "True if the publishing source vouches for this URL. Editorial signal, not a trust boundary."
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|