@hot-updater/azure 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/dist/functions/index.mjs +12 -5
- package/package.json +6 -6
package/dist/functions/index.mjs
CHANGED
|
@@ -6117,6 +6117,10 @@ const nativeBuilds = defineTable({
|
|
|
6117
6117
|
type: "string",
|
|
6118
6118
|
maxLength: 16,
|
|
6119
6119
|
required: false
|
|
6120
|
+
},
|
|
6121
|
+
native_app_version: {
|
|
6122
|
+
type: "string",
|
|
6123
|
+
required: false
|
|
6120
6124
|
}
|
|
6121
6125
|
}, {
|
|
6122
6126
|
key: ["id"],
|
|
@@ -8151,7 +8155,7 @@ const createKvAdapter = ({ store, tablePrefix = "" }) => {
|
|
|
8151
8155
|
};
|
|
8152
8156
|
//#endregion
|
|
8153
8157
|
//#region ../../packages/server/dist/version.mjs
|
|
8154
|
-
const HOT_UPDATER_SERVER_VERSION = "1.2.0-rc.
|
|
8158
|
+
const HOT_UPDATER_SERVER_VERSION = "1.2.0-rc.31";
|
|
8155
8159
|
//#endregion
|
|
8156
8160
|
//#region ../../packages/server/dist/handlerVersionRoutes.mjs
|
|
8157
8161
|
const createVersionRouteHandlers = (plugins = []) => {
|
|
@@ -9559,7 +9563,8 @@ const pick = (row) => ({
|
|
|
9559
9563
|
is_store_build: row.is_store_build === true,
|
|
9560
9564
|
is_sandbox: row.is_sandbox === true,
|
|
9561
9565
|
sandbox_url_scheme: row.sandbox_url_scheme ?? null,
|
|
9562
|
-
export_method: row.export_method ?? null
|
|
9566
|
+
export_method: row.export_method ?? null,
|
|
9567
|
+
native_app_version: row.native_app_version ?? null
|
|
9563
9568
|
});
|
|
9564
9569
|
const EXPORT_METHODS = /* @__PURE__ */ new Set([
|
|
9565
9570
|
"app-store",
|
|
@@ -9593,7 +9598,7 @@ const nativeBuildScopeKey = (scope) => {
|
|
|
9593
9598
|
return scopeKey;
|
|
9594
9599
|
};
|
|
9595
9600
|
const isBuiltInBundle = async (db, bundleId) => await db.findOne("native_builds", { min_bundle_id: bundleId }) !== null;
|
|
9596
|
-
const problemOf = ({ id, minBundleId, platform, channel, fingerprintHash, appVersion, gitCommitHash, buildKey, buildNumber, isSandbox, sandboxUrlScheme, exportMethod, artifact }) => {
|
|
9601
|
+
const problemOf = ({ id, minBundleId, platform, channel, fingerprintHash, appVersion, gitCommitHash, buildKey, buildNumber, isSandbox, sandboxUrlScheme, exportMethod, nativeAppVersion, artifact }) => {
|
|
9597
9602
|
if (!isUUIDv7(id)) return "id must be a UUIDv7";
|
|
9598
9603
|
if (!isUUIDv7(minBundleId)) return "minBundleId must be the UUIDv7 a release build compiles in";
|
|
9599
9604
|
if (platform !== "ios" && platform !== "android") return "platform must be ios or android";
|
|
@@ -9610,6 +9615,7 @@ const problemOf = ({ id, minBundleId, platform, channel, fingerprintHash, appVer
|
|
|
9610
9615
|
if (fingerprintHash === null === (appVersion === null)) return "exactly one of fingerprintHash and appVersion is required";
|
|
9611
9616
|
if (buildKey !== null && !BUILD_KEY.test(buildKey)) return "buildKey must be nbk1: and a SHA-256, or null";
|
|
9612
9617
|
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`;
|
|
9618
|
+
if (nativeAppVersion !== void 0 && nativeAppVersion !== null && (typeof nativeAppVersion !== "string" || nativeAppVersion.trim().length === 0)) return "nativeAppVersion must be the artifact's app version, or null";
|
|
9613
9619
|
const kinds = ARTIFACT_KINDS[platform];
|
|
9614
9620
|
if (!kinds.includes(artifact.kind)) return `artifact.kind of an ${platform} build must be ${kinds.join(" or ")}`;
|
|
9615
9621
|
if (exportMethod !== void 0 && exportMethod !== null) {
|
|
@@ -9647,7 +9653,8 @@ const createNativeBuildApi = (db, { now = Date.now } = {}) => ({
|
|
|
9647
9653
|
is_store_build: false,
|
|
9648
9654
|
is_sandbox: registration.isSandbox === true,
|
|
9649
9655
|
sandbox_url_scheme: registration.sandboxUrlScheme ?? null,
|
|
9650
|
-
export_method: registration.exportMethod ?? null
|
|
9656
|
+
export_method: registration.exportMethod ?? null,
|
|
9657
|
+
native_app_version: registration.nativeAppVersion ?? null
|
|
9651
9658
|
};
|
|
9652
9659
|
for (let attempt = 1;; attempt += 1) {
|
|
9653
9660
|
await insertChannel(db, {
|
|
@@ -10687,7 +10694,7 @@ const refusingInvalid = async (operation) => {
|
|
|
10687
10694
|
throw error;
|
|
10688
10695
|
}
|
|
10689
10696
|
};
|
|
10690
|
-
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));
|
|
10697
|
+
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));
|
|
10691
10698
|
const scopeKeyOf = (params) => decodeMaybe(requireRouteParam(params, "scopeKey")) ?? "";
|
|
10692
10699
|
const createAdminRouteHandlers = () => ({
|
|
10693
10700
|
listBundles: onCore(async (core, request) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/azure",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.0-rc.
|
|
4
|
+
"version": "1.2.0-rc.31",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": "^22.23.4 || ^24.22.1 || >=26.12.1"
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"@azure/identity": "4.14.0",
|
|
45
45
|
"@azure/keyvault-secrets": "4.11.2",
|
|
46
46
|
"@azure/storage-blob": "12.34.0",
|
|
47
|
-
"@hot-updater/cli-tools": "1.2.0-rc.
|
|
48
|
-
"@hot-updater/
|
|
49
|
-
"@hot-updater/
|
|
50
|
-
"@hot-updater/
|
|
47
|
+
"@hot-updater/cli-tools": "1.2.0-rc.31",
|
|
48
|
+
"@hot-updater/protocol": "1.2.0-rc.31",
|
|
49
|
+
"@hot-updater/server": "1.2.0-rc.31",
|
|
50
|
+
"@hot-updater/plugin-core": "1.2.0-rc.31"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@azure/functions": "4.16.5",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"execa": "9.5.2",
|
|
56
56
|
"jszip": "^3.10.1",
|
|
57
57
|
"vitest": "4.1.4",
|
|
58
|
-
"@hot-updater/test-utils": "1.2.0-rc.
|
|
58
|
+
"@hot-updater/test-utils": "1.2.0-rc.31"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build": "tsdown",
|