@hot-updater/server 1.0.0-rc.45 → 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.
@@ -6,8 +6,6 @@ interface DrizzleConfig {
6
6
  /** A Drizzle database, or a function that returns one on first use. */
7
7
  readonly db: unknown | (() => unknown | Promise<unknown>);
8
8
  readonly provider: DrizzleProvider;
9
- /** Ignored: Hot Updater reads through SQL; the schema file is for drizzle-kit. */
10
- readonly schema?: Record<string, unknown>;
11
9
  }
12
10
  /**
13
11
  * Hot Updater's database on a Drizzle instance: the storage engine through the
@@ -6,8 +6,6 @@ interface DrizzleConfig {
6
6
  /** A Drizzle database, or a function that returns one on first use. */
7
7
  readonly db: unknown | (() => unknown | Promise<unknown>);
8
8
  readonly provider: DrizzleProvider;
9
- /** Ignored: Hot Updater reads through SQL; the schema file is for drizzle-kit. */
10
- readonly schema?: Record<string, unknown>;
11
9
  }
12
10
  /**
13
11
  * Hot Updater's database on a Drizzle instance: the storage engine through the
@@ -13,4 +13,4 @@ interface KyselyAdapterConfig<TDatabase extends object = object> {
13
13
  */
14
14
  declare const kyselyAdapter: <TDatabase extends object>(config: KyselyAdapterConfig<TDatabase>) => ToolingDatabase;
15
15
  //#endregion
16
- export { KyselyAdapterConfig, type SqlDialect as SQLProvider, kyselyAdapter, kyselyExecutor };
16
+ export { KyselyAdapterConfig, kyselyAdapter, kyselyExecutor };
@@ -13,4 +13,4 @@ interface KyselyAdapterConfig<TDatabase extends object = object> {
13
13
  */
14
14
  declare const kyselyAdapter: <TDatabase extends object>(config: KyselyAdapterConfig<TDatabase>) => ToolingDatabase;
15
15
  //#endregion
16
- export { KyselyAdapterConfig, type SqlDialect as SQLProvider, kyselyAdapter, kyselyExecutor };
16
+ export { KyselyAdapterConfig, kyselyAdapter, kyselyExecutor };
@@ -7,7 +7,7 @@ const sqlProviders = [
7
7
  ];
8
8
  /** The provider an adapter was given, when Hot Updater's SQL core runs on it. */
9
9
  const checkSqlProvider = (adapter, provider) => {
10
- if (!sqlProviders.includes(provider)) throw new Error(`${adapter}: provider "${String(provider)}" is not supported. Use ${sqlProviders.map((name) => `"${name}"`).join(", ")}; CockroachDB and SQL Server were dropped in 1.0.`);
10
+ if (!sqlProviders.includes(provider)) throw new Error(`${adapter}: provider "${String(provider)}" is not supported. Use ${sqlProviders.map((name) => `"${name}"`).join(", ")}.`);
11
11
  return provider;
12
12
  };
13
13
  //#endregion
@@ -7,7 +7,7 @@ const sqlProviders = [
7
7
  ];
8
8
  /** The provider an adapter was given, when Hot Updater's SQL core runs on it. */
9
9
  const checkSqlProvider = (adapter, provider) => {
10
- if (!sqlProviders.includes(provider)) throw new Error(`${adapter}: provider "${String(provider)}" is not supported. Use ${sqlProviders.map((name) => `"${name}"`).join(", ")}; CockroachDB and SQL Server were dropped in 1.0.`);
10
+ if (!sqlProviders.includes(provider)) throw new Error(`${adapter}: provider "${String(provider)}" is not supported. Use ${sqlProviders.map((name) => `"${name}"`).join(", ")}.`);
11
11
  return provider;
12
12
  };
13
13
  //#endregion
@@ -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();
@@ -17,7 +17,7 @@ const databaseOf = (value) => {
17
17
  if (isAdapter(value.adapter)) return value;
18
18
  if ("core" in value && "fetchAdmin" in value) throw new _hot_updater_plugin_core.HotUpdaterConfigError("standaloneRepository reaches a server's admin API from the CLI and console. createHotUpdater needs the server's own database, such as kyselyAdapter(...).");
19
19
  }
20
- throw new _hot_updater_plugin_core.HotUpdaterConfigError("database must be a Hot Updater 1.0 database, such as kyselyAdapter(...) or postgres(...). Upgrade the provider package that created it.");
20
+ throw new _hot_updater_plugin_core.HotUpdaterConfigError("database must be a Hot Updater database adapter, such as kyselyAdapter(...) or postgres(...).");
21
21
  };
