@hot-updater/aws 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/lambda/index.cjs +18 -5
- package/package.json +8 -8
package/dist/lambda/index.cjs
CHANGED
|
@@ -2410,6 +2410,12 @@ const channels = defineTable({
|
|
|
2410
2410
|
* `export_method` is how an `.ipa` was exported, read from its profile when
|
|
2411
2411
|
* it registers and never changed; null on any other artifact, on an `.ipa`
|
|
2412
2412
|
* whose profile couldn't be read, and on one registered before the column.
|
|
2413
|
+
* `native_app_version` is the app version the artifact itself reports, its
|
|
2414
|
+
* `CFBundleShortVersionString` or `versionName`, read from the artifact when
|
|
2415
|
+
* it registers and never changed, whatever the update strategy; `app_version`
|
|
2416
|
+
* stays the version OTAs target, null on a fingerprint build. It is null
|
|
2417
|
+
* when the artifact's can't be read, and on a build registered before the
|
|
2418
|
+
* column.
|
|
2413
2419
|
* Boolean columns follow one rule: `is_*` for a fact about the row or
|
|
2414
2420
|
* `should_*` for an instruction to the client, never null; a unique index over
|
|
2415
2421
|
* the rows where one is true keys a derived slot, not the boolean.
|
|
@@ -2502,6 +2508,10 @@ const nativeBuilds = defineTable({
|
|
|
2502
2508
|
type: "string",
|
|
2503
2509
|
maxLength: 16,
|
|
2504
2510
|
required: false
|
|
2511
|
+
},
|
|
2512
|
+
native_app_version: {
|
|
2513
|
+
type: "string",
|
|
2514
|
+
required: false
|
|
2505
2515
|
}
|
|
2506
2516
|
}, {
|
|
2507
2517
|
key: ["id"],
|
|
@@ -4774,7 +4784,7 @@ const createKvAdapter = ({ store, tablePrefix = "" }) => {
|
|
|
4774
4784
|
};
|
|
4775
4785
|
//#endregion
|
|
4776
4786
|
//#region ../../packages/server/dist/version.mjs
|
|
4777
|
-
const HOT_UPDATER_SERVER_VERSION = "1.2.0-rc.
|
|
4787
|
+
const HOT_UPDATER_SERVER_VERSION = "1.2.0-rc.31";
|
|
4778
4788
|
//#endregion
|
|
4779
4789
|
//#region ../../packages/server/dist/handlerVersionRoutes.mjs
|
|
4780
4790
|
/**
|
|
@@ -6313,7 +6323,8 @@ const pick = (row) => ({
|
|
|
6313
6323
|
is_store_build: row.is_store_build === true,
|
|
6314
6324
|
is_sandbox: row.is_sandbox === true,
|
|
6315
6325
|
sandbox_url_scheme: row.sandbox_url_scheme ?? null,
|
|
6316
|
-
export_method: row.export_method ?? null
|
|
6326
|
+
export_method: row.export_method ?? null,
|
|
6327
|
+
native_app_version: row.native_app_version ?? null
|
|
6317
6328
|
});
|
|
6318
6329
|
/** The export methods an `.ipa` registers with. */
|
|
6319
6330
|
const EXPORT_METHODS = /* @__PURE__ */ new Set([
|
|
@@ -6367,7 +6378,7 @@ const nativeBuildScopeKey = (scope) => {
|
|
|
6367
6378
|
};
|
|
6368
6379
|
/** Whether `bundleId` is a native build's built-in bundle: one unique read. */
|
|
6369
6380
|
const isBuiltInBundle = async (db, bundleId) => await db.findOne("native_builds", { min_bundle_id: bundleId }) !== null;
|
|
6370
|
-
const problemOf = ({ id, minBundleId, platform, channel, fingerprintHash, appVersion, gitCommitHash, buildKey, buildNumber, isSandbox, sandboxUrlScheme, exportMethod, artifact }) => {
|
|
6381
|
+
const problemOf = ({ id, minBundleId, platform, channel, fingerprintHash, appVersion, gitCommitHash, buildKey, buildNumber, isSandbox, sandboxUrlScheme, exportMethod, nativeAppVersion, artifact }) => {
|
|
6371
6382
|
if (!isUUIDv7(id)) return "id must be a UUIDv7";
|
|
6372
6383
|
if (!isUUIDv7(minBundleId)) return "minBundleId must be the UUIDv7 a release build compiles in";
|
|
6373
6384
|
if (platform !== "ios" && platform !== "android") return "platform must be ios or android";
|
|
@@ -6384,6 +6395,7 @@ const problemOf = ({ id, minBundleId, platform, channel, fingerprintHash, appVer
|
|
|
6384
6395
|
if (fingerprintHash === null === (appVersion === null)) return "exactly one of fingerprintHash and appVersion is required";
|
|
6385
6396
|
if (buildKey !== null && !BUILD_KEY.test(buildKey)) return "buildKey must be nbk1: and a SHA-256, or null";
|
|
6386
6397
|
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`;
|
|
6398
|
+
if (nativeAppVersion !== void 0 && nativeAppVersion !== null && (typeof nativeAppVersion !== "string" || nativeAppVersion.trim().length === 0)) return "nativeAppVersion must be the artifact's app version, or null";
|
|
6387
6399
|
const kinds = ARTIFACT_KINDS[platform];
|
|
6388
6400
|
if (!kinds.includes(artifact.kind)) return `artifact.kind of an ${platform} build must be ${kinds.join(" or ")}`;
|
|
6389
6401
|
if (exportMethod !== void 0 && exportMethod !== null) {
|
|
@@ -6422,7 +6434,8 @@ const createNativeBuildApi = (db, { now = Date.now } = {}) => ({
|
|
|
6422
6434
|
is_store_build: false,
|
|
6423
6435
|
is_sandbox: registration.isSandbox === true,
|
|
6424
6436
|
sandbox_url_scheme: registration.sandboxUrlScheme ?? null,
|
|
6425
|
-
export_method: registration.exportMethod ?? null
|
|
6437
|
+
export_method: registration.exportMethod ?? null,
|
|
6438
|
+
native_app_version: registration.nativeAppVersion ?? null
|
|
6426
6439
|
};
|
|
6427
6440
|
for (let attempt = 1;; attempt += 1) {
|
|
6428
6441
|
await insertChannel(db, {
|
|
@@ -7513,7 +7526,7 @@ const refusingInvalid = async (operation) => {
|
|
|
7513
7526
|
throw error;
|
|
7514
7527
|
}
|
|
7515
7528
|
};
|
|
7516
|
-
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));
|
|
7529
|
+
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));
|
|
7517
7530
|
const scopeKeyOf = (params) => decodeMaybe(requireRouteParam(params, "scopeKey")) ?? "";
|
|
7518
7531
|
/** Every admin route's handler, by the name `ADMIN_ROUTES` mounts it under. */
|
|
7519
7532
|
const createAdminRouteHandlers = () => ({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/aws",
|
|
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
|
"main": "dist/index.cjs",
|
|
7
7
|
"module": "dist/index.mjs",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"es-toolkit": "^1.32.0",
|
|
46
46
|
"execa": "9.5.2",
|
|
47
47
|
"mime": "^4.0.4",
|
|
48
|
-
"@hot-updater/protocol": "1.2.0-rc.
|
|
49
|
-
"@hot-updater/
|
|
50
|
-
"@hot-updater/
|
|
48
|
+
"@hot-updater/protocol": "1.2.0-rc.31",
|
|
49
|
+
"@hot-updater/test-utils": "1.2.0-rc.31",
|
|
50
|
+
"@hot-updater/mock": "1.2.0-rc.31"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@aws-sdk/client-cloudfront": "3.1066.0",
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
"@aws-sdk/lib-dynamodb": "3.1066.0",
|
|
65
65
|
"@aws-sdk/s3-request-presigner": "3.1066.0",
|
|
66
66
|
"hono": "4.12.34",
|
|
67
|
-
"@hot-updater/cli-tools": "1.2.0-rc.
|
|
68
|
-
"@hot-updater/plugin-core": "1.2.0-rc.
|
|
69
|
-
"@hot-updater/storage-s3": "1.2.0-rc.
|
|
70
|
-
"@hot-updater/server": "1.2.0-rc.
|
|
67
|
+
"@hot-updater/cli-tools": "1.2.0-rc.31",
|
|
68
|
+
"@hot-updater/plugin-core": "1.2.0-rc.31",
|
|
69
|
+
"@hot-updater/storage-s3": "1.2.0-rc.31",
|
|
70
|
+
"@hot-updater/server": "1.2.0-rc.31"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"build": "tsdown",
|