@hot-updater/standalone 1.0.0-rc.42 → 1.0.0-rc.44

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/index.cjs CHANGED
@@ -109,6 +109,7 @@ const createStandaloneCoreApi = (config) => {
109
109
  const body = response.status === 404 ? {} : await http.parseJson(response);
110
110
  const protocol = isRecord(body) ? body.adminProtocol : void 0;
111
111
  if (typeof protocol !== "number" || protocol < 2) throw new StandaloneDatabaseError("request-failed", `The server at ${config.baseUrl} speaks admin API protocol ${typeof protocol === "number" ? protocol : 1}, and this CLI needs 2. Upgrade @hot-updater/server on the server.`, response.status);
112
+ if (!isRecord(body) || !Array.isArray(body.plugins)) throw new StandaloneDatabaseError("request-failed", `The server at ${config.baseUrl} answered /version as its client mount, without the plugins list of handlers.admin. Set baseUrl to the path where the server mounts handlers.admin, such as https://example.com/hot-updater/admin.`, response.status);
112
113
  };
113
114
  /** One admin request's JSON body, or null for 204 and for a GET that finds nothing; `/version` is checked once before the first. */
114
115
  const request = async (method, path, { query = {}, body } = {}) => {
package/dist/index.mjs CHANGED
@@ -108,6 +108,7 @@ const createStandaloneCoreApi = (config) => {
108
108
  const body = response.status === 404 ? {} : await http.parseJson(response);
109
109
  const protocol = isRecord(body) ? body.adminProtocol : void 0;
110
110
  if (typeof protocol !== "number" || protocol < 2) throw new StandaloneDatabaseError("request-failed", `The server at ${config.baseUrl} speaks admin API protocol ${typeof protocol === "number" ? protocol : 1}, and this CLI needs 2. Upgrade @hot-updater/server on the server.`, response.status);
111
+ if (!isRecord(body) || !Array.isArray(body.plugins)) throw new StandaloneDatabaseError("request-failed", `The server at ${config.baseUrl} answered /version as its client mount, without the plugins list of handlers.admin. Set baseUrl to the path where the server mounts handlers.admin, such as https://example.com/hot-updater/admin.`, response.status);
111
112
  };
112
113
  /** One admin request's JSON body, or null for 204 and for a GET that finds nothing; `/version` is checked once before the first. */
113
114
  const request = async (method, path, { query = {}, body } = {}) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hot-updater/standalone",
3
- "version": "1.0.0-rc.42",
3
+ "version": "1.0.0-rc.44",
4
4
  "type": "module",
5
5
  "description": "React Native OTA solution for self-hosted",
6
6
  "sideEffects": false,
@@ -42,8 +42,8 @@
42
42
  "access": "public"
43
43
  },
44
44
  "dependencies": {
45
- "@hot-updater/protocol": "1.0.0-rc.42",
46
- "@hot-updater/plugin-core": "1.0.0-rc.42"
45
+ "@hot-updater/protocol": "1.0.0-rc.44",
46
+ "@hot-updater/plugin-core": "1.0.0-rc.44"
47
47
  },
48
48
  "devDependencies": {
49
49
  "mime": "2.6.0",
@@ -52,7 +52,7 @@
52
52
  "msw": "^2.7.0",
53
53
  "verkit": "0.4.0",
54
54
  "vitest": "4.1.4",
55
- "@hot-updater/test-utils": "1.0.0-rc.42"
55
+ "@hot-updater/test-utils": "1.0.0-rc.44"
56
56
  },
57
57
  "nx": {
58
58
  "implicitDependencies": [