@hot-updater/cloudflare 1.2.0-rc.30 → 1.2.0-rc.31

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hot-updater/cloudflare",
3
3
  "type": "module",
4
- "version": "1.2.0-rc.30",
4
+ "version": "1.2.0-rc.31",
5
5
  "description": "React Native OTA solution for self-hosted",
6
6
  "main": "dist/index.cjs",
7
7
  "module": "dist/index.mjs",
@@ -52,11 +52,11 @@
52
52
  "cloudflare": "4.2.0",
53
53
  "hono": "4.12.34",
54
54
  "uuidv7": "^1.0.2",
55
- "@hot-updater/protocol": "1.2.0-rc.30",
56
- "@hot-updater/cli-tools": "1.2.0-rc.30",
57
- "@hot-updater/server": "1.2.0-rc.30",
58
- "@hot-updater/plugin-core": "1.2.0-rc.30",
59
- "@hot-updater/storage-s3": "1.2.0-rc.30"
55
+ "@hot-updater/cli-tools": "1.2.0-rc.31",
56
+ "@hot-updater/protocol": "1.2.0-rc.31",
57
+ "@hot-updater/server": "1.2.0-rc.31",
58
+ "@hot-updater/storage-s3": "1.2.0-rc.31",
59
+ "@hot-updater/plugin-core": "1.2.0-rc.31"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@aws-sdk/client-s3": "3.1066.0",
@@ -75,7 +75,7 @@
75
75
  "vitest": "4.1.4",
76
76
  "wrangler": "^4.69.0",
77
77
  "xdg-app-paths": "^8.3.0",
78
- "@hot-updater/test-utils": "1.2.0-rc.30"
78
+ "@hot-updater/test-utils": "1.2.0-rc.31"
79
79
  },