22
22
  /** The configured storage, when it is a storage adapter. */
23
23
  const storageOf = (value) => {
@@ -18,7 +18,7 @@ const databaseOf = (value) => {
18
18
  if (isAdapter(value.adapter)) return value;
19
19
  if ("core" in value && "fetchAdmin" in value) throw new HotUpdaterConfigError("standaloneRepository reaches a server's admin API from the CLI and console. createHotUpdater needs the server's own database, such as kyselyAdapter(...).");
20
20
  }
21
- throw new HotUpdaterConfigError("database must be a Hot Updater 1.0 database, such as kyselyAdapter(...) or postgres(...). Upgrade the provider package that created it.");
21
+ throw new HotUpdaterConfigError("database must be a Hot Updater database adapter, such as kyselyAdapter(...) or postgres(...).");
22
22
  };
23
23
  /** The configured storage, when it is a storage adapter. */
24
24
  const storageOf = (value) => {
package/dist/index.d.cts CHANGED
@@ -3,8 +3,7 @@ import "./assembly/assemblePlugins.cjs";
3
3
  import { HotUpdaterHandler, HotUpdaterHandlers } from "./handlerTypes.cjs";
4
4
  import "./handler.cjs";
5
5
  import { ClientAccessPolicy, ClientAccessRule, ClientAuthProvider, ClientEndpoint, CreateHotUpdaterOptions, HotUpdaterAPI, RuntimeHotUpdaterAPI, createHotUpdater } from "./createHotUpdaterCore.cjs";
6
- import { Bundle } from "./types/index.cjs";
6
+ import { toNodeHandler } from "./node.cjs";
7
7
  import { HOT_UPDATER_SERVER_VERSION } from "./version.cjs";
8
8
  import { HOT_UPDATER_INFRASTRUCTURE_GENERATION } from "./handlerVersionRoutes.cjs";
9
- import { toNodeHandler } from "./node.cjs";
10
- export { type Bundle, type ClientAccessPolicy, type ClientAccessRule, type ClientAuthProvider, type ClientEndpoint, type CreateHotUpdaterOptions, HOT_UPDATER_INFRASTRUCTURE_GENERATION, HOT_UPDATER_SERVER_VERSION, type HotUpdaterAPI, HotUpdaterConfigError, type HotUpdaterHandler, type HotUpdaterHandlers, type RuntimeHotUpdaterAPI, createHotUpdater, toNodeHandler };
9
+ export { type ClientAccessPolicy, type ClientAccessRule, type ClientAuthProvider, type ClientEndpoint, type CreateHotUpdaterOptions, HOT_UPDATER_INFRASTRUCTURE_GENERATION, HOT_UPDATER_SERVER_VERSION, type HotUpdaterAPI, HotUpdaterConfigError, type HotUpdaterHandler, type HotUpdaterHandlers, type RuntimeHotUpdaterAPI, createHotUpdater, toNodeHandler };
package/dist/index.d.mts CHANGED
@@ -3,8 +3,7 @@ import "./assembly/assemblePlugins.mjs";
3
3
  import { HotUpdaterHandler, HotUpdaterHandlers } from "./handlerTypes.mjs";
4
4
  import "./handler.mjs";
5
5
  import { ClientAccessPolicy, ClientAccessRule, ClientAuthProvider, ClientEndpoint, CreateHotUpdaterOptions, HotUpdaterAPI, RuntimeHotUpdaterAPI, createHotUpdater } from "./createHotUpdaterCore.mjs";
6
- import { Bundle } from "./types/index.mjs";
6
+ import { toNodeHandler } from "./node.mjs";
7
7
  import { HOT_UPDATER_SERVER_VERSION } from "./version.mjs";
8
8
  import { HOT_UPDATER_INFRASTRUCTURE_GENERATION } from "./handlerVersionRoutes.mjs";
9
- import { toNodeHandler } from "./node.mjs";
10
- export { type Bundle, type ClientAccessPolicy, type ClientAccessRule, type ClientAuthProvider, type ClientEndpoint, type CreateHotUpdaterOptions, HOT_UPDATER_INFRASTRUCTURE_GENERATION, HOT_UPDATER_SERVER_VERSION, type HotUpdaterAPI, HotUpdaterConfigError, type HotUpdaterHandler, type HotUpdaterHandlers, type RuntimeHotUpdaterAPI, createHotUpdater, toNodeHandler };
9
+ export { type ClientAccessPolicy, type ClientAccessRule, type ClientAuthProvider, type ClientEndpoint, type CreateHotUpdaterOptions, HOT_UPDATER_INFRASTRUCTURE_GENERATION, HOT_UPDATER_SERVER_VERSION, type HotUpdaterAPI, HotUpdaterConfigError, type HotUpdaterHandler, type HotUpdaterHandlers, type RuntimeHotUpdaterAPI, createHotUpdater, toNodeHandler };
package/dist/node.cjs CHANGED
@@ -1,5 +1,3 @@
1
- require("./version.cjs");
2
- require("./handlerVersionRoutes.cjs");
3
1
  //#region src/node.ts
4
2
  /**
5
3
  * Converts a Hot Updater handler to a Node.js-compatible middleware
package/dist/node.d.cts CHANGED
@@ -1,6 +1,4 @@
1
1
  import { HotUpdaterHandler } from "./handlerTypes.cjs";
2
- import { HOT_UPDATER_SERVER_VERSION } from "./version.cjs";
3
- import { HOT_UPDATER_INFRASTRUCTURE_GENERATION } from "./handlerVersionRoutes.cjs";
4
2
  //#region src/node.d.ts
5
3
  /**
6
4
  * Converts a Hot Updater handler to a Node.js-compatible middleware
package/dist/node.d.mts CHANGED
@@ -1,6 +1,4 @@
1
1
  import { HotUpdaterHandler } from "./handlerTypes.mjs";
2
- import { HOT_UPDATER_SERVER_VERSION } from "./version.mjs";
3
- import { HOT_UPDATER_INFRASTRUCTURE_GENERATION } from "./handlerVersionRoutes.mjs";
4
2
  //#region src/node.d.ts
5
3
  /**
6
4
  * Converts a Hot Updater handler to a Node.js-compatible middleware
package/dist/node.mjs CHANGED
@@ -1,5 +1,3 @@
1
- import "./version.mjs";
2
- import "./handlerVersionRoutes.mjs";
3
1
  //#region src/node.ts
4
2
  /**
5
3
  * Converts a Hot Updater handler to a Node.js-compatible middleware
package/dist/package.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "1.0.0-rc.45";
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.45";
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.45",
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.45",
54
- "@hot-updater/plugin-core": "1.0.0-rc.45",
55
- "@hot-updater/plugin-insights": "1.0.0-rc.45",
56
- "@hot-updater/plugin-api-keys": "1.0.0-rc.45",
57
- "@hot-updater/plugin-remote-config": "1.0.0-rc.45"
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/test-utils": "1.0.0-rc.45",
99
- "@hot-updater/standalone": "1.0.0-rc.45"
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": [
@@ -1,3 +0,0 @@
1
- import { HotUpdaterAPI } from "../createHotUpdaterCore.cjs";
2
- import { Bundle } from "@hot-updater/protocol";
3
- export type { Bundle };
@@ -1,3 +0,0 @@
1
- import { HotUpdaterAPI } from "../createHotUpdaterCore.mjs";
2
- import { Bundle } from "@hot-updater/protocol";
3
- export type { Bundle };