@hot-updater/server 1.0.0-rc.46 → 1.0.0-rc.47

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.
@@ -36,7 +36,6 @@ const fail = (message) => {
36
36
  const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
37
37
  const checkPlugin = (value, at) => {
38
38
  if (!isRecord(value)) return fail(`${at} is not a plugin.`);
39
- if ("kind" in value) fail(`${at} has a kind; core is built in and is never passed as a plugin.`);
40
39
  const unknown = Object.keys(value).find((key) => !PLUGIN_KEYS.has(key));
41
40
  if (unknown !== void 0) fail(`${at} has an unknown key "${unknown}".`);
42
41
  const plugin = value;
@@ -37,7 +37,6 @@ const fail = (message) => {
37
37
  const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
38
38
  const checkPlugin = (value, at) => {
39
39
  if (!isRecord(value)) return fail(`${at} is not a plugin.`);
40
- if ("kind" in value) fail(`${at} has a kind; core is built in and is never passed as a plugin.`);
41
40
  const unknown = Object.keys(value).find((key) => !PLUGIN_KEYS.has(key));
42
41
  if (unknown !== void 0) fail(`${at} has an unknown key "${unknown}".`);
43
42
  const plugin = value;
@@ -20,7 +20,7 @@ const baseBundleIdsOf = (row, range, bundleId, limit) => {
20
20
  for (const { descriptor, index } of newestFirst) {
21
21
  if (ids.length >= limit) break;
22
22
  const id = descriptor.bundleId;
23
- if (serving.has(index) && descriptor.kind === "BUNDLE" && id !== null && id < bundleId && !ids.includes(id)) ids.push(id);
23
+ if (serving.has(index) && id !== null && id < bundleId && !ids.includes(id)) ids.push(id);
24
24
  }
25
25
  return ids;
26
26
  };
@@ -20,7 +20,7 @@ const baseBundleIdsOf = (row, range, bundleId, limit) => {
20
20
  for (const { descriptor, index } of newestFirst) {
21
21
  if (ids.length >= limit) break;
22
22
  const id = descriptor.bundleId;
23
- if (serving.has(index) && descriptor.kind === "BUNDLE" && id !== null && id < bundleId && !ids.includes(id)) ids.push(id);
23
+ if (serving.has(index) && id !== null && id < bundleId && !ids.includes(id)) ids.push(id);
24
24
  }
25
25
  return ids;
26
26
  };
@@ -230,7 +230,7 @@ const createCoreOperations = (db, { now = Date.now } = {}) => {
230
230
  }),
231
231
  promoteRelease: (input) => withChannels(async () => {
232
232
  const checkSource = (source) => {
233
- if (source.kind !== "BUNDLE" || source.bundle_id === null) throw new _hot_updater_plugin_core.ReleaseManagementError("TARGET_RELEASE_INVALID", "Only a Bundle Release can be promoted.");
233
+ if (source.bundle_id === null) throw new _hot_updater_plugin_core.ReleaseManagementError("TARGET_RELEASE_INVALID", "Only a Bundle Release can be promoted.");
234
234
  };
235
235
  checkSource((await db.transaction((tx) => loadTarget(tx, input))).release);
236
236
  const targetChannel = input.targetChannel.trim();
@@ -230,7 +230,7 @@ const createCoreOperations = (db, { now = Date.now } = {}) => {
230
230
  }),
231
231
  promoteRelease: (input) => withChannels(async () => {
232
232
  const checkSource = (source) => {
233
- if (source.kind !== "BUNDLE" || source.bundle_id === null) throw new ReleaseManagementError("TARGET_RELEASE_INVALID", "Only a Bundle Release can be promoted.");
233
+ if (source.bundle_id === null) throw new ReleaseManagementError("TARGET_RELEASE_INVALID", "Only a Bundle Release can be promoted.");
234
234
  };
235
235
  checkSource((await db.transaction((tx) => loadTarget(tx, input))).release);
236
236
  const targetChannel = input.targetChannel.trim();
package/dist/package.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "1.0.0-rc.46";
2
+ var version = "1.0.0-rc.47";
3
3
  //#endregion
4
4
  Object.defineProperty(exports, "version", {
5
5
  enumerable: true,
package/dist/package.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "1.0.0-rc.46";
2
+ var version = "1.0.0-rc.47";
3
3
  //#endregion
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hot-updater/server",
3
- "version": "1.0.0-rc.46",
3
+ "version": "1.0.0-rc.47",
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/protocol": "1.0.0-rc.46",
54
- "@hot-updater/plugin-api-keys": "1.0.0-rc.46",
55
- "@hot-updater/plugin-core": "1.0.0-rc.46",
56
- "@hot-updater/plugin-remote-config": "1.0.0-rc.46",
57
- "@hot-updater/plugin-insights": "1.0.0-rc.46"
53
+ "@hot-updater/plugin-core": "1.0.0-rc.47",
54
+ "@hot-updater/plugin-insights": "1.0.0-rc.47",
55
+ "@hot-updater/plugin-api-keys": "1.0.0-rc.47",
56
+ "@hot-updater/plugin-remote-config": "1.0.0-rc.47",
57
+ "@hot-updater/protocol": "1.0.0-rc.47"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "@prisma/client": "*",
@@ -95,8 +95,8 @@
95
95
  "prisma": "6.19.3",
96
96
  "uuidv7": "^1.0.2",
97
97
  "wrangler": "^4.69.0",
98
- "@hot-updater/standalone": "1.0.0-rc.46",
99
- "@hot-updater/test-utils": "1.0.0-rc.46"
98
+ "@hot-updater/standalone": "1.0.0-rc.47",
99
+ "@hot-updater/test-utils": "1.0.0-rc.47"
100
100
  },
101
101
  "nx": {
102
102
  "implicitDependencies": [