80
80
  "scripts": {
81
81
  "build": "tsdown && pnpm build:worker",
package/sql/bundles.sql CHANGED
@@ -36,7 +36,7 @@ CREATE UNIQUE INDEX IF NOT EXISTS "channels_name" ON "channels" ("name");
36
36
 
37
37
  CREATE TABLE IF NOT EXISTS "bundle_totals" ("platform_key" TEXT NOT NULL, "_shard" INTEGER NOT NULL, "bundles" INTEGER NOT NULL, "_v" INTEGER NOT NULL DEFAULT 0, PRIMARY KEY ("platform_key", "_shard"));
38
38
 
39
- CREATE TABLE IF NOT EXISTS "native_builds" ("id" TEXT NOT NULL, "scope_key" TEXT NOT NULL, "platform" TEXT NOT NULL, "channel_id" TEXT NOT NULL, "fingerprint_hash" TEXT, "app_version" TEXT, "min_bundle_id" TEXT NOT NULL, "artifact_kind" TEXT NOT NULL, "artifact_storage_uri" TEXT NOT NULL, "byte_size" INTEGER NOT NULL, "git_commit_hash" TEXT, "created_at_ms" INTEGER NOT NULL, "build_key" TEXT, "build_number" TEXT, "submitted_to" TEXT, "submitted_at_ms" INTEGER, "submitted_version" TEXT, "is_store_build" INTEGER NOT NULL, "is_sandbox" INTEGER NOT NULL, "sandbox_url_scheme" TEXT, "export_method" TEXT, "store_build_scope_key" TEXT, "_v" INTEGER NOT NULL DEFAULT 0, PRIMARY KEY ("id"));
39
+ CREATE TABLE IF NOT EXISTS "native_builds" ("id" TEXT NOT NULL, "scope_key" TEXT NOT NULL, "platform" TEXT NOT NULL, "channel_id" TEXT NOT NULL, "fingerprint_hash" TEXT, "app_version" TEXT, "min_bundle_id" TEXT NOT NULL, "artifact_kind" TEXT NOT NULL, "artifact_storage_uri" TEXT NOT NULL, "byte_size" INTEGER NOT NULL, "git_commit_hash" TEXT, "created_at_ms" INTEGER NOT NULL, "build_key" TEXT, "build_number" TEXT, "submitted_to" TEXT, "submitted_at_ms" INTEGER, "submitted_version" TEXT, "is_store_build" INTEGER NOT NULL, "is_sandbox" INTEGER NOT NULL, "sandbox_url_scheme" TEXT, "export_method" TEXT, "native_app_version" TEXT, "store_build_scope_key" TEXT, "_v" INTEGER NOT NULL DEFAULT 0, PRIMARY KEY ("id"));
40
40
 
41
41
  CREATE INDEX IF NOT EXISTS "native_builds_byScope" ON "native_builds" ("scope_key", "id");
42
42
 
@@ -1 +1 @@
1
- This folder contains the built output assets for the worker "hot-updater" generated at 2026-11-12T00:57:41.630Z.
1
+ This folder contains the built output assets for the worker "hot-updater" generated at 2026-11-12T02:52:47.437Z.
@@ -2613,6 +2613,10 @@ var nativeBuilds = defineTable({
2613
2613
  type: "string",
2614
2614
  maxLength: 16,
2615
2615
  required: false
2616
+ },
2617
+ native_app_version: {
2618
+ type: "string",
2619
+ required: false
2616
2620
  }
2617
2621
  }, {
2618
2622
  key: ["id"],
@@ -4668,7 +4672,7 @@ var createSqlAdapter = /* @__PURE__ */ __name(({ executor, tablePrefix = "", max
4668
4672
  }, "createSqlAdapter");
4669
4673
 
4670
4674
  // ../../packages/server/dist/package.mjs
4671
- var version = "1.2.0-rc.30";
4675
+ var version = "1.2.0-rc.31";
4672
4676
 
4673
4677
  // ../../packages/server/dist/version.mjs
4674
4678
  var HOT_UPDATER_SERVER_VERSION = version;
@@ -6146,7 +6150,8 @@ var pick3 = /* @__PURE__ */ __name((row) => ({
6146
6150
  is_store_build: row.is_store_build === true,
6147
6151
  is_sandbox: row.is_sandbox === true,
6148
6152
  sandbox_url_scheme: row.sandbox_url_scheme ?? null,
6149
- export_method: row.export_method ?? null
6153
+ export_method: row.export_method ?? null,
6154
+ native_app_version: row.native_app_version ?? null
6150
6155
  }), "pick");
6151
6156
  var EXPORT_METHODS = /* @__PURE__ */ new Set([
6152
6157
  "app-store",
@@ -6180,7 +6185,7 @@ var nativeBuildScopeKey = /* @__PURE__ */ __name((scope) => {
6180
6185
  return scopeKey;
6181
6186
  }, "nativeBuildScopeKey");
6182
6187
  var isBuiltInBundle = /* @__PURE__ */ __name(async (db, bundleId) => await db.findOne("native_builds", { min_bundle_id: bundleId }) !== null, "isBuiltInBundle");
6183
- var problemOf = /* @__PURE__ */ __name(({ id, minBundleId, platform, channel, fingerprintHash, appVersion, gitCommitHash, buildKey, buildNumber, isSandbox, sandboxUrlScheme, exportMethod, artifact }) => {
6188
+ var problemOf = /* @__PURE__ */ __name(({ id, minBundleId, platform, channel, fingerprintHash, appVersion, gitCommitHash, buildKey, buildNumber, isSandbox, sandboxUrlScheme, exportMethod, nativeAppVersion, artifact }) => {
6184
6189
  if (!isUUIDv7(id)) return "id must be a UUIDv7";
6185
6190
  if (!isUUIDv7(minBundleId)) return "minBundleId must be the UUIDv7 a release build compiles in";
6186
6191
  if (platform !== "ios" && platform !== "android") return "platform must be ios or android";
@@ -6197,6 +6202,7 @@ var problemOf = /* @__PURE__ */ __name(({ id, minBundleId, platform, channel, fi
6197
6202
  if (fingerprintHash === null === (appVersion === null)) return "exactly one of fingerprintHash and appVersion is required";
6198
6203
  if (buildKey !== null && !BUILD_KEY.test(buildKey)) return "buildKey must be nbk1: and a SHA-256, or null";
6199
6204
  if (buildNumber !== void 0 && buildNumber !== null && (buildNumber.trim().length === 0 || buildNumber.length > BUILD_NUMBER_MAX_LENGTH)) return `buildNumber must be the artifact's build number, up to ${BUILD_NUMBER_MAX_LENGTH} characters, or null`;
6205
+ if (nativeAppVersion !== void 0 && nativeAppVersion !== null && (typeof nativeAppVersion !== "string" || nativeAppVersion.trim().length === 0)) return "nativeAppVersion must be the artifact's app version, or null";
6200
6206
  const kinds = ARTIFACT_KINDS[platform];
6201
6207
  if (!kinds.includes(artifact.kind)) return `artifact.kind of an ${platform} build must be ${kinds.join(" or ")}`;
6202
6208
  if (exportMethod !== void 0 && exportMethod !== null) {
@@ -6234,7 +6240,8 @@ var createNativeBuildApi = /* @__PURE__ */ __name((db, { now = Date.now } = {})
6234
6240
  is_store_build: false,
6235
6241
  is_sandbox: registration.isSandbox === true,
6236
6242
  sandbox_url_scheme: registration.sandboxUrlScheme ?? null,
6237
- export_method: registration.exportMethod ?? null
6243
+ export_method: registration.exportMethod ?? null,
6244
+ native_app_version: registration.nativeAppVersion ?? null
6238
6245
  };
6239
6246
  for (let attempt = 1; ; attempt += 1) {
6240
6247
  await insertChannel(db, {
@@ -7281,7 +7288,7 @@ var refusingInvalid = /* @__PURE__ */ __name(async (operation) => {
7281
7288
  throw error;
7282
7289
  }
7283
7290
  }, "refusingInvalid");
7284
- var isNativeBuildRegistration = /* @__PURE__ */ __name((value) => isRecord3(value) && isText(value.id) && isText(value.minBundleId) && typeof value.platform === "string" && isPlatform(value.platform) && isText(value.channel) && isTextOrNull(value.fingerprintHash) && isTextOrNull(value.appVersion) && value.fingerprintHash === null !== (value.appVersion === null) && isTextOrNull(value.gitCommitHash) && isTextOrNull(value.buildKey) && (value.buildNumber === void 0 || isTextOrNull(value.buildNumber)) && (value.isSandbox === void 0 || typeof value.isSandbox === "boolean") && (value.sandboxUrlScheme === void 0 || isTextOrNull(value.sandboxUrlScheme)) && (value.exportMethod === void 0 || isTextOrNull(value.exportMethod)) && isRecord3(value.artifact) && typeof value.artifact.kind === "string" && NATIVE_BUILD_ARTIFACT_KINDS.has(value.artifact.kind) && isText(value.artifact.storageUri) && Number.isSafeInteger(value.artifact.byteSize) && value.artifact.byteSize >= 0 && isRecord3(value.embeddedBundle) && isText(value.embeddedBundle.manifestStorageUri) && isText(value.embeddedBundle.manifestFileHash) && isText(value.embeddedBundle.assetBaseStorageUri) && (value.embeddedBundle.metadata === void 0 || isRecord3(value.embeddedBundle.metadata)), "isNativeBuildRegistration");
7291
+ var isNativeBuildRegistration = /* @__PURE__ */ __name((value) => isRecord3(value) && isText(value.id) && isText(value.minBundleId) && typeof value.platform === "string" && isPlatform(value.platform) && isText(value.channel) && isTextOrNull(value.fingerprintHash) && isTextOrNull(value.appVersion) && value.fingerprintHash === null !== (value.appVersion === null) && isTextOrNull(value.gitCommitHash) && isTextOrNull(value.buildKey) && (value.buildNumber === void 0 || isTextOrNull(value.buildNumber)) && (value.isSandbox === void 0 || typeof value.isSandbox === "boolean") && (value.sandboxUrlScheme === void 0 || isTextOrNull(value.sandboxUrlScheme)) && (value.exportMethod === void 0 || isTextOrNull(value.exportMethod)) && (value.nativeAppVersion === void 0 || isTextOrNull(value.nativeAppVersion)) && isRecord3(value.artifact) && typeof value.artifact.kind === "string" && NATIVE_BUILD_ARTIFACT_KINDS.has(value.artifact.kind) && isText(value.artifact.storageUri) && Number.isSafeInteger(value.artifact.byteSize) && value.artifact.byteSize >= 0 && isRecord3(value.embeddedBundle) && isText(value.embeddedBundle.manifestStorageUri) && isText(value.embeddedBundle.manifestFileHash) && isText(value.embeddedBundle.assetBaseStorageUri) && (value.embeddedBundle.metadata === void 0 || isRecord3(value.embeddedBundle.metadata)), "isNativeBuildRegistration");
7285
7292
  var scopeKeyOf = /* @__PURE__ */ __name((params) => decodeMaybe(requireRouteParam(params, "scopeKey")) ?? "", "scopeKeyOf");
7286
7293
  var createAdminRouteHandlers = /* @__PURE__ */ __name(() => ({
7287
7294
  listBundles: onCore(async (core, request) => {