@hot-updater/vercel 1.2.0-rc.30 → 1.2.0-rc.32
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/function/index.mjs +12 -5
- package/package.json +7 -7
package/dist/function/index.mjs
CHANGED
|
@@ -2483,6 +2483,10 @@ const nativeBuilds = defineTable({
|
|
|
2483
2483
|
type: "string",
|
|
2484
2484
|
maxLength: 16,
|
|
2485
2485
|
required: false
|
|
2486
|
+
},
|
|
2487
|
+
native_app_version: {
|
|
2488
|
+
type: "string",
|
|
2489
|
+
required: false
|
|
2486
2490
|
}
|
|
2487
2491
|
}, {
|
|
2488
2492
|
key: ["id"],
|
|
@@ -17731,7 +17735,7 @@ const postgres = (config) => {
|
|
|
17731
17735
|
};
|
|
17732
17736
|
//#endregion
|
|
17733
17737
|
//#region ../../packages/server/dist/version.mjs
|
|
17734
|
-
const HOT_UPDATER_SERVER_VERSION = "1.2.0-rc.
|
|
17738
|
+
const HOT_UPDATER_SERVER_VERSION = "1.2.0-rc.32";
|
|
17735
17739
|
//#endregion
|
|
17736
17740
|
//#region ../../packages/server/dist/handlerVersionRoutes.mjs
|
|
17737
17741
|
const createVersionRouteHandlers = (plugins = []) => {
|
|
@@ -19139,7 +19143,8 @@ const pick = (row) => ({
|
|
|
19139
19143
|
is_store_build: row.is_store_build === true,
|
|
19140
19144
|
is_sandbox: row.is_sandbox === true,
|
|
19141
19145
|
sandbox_url_scheme: row.sandbox_url_scheme ?? null,
|
|
19142
|
-
export_method: row.export_method ?? null
|
|
19146
|
+
export_method: row.export_method ?? null,
|
|
19147
|
+
native_app_version: row.native_app_version ?? null
|
|
19143
19148
|
});
|
|
19144
19149
|
const EXPORT_METHODS = /* @__PURE__ */ new Set([
|
|
19145
19150
|
"app-store",
|
|
@@ -19173,7 +19178,7 @@ const nativeBuildScopeKey = (scope) => {
|
|
|
19173
19178
|
return scopeKey;
|
|
19174
19179
|
};
|
|
19175
19180
|
const isBuiltInBundle = async (db, bundleId) => await db.findOne("native_builds", { min_bundle_id: bundleId }) !== null;
|
|
19176
|
-
const problemOf = ({ id, minBundleId, platform, channel, fingerprintHash, appVersion, gitCommitHash, buildKey, buildNumber, isSandbox, sandboxUrlScheme, exportMethod, artifact }) => {
|
|
19181
|
+
const problemOf = ({ id, minBundleId, platform, channel, fingerprintHash, appVersion, gitCommitHash, buildKey, buildNumber, isSandbox, sandboxUrlScheme, exportMethod, nativeAppVersion, artifact }) => {
|
|
19177
19182
|
if (!isUUIDv7(id)) return "id must be a UUIDv7";
|
|
19178
19183
|
if (!isUUIDv7(minBundleId)) return "minBundleId must be the UUIDv7 a release build compiles in";
|
|
19179
19184
|
if (platform !== "ios" && platform !== "android") return "platform must be ios or android";
|
|
@@ -19190,6 +19195,7 @@ const problemOf = ({ id, minBundleId, platform, channel, fingerprintHash, appVer
|
|
|
19190
19195
|
if (fingerprintHash === null === (appVersion === null)) return "exactly one of fingerprintHash and appVersion is required";
|
|
19191
19196
|
if (buildKey !== null && !BUILD_KEY.test(buildKey)) return "buildKey must be nbk1: and a SHA-256, or null";
|
|
19192
19197
|
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`;
|
|
19198
|
+
if (nativeAppVersion !== void 0 && nativeAppVersion !== null && (typeof nativeAppVersion !== "string" || nativeAppVersion.trim().length === 0)) return "nativeAppVersion must be the artifact's app version, or null";
|
|
19193
19199
|
const kinds = ARTIFACT_KINDS[platform];
|
|
19194
19200
|
if (!kinds.includes(artifact.kind)) return `artifact.kind of an ${platform} build must be ${kinds.join(" or ")}`;
|
|
19195
19201
|
if (exportMethod !== void 0 && exportMethod !== null) {
|
|
@@ -19227,7 +19233,8 @@ const createNativeBuildApi = (db, { now = Date.now } = {}) => ({
|
|
|
19227
19233
|
is_store_build: false,
|
|
19228
19234
|
is_sandbox: registration.isSandbox === true,
|
|
19229
19235
|
sandbox_url_scheme: registration.sandboxUrlScheme ?? null,
|
|
19230
|
-
export_method: registration.exportMethod ?? null
|
|
19236
|
+
export_method: registration.exportMethod ?? null,
|
|
19237
|
+
native_app_version: registration.nativeAppVersion ?? null
|
|
19231
19238
|
};
|
|
19232
19239
|
for (let attempt = 1;; attempt += 1) {
|
|
19233
19240
|
await insertChannel(db, {
|
|
@@ -20267,7 +20274,7 @@ const refusingInvalid = async (operation) => {
|
|
|
20267
20274
|
throw error;
|
|
20268
20275
|
}
|
|
20269
20276
|
};
|
|
20270
|
-
const isNativeBuildRegistration = (value) => isRecord$5(value) && isText$2(value.id) && isText$2(value.minBundleId) && typeof value.platform === "string" && isPlatform(value.platform) && isText$2(value.channel) && isTextOrNull$1(value.fingerprintHash) && isTextOrNull$1(value.appVersion) && value.fingerprintHash === null !== (value.appVersion === null) && isTextOrNull$1(value.gitCommitHash) && isTextOrNull$1(value.buildKey) && (value.buildNumber === void 0 || isTextOrNull$1(value.buildNumber)) && (value.isSandbox === void 0 || typeof value.isSandbox === "boolean") && (value.sandboxUrlScheme === void 0 || isTextOrNull$1(value.sandboxUrlScheme)) && (value.exportMethod === void 0 || isTextOrNull$1(value.exportMethod)) && isRecord$5(value.artifact) && typeof value.artifact.kind === "string" && NATIVE_BUILD_ARTIFACT_KINDS.has(value.artifact.kind) && isText$2(value.artifact.storageUri) && Number.isSafeInteger(value.artifact.byteSize) && value.artifact.byteSize >= 0 && isRecord$5(value.embeddedBundle) && isText$2(value.embeddedBundle.manifestStorageUri) && isText$2(value.embeddedBundle.manifestFileHash) && isText$2(value.embeddedBundle.assetBaseStorageUri) && (value.embeddedBundle.metadata === void 0 || isRecord$5(value.embeddedBundle.metadata));
|
|
20277
|
+
const isNativeBuildRegistration = (value) => isRecord$5(value) && isText$2(value.id) && isText$2(value.minBundleId) && typeof value.platform === "string" && isPlatform(value.platform) && isText$2(value.channel) && isTextOrNull$1(value.fingerprintHash) && isTextOrNull$1(value.appVersion) && value.fingerprintHash === null !== (value.appVersion === null) && isTextOrNull$1(value.gitCommitHash) && isTextOrNull$1(value.buildKey) && (value.buildNumber === void 0 || isTextOrNull$1(value.buildNumber)) && (value.isSandbox === void 0 || typeof value.isSandbox === "boolean") && (value.sandboxUrlScheme === void 0 || isTextOrNull$1(value.sandboxUrlScheme)) && (value.exportMethod === void 0 || isTextOrNull$1(value.exportMethod)) && (value.nativeAppVersion === void 0 || isTextOrNull$1(value.nativeAppVersion)) && isRecord$5(value.artifact) && typeof value.artifact.kind === "string" && NATIVE_BUILD_ARTIFACT_KINDS.has(value.artifact.kind) && isText$2(value.artifact.storageUri) && Number.isSafeInteger(value.artifact.byteSize) && value.artifact.byteSize >= 0 && isRecord$5(value.embeddedBundle) && isText$2(value.embeddedBundle.manifestStorageUri) && isText$2(value.embeddedBundle.manifestFileHash) && isText$2(value.embeddedBundle.assetBaseStorageUri) && (value.embeddedBundle.metadata === void 0 || isRecord$5(value.embeddedBundle.metadata));
|
|
20271
20278
|
const scopeKeyOf = (params) => decodeMaybe(requireRouteParam(params, "scopeKey")) ?? "";
|
|
20272
20279
|
const createAdminRouteHandlers = () => ({
|
|
20273
20280
|
listBundles: onCore(async (core, request) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/vercel",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.0-rc.
|
|
4
|
+
"version": "1.2.0-rc.32",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"module": "dist/index.mjs",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"@vercel/cli-auth": "0.3.10",
|
|
42
42
|
"@vercel/cli-config": "0.3.1",
|
|
43
43
|
"pg": "8.13.1",
|
|
44
|
-
"@hot-updater/
|
|
45
|
-
"@hot-updater/
|
|
46
|
-
"@hot-updater/
|
|
47
|
-
"@hot-updater/
|
|
48
|
-
"@hot-updater/
|
|
44
|
+
"@hot-updater/cli-tools": "1.2.0-rc.32",
|
|
45
|
+
"@hot-updater/plugin-core": "1.2.0-rc.32",
|
|
46
|
+
"@hot-updater/protocol": "1.2.0-rc.32",
|
|
47
|
+
"@hot-updater/postgres": "1.2.0-rc.32",
|
|
48
|
+
"@hot-updater/server": "1.2.0-rc.32"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "^20",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"execa": "9.5.2",
|
|
55
55
|
"kysely": "0.28.17",
|
|
56
56
|
"vitest": "4.1.4",
|
|
57
|
-
"@hot-updater/test-utils": "1.2.0-rc.
|
|
57
|
+
"@hot-updater/test-utils": "1.2.0-rc.32"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "tsdown",
|