@hot-updater/standalone 1.0.0-rc.45 → 1.0.0-rc.46

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
@@ -108,7 +108,7 @@ const createStandaloneCoreApi = (config) => {
108
108
  const response = await fetch(http.buildUrl("/version"), { headers: http.headers({ "Cache-Control": "no-cache" }) });
109
109
  const body = response.status === 404 ? {} : await http.parseJson(response);
110
110
  const protocol = isRecord(body) ? body.adminProtocol : void 0;
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);
111
+ if (typeof protocol !== "number" || protocol < 2) throw new StandaloneDatabaseError("request-failed", `The server at ${config.baseUrl} does not report Hot Updater admin API protocol 2 at /version. Set baseUrl to the path where the server mounts handlers.admin, such as https://example.com/hot-updater/admin.`, response.status);
112
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);
113
113
  };
114
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. */
package/dist/index.mjs CHANGED
@@ -107,7 +107,7 @@ const createStandaloneCoreApi = (config) => {
107
107
  const response = await fetch(http.buildUrl("/version"), { headers: http.headers({ "Cache-Control": "no-cache" }) });
108
108
  const body = response.status === 404 ? {} : await http.parseJson(response);
109
109
  const protocol = isRecord(body) ? body.adminProtocol : void 0;
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);
110
+ if (typeof protocol !== "number" || protocol < 2) throw new StandaloneDatabaseError("request-failed", `The server at ${config.baseUrl} does not report Hot Updater admin API protocol 2 at /version. Set baseUrl to the path where the server mounts handlers.admin, such as https://example.com/hot-updater/admin.`, response.status);
111
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);
112
112
  };
113
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. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hot-updater/standalone",
3
- "version": "1.0.0-rc.45",
3
+ "version": "1.0.0-rc.46",
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/plugin-core": "1.0.0-rc.45",
46
- "@hot-updater/protocol": "1.0.0-rc.45"
45
+ "@hot-updater/protocol": "1.0.0-rc.46",
46
+ "@hot-updater/plugin-core": "1.0.0-rc.46"
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.45"
55
+ "@hot-updater/test-utils": "1.0.0-rc.46"
56
56
  },
57
57
  "nx": {
58
58
  "implicitDependencies": [