@hot-updater/server 1.2.0-rc.50 → 1.2.0-rc.51
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/core/api.d.cts +9 -0
- package/dist/core/api.d.mts +9 -0
- package/dist/core/labels.cjs +317 -0
- package/dist/core/labels.mjs +310 -0
- package/dist/core/operations.cjs +38 -3
- package/dist/core/operations.mjs +38 -3
- package/dist/core/reads.cjs +25 -1
- package/dist/core/reads.mjs +26 -2
- package/dist/core/releases.cjs +44 -13
- package/dist/core/releases.mjs +44 -14
- package/dist/core/writes.cjs +10 -1
- package/dist/core/writes.mjs +10 -1
- package/dist/handlerAdminRoutes.cjs +34 -0
- package/dist/handlerAdminRoutes.mjs +34 -0
- package/dist/package.cjs +1 -1
- package/dist/package.mjs +1 -1
- package/package.json +6 -6
|
@@ -320,6 +320,30 @@ const createAdminRouteHandlers = () => ({
|
|
|
320
320
|
return row === null ? notFound() : json({ data: row });
|
|
321
321
|
}),
|
|
322
322
|
rebuildReleaseCatalog: onCore(async (core, _request, params) => json({ data: await core.rebuildReleaseCatalog(scopeKeyOf(params)) })),
|
|
323
|
+
/**
|
|
324
|
+
* The release a label names, or `null`: never 404, which tells a client
|
|
325
|
+
* the server has no such route.
|
|
326
|
+
*/
|
|
327
|
+
getReleaseByLabel: onCore(async (core, request) => {
|
|
328
|
+
const url = new URL(request.url);
|
|
329
|
+
const channel = url.searchParams.get("channel");
|
|
330
|
+
const platform = platformOf(url);
|
|
331
|
+
const label = Number(url.searchParams.get("label"));
|
|
332
|
+
if (channel === null || channel.length === 0 || platform === void 0 || !Number.isSafeInteger(label) || label < 1) throw new HandlerBadRequestError("A release label lookup takes channel, platform, and a label of 1 or more.");
|
|
333
|
+
return json({ data: await core.getReleaseByLabel({
|
|
334
|
+
channel,
|
|
335
|
+
platform,
|
|
336
|
+
label
|
|
337
|
+
}) });
|
|
338
|
+
}),
|
|
339
|
+
fillReleaseLabels: onCore(async (core, request) => {
|
|
340
|
+
const body = await request.json().catch(() => ({}));
|
|
341
|
+
const input = body !== null && typeof body === "object" ? body : {};
|
|
342
|
+
return json({ data: await core.fillReleaseLabels({
|
|
343
|
+
dryRun: input.dryRun === true,
|
|
344
|
+
catalogs: input.catalogs !== false
|
|
345
|
+
}) });
|
|
346
|
+
}),
|
|
323
347
|
updateBundle: onCore(async (core, request, params) => {
|
|
324
348
|
const bundleId = requireRouteParam(params, "id");
|
|
325
349
|
const update = bundleUpdateOf(await request.json(), bundleId);
|
|
@@ -547,6 +571,16 @@ const ADMIN_ROUTES = [
|
|
|
547
571
|
path: "/release-scopes",
|
|
548
572
|
handler: "listReleaseScopeKeys"
|
|
549
573
|
},
|
|
574
|
+
{
|
|
575
|
+
method: "GET",
|
|
576
|
+
path: "/release-labels",
|
|
577
|
+
handler: "getReleaseByLabel"
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
method: "POST",
|
|
581
|
+
path: "/release-labels/fill",
|
|
582
|
+
handler: "fillReleaseLabels"
|
|
583
|
+
},
|
|
550
584
|
{
|
|
551
585
|
method: "POST",
|
|
552
586
|
path: "/release-catalogs/:scopeKey/rebuild",
|
package/dist/package.cjs
CHANGED
package/dist/package.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/server",
|
|
3
|
-
"version": "1.2.0-rc.
|
|
3
|
+
"version": "1.2.0-rc.51",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -50,11 +50,11 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"rou3": "0.7.9",
|
|
52
52
|
"verkit": "0.4.0",
|
|
53
|
-
"@hot-updater/
|
|
54
|
-
"@hot-updater/plugin-api-keys": "1.2.0-rc.
|
|
55
|
-
"@hot-updater/plugin-
|
|
56
|
-
"@hot-updater/plugin-
|
|
57
|
-
"@hot-updater/
|
|
53
|
+
"@hot-updater/protocol": "1.2.0-rc.51",
|
|
54
|
+
"@hot-updater/plugin-api-keys": "1.2.0-rc.51",
|
|
55
|
+
"@hot-updater/plugin-insights": "1.2.0-rc.51",
|
|
56
|
+
"@hot-updater/plugin-remote-config": "1.2.0-rc.51",
|
|
57
|
+
"@hot-updater/plugin-core": "1.2.0-rc.51"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"@prisma/client": "*",
|