hot-updater 0.29.2 → 0.29.4
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/index.cjs +11 -12
- package/dist/index.mjs +12 -13
- package/package.json +14 -14
package/dist/index.cjs
CHANGED
|
@@ -35215,8 +35215,6 @@ const deploy = async (options) => {
|
|
|
35215
35215
|
appVersion: null,
|
|
35216
35216
|
fingerprintHash: null
|
|
35217
35217
|
};
|
|
35218
|
-
_hot_updater_cli_tools.p.log.step(`Channel: ${channel}`);
|
|
35219
|
-
_hot_updater_cli_tools.p.log.step(`Rollout: ${rolloutPercentage}%`);
|
|
35220
35218
|
if (config.updateStrategy === "fingerprint") {
|
|
35221
35219
|
const s = _hot_updater_cli_tools.p.spinner();
|
|
35222
35220
|
s.start(`Fingerprinting (${platform})`);
|
|
@@ -35258,7 +35256,6 @@ const deploy = async (options) => {
|
|
|
35258
35256
|
_hot_updater_cli_tools.p.log.error("Target app version not found. -t <targetAppVersion> semver format (e.g. 1.0.0, 1.x.x)");
|
|
35259
35257
|
return;
|
|
35260
35258
|
}
|
|
35261
|
-
_hot_updater_cli_tools.p.log.info(`Target app version: ${(0, import_valid.default)(targetAppVersion)}`);
|
|
35262
35259
|
target.appVersion = targetAppVersion;
|
|
35263
35260
|
}
|
|
35264
35261
|
if (!target.fingerprintHash && !target.appVersion) {
|
|
@@ -35266,6 +35263,12 @@ const deploy = async (options) => {
|
|
|
35266
35263
|
else _hot_updater_cli_tools.p.log.error("Target app version not found. -t <targetAppVersion> semver format (e.g. 1.0.0, 1.x.x)");
|
|
35267
35264
|
process.exit(1);
|
|
35268
35265
|
}
|
|
35266
|
+
const deploymentContext = [
|
|
35267
|
+
`Channel: ${channel}`,
|
|
35268
|
+
`Rollout: ${rolloutPercentage}%`,
|
|
35269
|
+
config.updateStrategy === "fingerprint" ? `Fingerprint: ${target.fingerprintHash}` : `Target app version: ${(0, import_valid.default)(target.appVersion)}`
|
|
35270
|
+
].join("\n");
|
|
35271
|
+
_hot_updater_cli_tools.p.note(deploymentContext, "Deployment");
|
|
35269
35272
|
if (appendToProjectRootGitignore({ globLines: [_hot_updater_cli_tools.HotUpdateDirUtil.outputGitignorePath] })) _hot_updater_cli_tools.p.log.info(".gitignore has been modified");
|
|
35270
35273
|
const outputPath = options.bundleOutputPath ?? _hot_updater_cli_tools.HotUpdateDirUtil.getDefaultOutputPath({ cwd });
|
|
35271
35274
|
let bundleId = null;
|
|
@@ -35327,23 +35330,19 @@ const deploy = async (options) => {
|
|
|
35327
35330
|
fileHash = await getFileHashFromFile(bundlePath);
|
|
35328
35331
|
if (config.signing?.enabled) {
|
|
35329
35332
|
if (!config.signing.privateKeyPath) throw new Error("privateKeyPath is required when signing is enabled. Please provide a valid path to your RSA private key in hot-updater.config.ts");
|
|
35330
|
-
const s = _hot_updater_cli_tools.p.spinner();
|
|
35331
|
-
s.start("Signing bundle");
|
|
35332
35333
|
try {
|
|
35333
35334
|
fileHash = createSignedFileHash(await signBundle(fileHash, config.signing.privateKeyPath));
|
|
35334
|
-
s.stop("Bundle signed successfully");
|
|
35335
35335
|
} catch (error) {
|
|
35336
|
-
s.error("Failed to sign bundle");
|
|
35337
35336
|
_hot_updater_cli_tools.p.log.error(`Signing error: ${error.message}`);
|
|
35338
35337
|
_hot_updater_cli_tools.p.log.error("Ensure private key path is correct and file has proper permissions");
|
|
35339
35338
|
throw error;
|
|
35340
35339
|
}
|
|
35341
35340
|
}
|
|
35342
|
-
_hot_updater_cli_tools.p.log.success(`Bundle stored at ${_hot_updater_cli_tools.colors.blueBright(path.default.relative(cwd, bundlePath))}`);
|
|
35343
35341
|
return `✅ Build Complete (${buildPlugin.name})`;
|
|
35344
35342
|
}
|
|
35345
35343
|
}]);
|
|
35346
|
-
if (taskRef.buildResult?.stdout) _hot_updater_cli_tools.p.
|
|
35344
|
+
if (taskRef.buildResult?.stdout) _hot_updater_cli_tools.p.note(taskRef.buildResult.stdout.trim(), "Build Output");
|
|
35345
|
+
if (config.signing?.enabled) _hot_updater_cli_tools.p.log.success("✅ Bundle Signing Complete");
|
|
35347
35346
|
await _hot_updater_cli_tools.p.tasks([{
|
|
35348
35347
|
title: `📦 Uploading to Storage (${storagePlugin.name})`,
|
|
35349
35348
|
task: async () => {
|
|
@@ -35376,7 +35375,7 @@ const deploy = async (options) => {
|
|
|
35376
35375
|
targetAppVersion: target.appVersion,
|
|
35377
35376
|
fingerprintHash: target.fingerprintHash,
|
|
35378
35377
|
storageUri: taskRef.storageUri,
|
|
35379
|
-
metadata:
|
|
35378
|
+
metadata: appVersion ? { app_version: appVersion } : {},
|
|
35380
35379
|
rolloutCohortCount
|
|
35381
35380
|
});
|
|
35382
35381
|
await databasePlugin.commitBundle();
|
|
@@ -35409,7 +35408,7 @@ const deploy = async (options) => {
|
|
|
35409
35408
|
} else open(url);
|
|
35410
35409
|
_hot_updater_cli_tools.p.note(note);
|
|
35411
35410
|
}
|
|
35412
|
-
_hot_updater_cli_tools.p.outro(
|
|
35411
|
+
_hot_updater_cli_tools.p.outro(`🚀 Deployment Successful (${bundleId})`);
|
|
35413
35412
|
} catch (e) {
|
|
35414
35413
|
await databasePlugin.onUnmount?.();
|
|
35415
35414
|
await fs.default.promises.rm(bundlePath, { force: true });
|
|
@@ -35630,7 +35629,7 @@ function hasExpoUpdates() {
|
|
|
35630
35629
|
const dependencies = packageJson.dependencies || {};
|
|
35631
35630
|
const devDependencies = packageJson.devDependencies || {};
|
|
35632
35631
|
return !!dependencies["expo-updates"] || !!devDependencies["expo-updates"];
|
|
35633
|
-
} catch
|
|
35632
|
+
} catch {
|
|
35634
35633
|
return false;
|
|
35635
35634
|
}
|
|
35636
35635
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -29096,7 +29096,7 @@ async function prepareNativeBuild(options) {
|
|
|
29096
29096
|
return null;
|
|
29097
29097
|
}
|
|
29098
29098
|
//#endregion
|
|
29099
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.6_synckit@0.11.11_typescript@
|
|
29099
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.6_synckit@0.11.11_typescript@6.0.2/node_modules/tsdown/esm-shims.js
|
|
29100
29100
|
const getFilename = () => fileURLToPath(import.meta.url);
|
|
29101
29101
|
const getDirname = () => path.dirname(getFilename());
|
|
29102
29102
|
const __dirname$1 = /* @__PURE__ */ getDirname();
|
|
@@ -35198,8 +35198,6 @@ const deploy = async (options) => {
|
|
|
35198
35198
|
appVersion: null,
|
|
35199
35199
|
fingerprintHash: null
|
|
35200
35200
|
};
|
|
35201
|
-
p.log.step(`Channel: ${channel}`);
|
|
35202
|
-
p.log.step(`Rollout: ${rolloutPercentage}%`);
|
|
35203
35201
|
if (config.updateStrategy === "fingerprint") {
|
|
35204
35202
|
const s = p.spinner();
|
|
35205
35203
|
s.start(`Fingerprinting (${platform})`);
|
|
@@ -35241,7 +35239,6 @@ const deploy = async (options) => {
|
|
|
35241
35239
|
p.log.error("Target app version not found. -t <targetAppVersion> semver format (e.g. 1.0.0, 1.x.x)");
|
|
35242
35240
|
return;
|
|
35243
35241
|
}
|
|
35244
|
-
p.log.info(`Target app version: ${(0, import_valid.default)(targetAppVersion)}`);
|
|
35245
35242
|
target.appVersion = targetAppVersion;
|
|
35246
35243
|
}
|
|
35247
35244
|
if (!target.fingerprintHash && !target.appVersion) {
|
|
@@ -35249,6 +35246,12 @@ const deploy = async (options) => {
|
|
|
35249
35246
|
else p.log.error("Target app version not found. -t <targetAppVersion> semver format (e.g. 1.0.0, 1.x.x)");
|
|
35250
35247
|
process.exit(1);
|
|
35251
35248
|
}
|
|
35249
|
+
const deploymentContext = [
|
|
35250
|
+
`Channel: ${channel}`,
|
|
35251
|
+
`Rollout: ${rolloutPercentage}%`,
|
|
35252
|
+
config.updateStrategy === "fingerprint" ? `Fingerprint: ${target.fingerprintHash}` : `Target app version: ${(0, import_valid.default)(target.appVersion)}`
|
|
35253
|
+
].join("\n");
|
|
35254
|
+
p.note(deploymentContext, "Deployment");
|
|
35252
35255
|
if (appendToProjectRootGitignore({ globLines: [HotUpdateDirUtil.outputGitignorePath] })) p.log.info(".gitignore has been modified");
|
|
35253
35256
|
const outputPath = options.bundleOutputPath ?? HotUpdateDirUtil.getDefaultOutputPath({ cwd });
|
|
35254
35257
|
let bundleId = null;
|
|
@@ -35310,23 +35313,19 @@ const deploy = async (options) => {
|
|
|
35310
35313
|
fileHash = await getFileHashFromFile(bundlePath);
|
|
35311
35314
|
if (config.signing?.enabled) {
|
|
35312
35315
|
if (!config.signing.privateKeyPath) throw new Error("privateKeyPath is required when signing is enabled. Please provide a valid path to your RSA private key in hot-updater.config.ts");
|
|
35313
|
-
const s = p.spinner();
|
|
35314
|
-
s.start("Signing bundle");
|
|
35315
35316
|
try {
|
|
35316
35317
|
fileHash = createSignedFileHash(await signBundle(fileHash, config.signing.privateKeyPath));
|
|
35317
|
-
s.stop("Bundle signed successfully");
|
|
35318
35318
|
} catch (error) {
|
|
35319
|
-
s.error("Failed to sign bundle");
|
|
35320
35319
|
p.log.error(`Signing error: ${error.message}`);
|
|
35321
35320
|
p.log.error("Ensure private key path is correct and file has proper permissions");
|
|
35322
35321
|
throw error;
|
|
35323
35322
|
}
|
|
35324
35323
|
}
|
|
35325
|
-
p.log.success(`Bundle stored at ${colors.blueBright(path$1.relative(cwd, bundlePath))}`);
|
|
35326
35324
|
return `✅ Build Complete (${buildPlugin.name})`;
|
|
35327
35325
|
}
|
|
35328
35326
|
}]);
|
|
35329
|
-
if (taskRef.buildResult?.stdout) p.
|
|
35327
|
+
if (taskRef.buildResult?.stdout) p.note(taskRef.buildResult.stdout.trim(), "Build Output");
|
|
35328
|
+
if (config.signing?.enabled) p.log.success("✅ Bundle Signing Complete");
|
|
35330
35329
|
await p.tasks([{
|
|
35331
35330
|
title: `📦 Uploading to Storage (${storagePlugin.name})`,
|
|
35332
35331
|
task: async () => {
|
|
@@ -35359,7 +35358,7 @@ const deploy = async (options) => {
|
|
|
35359
35358
|
targetAppVersion: target.appVersion,
|
|
35360
35359
|
fingerprintHash: target.fingerprintHash,
|
|
35361
35360
|
storageUri: taskRef.storageUri,
|
|
35362
|
-
metadata:
|
|
35361
|
+
metadata: appVersion ? { app_version: appVersion } : {},
|
|
35363
35362
|
rolloutCohortCount
|
|
35364
35363
|
});
|
|
35365
35364
|
await databasePlugin.commitBundle();
|
|
@@ -35392,7 +35391,7 @@ const deploy = async (options) => {
|
|
|
35392
35391
|
} else open(url);
|
|
35393
35392
|
p.note(note);
|
|
35394
35393
|
}
|
|
35395
|
-
p.outro(
|
|
35394
|
+
p.outro(`🚀 Deployment Successful (${bundleId})`);
|
|
35396
35395
|
} catch (e) {
|
|
35397
35396
|
await databasePlugin.onUnmount?.();
|
|
35398
35397
|
await fs$1.promises.rm(bundlePath, { force: true });
|
|
@@ -35613,7 +35612,7 @@ function hasExpoUpdates() {
|
|
|
35613
35612
|
const dependencies = packageJson.dependencies || {};
|
|
35614
35613
|
const devDependencies = packageJson.devDependencies || {};
|
|
35615
35614
|
return !!dependencies["expo-updates"] || !!devDependencies["expo-updates"];
|
|
35616
|
-
} catch
|
|
35615
|
+
} catch {
|
|
35617
35616
|
return false;
|
|
35618
35617
|
}
|
|
35619
35618
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hot-updater",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.29.
|
|
4
|
+
"version": "0.29.4",
|
|
5
5
|
"bin": {
|
|
6
6
|
"hot-updater": "./dist/index.cjs"
|
|
7
7
|
},
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"jiti": "2.6.1",
|
|
48
48
|
"kysely": "0.28.9",
|
|
49
49
|
"sql-formatter": "15.6.10",
|
|
50
|
-
"@hot-updater/android-helper": "0.29.
|
|
51
|
-
"@hot-updater/apple-helper": "0.29.
|
|
52
|
-
"@hot-updater/cli-tools": "0.29.
|
|
53
|
-
"@hot-updater/
|
|
54
|
-
"@hot-updater/core": "0.29.
|
|
55
|
-
"@hot-updater/
|
|
56
|
-
"@hot-updater/
|
|
50
|
+
"@hot-updater/android-helper": "0.29.4",
|
|
51
|
+
"@hot-updater/apple-helper": "0.29.4",
|
|
52
|
+
"@hot-updater/cli-tools": "0.29.4",
|
|
53
|
+
"@hot-updater/core": "0.29.4",
|
|
54
|
+
"@hot-updater/plugin-core": "0.29.4",
|
|
55
|
+
"@hot-updater/server": "0.29.4",
|
|
56
|
+
"@hot-updater/console": "0.29.4"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@bacons/xcode": "1.0.0-alpha.24",
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
"plist": "^3.1.0",
|
|
73
73
|
"read-package-up": "^11.0.0",
|
|
74
74
|
"semver": "^7.6.3",
|
|
75
|
-
"@hot-updater/aws": "0.29.
|
|
76
|
-
"@hot-updater/cloudflare": "0.29.
|
|
77
|
-
"@hot-updater/
|
|
78
|
-
"@hot-updater/
|
|
79
|
-
"@hot-updater/supabase": "0.29.
|
|
80
|
-
"@hot-updater/test-utils": "0.29.
|
|
75
|
+
"@hot-updater/aws": "0.29.4",
|
|
76
|
+
"@hot-updater/cloudflare": "0.29.4",
|
|
77
|
+
"@hot-updater/server": "0.29.4",
|
|
78
|
+
"@hot-updater/firebase": "0.29.4",
|
|
79
|
+
"@hot-updater/supabase": "0.29.4",
|
|
80
|
+
"@hot-updater/test-utils": "0.29.4"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"@hot-updater/aws": "*",
|