hot-updater 0.35.1 → 0.35.2
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.mjs +28 -12
- package/package.json +14 -14
package/dist/index.mjs
CHANGED
|
@@ -31228,20 +31228,32 @@ const handleBundleUpdate = async (bundleId, options = {}) => {
|
|
|
31228
31228
|
await safeOnUnmount$2(databasePlugin);
|
|
31229
31229
|
}
|
|
31230
31230
|
};
|
|
31231
|
-
const handleBundleDelete = async (
|
|
31231
|
+
const handleBundleDelete = async (bundleIds, options = {}) => {
|
|
31232
31232
|
printBanner$1();
|
|
31233
|
+
const ids = bundleIds ?? [];
|
|
31234
|
+
if (ids.length === 0) {
|
|
31235
|
+
p.log.error("Provide at least one bundle id.");
|
|
31236
|
+
process.exit(1);
|
|
31237
|
+
}
|
|
31233
31238
|
const databasePlugin = await (await loadConfig(null)).database();
|
|
31234
31239
|
try {
|
|
31235
|
-
const
|
|
31236
|
-
|
|
31237
|
-
|
|
31240
|
+
const fetched = await Promise.all(ids.map((id) => databasePlugin.getBundleById(id)));
|
|
31241
|
+
const targets = [];
|
|
31242
|
+
fetched.forEach((bundle, index) => {
|
|
31243
|
+
if (bundle) targets.push(bundle);
|
|
31244
|
+
else p.log.info(`No bundle with id ${ids[index]}. Skipping.`);
|
|
31245
|
+
});
|
|
31246
|
+
if (targets.length === 0) {
|
|
31247
|
+
p.log.info("No matching bundle records. No changes.");
|
|
31238
31248
|
return;
|
|
31239
31249
|
}
|
|
31240
|
-
|
|
31250
|
+
const [firstTarget] = targets;
|
|
31251
|
+
if (firstTarget && targets.length === 1) p.log.message(formatBundleSummary(firstTarget));
|
|
31252
|
+
else p.log.message(`${targets.length} bundle records will be deleted.`);
|
|
31241
31253
|
if (!options.yes) {
|
|
31242
31254
|
if (!process.stdin.isTTY) refuseNonInteractiveMutation("delete");
|
|
31243
31255
|
const confirmed = await p.confirm({
|
|
31244
|
-
message: "Delete this bundle record?"
|
|
31256
|
+
message: targets.length === 1 ? "Delete this bundle record?" : `Delete ${targets.length} bundle records?`,
|
|
31245
31257
|
initialValue: false
|
|
31246
31258
|
});
|
|
31247
31259
|
if (p.isCancel(confirmed) || !confirmed) {
|
|
@@ -31249,14 +31261,18 @@ const handleBundleDelete = async (bundleId, options = {}) => {
|
|
|
31249
31261
|
process.exit(2);
|
|
31250
31262
|
}
|
|
31251
31263
|
}
|
|
31252
|
-
await databasePlugin.deleteBundle(bundle);
|
|
31264
|
+
for (const bundle of targets) await databasePlugin.deleteBundle(bundle);
|
|
31253
31265
|
await databasePlugin.commitBundle();
|
|
31254
|
-
|
|
31255
|
-
|
|
31266
|
+
const stillPresent = [];
|
|
31267
|
+
for (const bundle of targets) if (!await waitForDeletedBundle(databasePlugin, bundle.id)) stillPresent.push(bundle.id);
|
|
31268
|
+
if (stillPresent.length > 0) {
|
|
31269
|
+
p.log.error(`Verification failed: ${stillPresent.length} bundle record(s) still exist (${stillPresent.join(", ")}).`);
|
|
31256
31270
|
process.exit(1);
|
|
31257
31271
|
}
|
|
31258
|
-
|
|
31259
|
-
|
|
31272
|
+
if (firstTarget && targets.length === 1) {
|
|
31273
|
+
p.log.success("Deleted bundle record.");
|
|
31274
|
+
p.log.info(` ${ui.id(firstTarget.id)}`);
|
|
31275
|
+
} else p.log.success(`Deleted ${targets.length} bundle records.`);
|
|
31260
31276
|
} finally {
|
|
31261
31277
|
await safeOnUnmount$2(databasePlugin);
|
|
31262
31278
|
}
|
|
@@ -54632,7 +54648,7 @@ bundleCommand.command("show").description("Show one bundle by id").argument("<bu
|
|
|
54632
54648
|
bundleCommand.command("disable").description("Disable a bundle by id").argument("<bundle-id>", "the id of the bundle to disable").option("-y, --yes", "skip confirmation prompt").action((bundleId, options) => handleBundleSetEnabled(bundleId, false, options));
|
|
54633
54649
|
bundleCommand.command("enable").description("Re-enable a previously disabled bundle by id").argument("<bundle-id>", "the id of the bundle to enable").option("-y, --yes", "skip confirmation prompt").action((bundleId, options) => handleBundleSetEnabled(bundleId, true, options));
|
|
54634
54650
|
bundleCommand.command("update").description("Update bundle rollout and targeting metadata").argument("<bundle-id>", "the bundle id to update").option("--rollout-cohort-count <count>", "rollout cohort count from 0 to 1000", parseRolloutCohortCount).option("--force-update <value>", "set force update flag (true or false)", parseBooleanOption).option("--target-cohorts <cohorts>", "comma-separated target cohorts").option("--clear-target-cohorts", "clear target cohorts").option("--json", "output the updated bundle as JSON").option("-y, --yes", "skip confirmation prompt").action(handleBundleUpdate);
|
|
54635
|
-
bundleCommand.command("delete").description("Delete
|
|
54651
|
+
bundleCommand.command("delete").description("Delete one or more bundle records by id").argument("<bundle-ids...>", "the bundle id(s) to delete").option("-y, --yes", "skip confirmation prompt").action((bundleIds, options) => handleBundleDelete(bundleIds, options));
|
|
54636
54652
|
bundleCommand.command("promote").description("Move or copy a bundle to a different channel").argument("<bundle-id>", "the id of the bundle to promote").requiredOption("-t, --target <channel>", "channel to promote the bundle to").addOption(new Option("-a, --action <action>", "promote action (copy creates a new bundle id; move keeps the id)").choices(["copy", "move"]).default("copy")).option("-y, --yes", "skip confirmation prompt").action((bundleId, options) => handlePromote(bundleId, options));
|
|
54637
54653
|
const keysCommand = program.command("keys").description("Code signing key management");
|
|
54638
54654
|
keysCommand.command("generate").description("Generate RSA key pair for code signing").option("-o, --output <dir>", "output directory for keys", "./keys").option("-k, --key-size <size>", "key size (2048 or 4096)", (value) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hot-updater",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.35.
|
|
4
|
+
"version": "0.35.2",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.19.0"
|
|
7
7
|
},
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"jiti": "2.6.1",
|
|
52
|
-
"@hot-updater/
|
|
53
|
-
"@hot-updater/
|
|
54
|
-
"@hot-updater/
|
|
55
|
-
"@hot-updater/
|
|
56
|
-
"@hot-updater/
|
|
57
|
-
"@hot-updater/
|
|
58
|
-
"@hot-updater/
|
|
52
|
+
"@hot-updater/apple-helper": "0.35.2",
|
|
53
|
+
"@hot-updater/console": "0.35.2",
|
|
54
|
+
"@hot-updater/core": "0.35.2",
|
|
55
|
+
"@hot-updater/cli-tools": "0.35.2",
|
|
56
|
+
"@hot-updater/plugin-core": "0.35.2",
|
|
57
|
+
"@hot-updater/server": "0.35.2",
|
|
58
|
+
"@hot-updater/android-helper": "0.35.2"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@bacons/xcode": "1.0.0-alpha.24",
|
|
@@ -78,12 +78,12 @@
|
|
|
78
78
|
"tsdown": "0.21.6",
|
|
79
79
|
"sql-formatter": "15.6.10",
|
|
80
80
|
"typescript": "6.0.2",
|
|
81
|
-
"@hot-updater/aws": "0.35.
|
|
82
|
-
"@hot-updater/cloudflare": "0.35.
|
|
83
|
-
"@hot-updater/
|
|
84
|
-
"@hot-updater/
|
|
85
|
-
"@hot-updater/
|
|
86
|
-
"@hot-updater/
|
|
81
|
+
"@hot-updater/aws": "0.35.2",
|
|
82
|
+
"@hot-updater/cloudflare": "0.35.2",
|
|
83
|
+
"@hot-updater/firebase": "0.35.2",
|
|
84
|
+
"@hot-updater/server": "0.35.2",
|
|
85
|
+
"@hot-updater/test-utils": "0.35.2",
|
|
86
|
+
"@hot-updater/supabase": "0.35.2"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"@expo/fingerprint": "*",
|