hot-updater 0.6.4 → 0.6.6

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 CHANGED
@@ -22989,44 +22989,6 @@ export default HotUpdater.wrap({
22989
22989
  throw new Error("Invalid provider");
22990
22990
  }
22991
22991
  };
22992
- const prune = async ()=>{
22993
- const s = prompts_namespaceObject.spinner();
22994
- try {
22995
- const config = await (0, plugin_core_namespaceObject.loadConfig)();
22996
- if (!config) {
22997
- console.error("No config found. Please run `hot-updater init` first.");
22998
- process.exit(1);
22999
- }
23000
- const cwd = (0, plugin_core_namespaceObject.getCwd)();
23001
- const databasePlugin = await config.database({
23002
- cwd
23003
- });
23004
- s.start("Checking existing updates");
23005
- const bundles = await databasePlugin.getBundles();
23006
- const activeBundles = bundles.filter((bundle)=>bundle.enabled);
23007
- const inactiveBundles = bundles.filter((bundle)=>!bundle.enabled);
23008
- if (0 === inactiveBundles.length) {
23009
- s.stop("No inactive versions found", -1);
23010
- return;
23011
- }
23012
- s.message("Pruning updates");
23013
- await databasePlugin.setBundles(activeBundles);
23014
- await databasePlugin.commitBundle();
23015
- await databasePlugin.onUnmount?.();
23016
- const storagePlugin = await config.storage({
23017
- cwd
23018
- });
23019
- for (const bundle of inactiveBundles){
23020
- const key = await storagePlugin.deleteBundle(bundle.id);
23021
- prompts_namespaceObject.log.info(`deleting: ${key}`);
23022
- }
23023
- s.stop("Done");
23024
- } catch (e) {
23025
- s.stop("Pruning Failed !", -1);
23026
- console.error(e);
23027
- process.exit(-1);
23028
- }
23029
- };
23030
22992
  const external_commander_namespaceObject = require("commander");
23031
22993
  const program = new external_commander_namespaceObject.Command();
23032
22994
  program.name("hot-updater").description(banner).version(packageJson_version);
@@ -23058,7 +23020,6 @@ export default HotUpdater.wrap({
23058
23020
  plugin_core_namespaceObject.log.info(`Android version: ${androidVersion}`);
23059
23021
  plugin_core_namespaceObject.log.info(`iOS version: ${iosVersion}`);
23060
23022
  });
23061
- program.command("prune").description("prune all the inactive versions").action(prune);
23062
23023
  program.parse(process.argv);
23063
23024
  })();
23064
23025
  var __webpack_export_target__ = exports;
package/dist/index.js CHANGED
@@ -22882,44 +22882,6 @@ const init_init = async ()=>{
22882
22882
  throw new Error("Invalid provider");
22883
22883
  }
22884
22884
  };
22885
- const prune = async ()=>{
22886
- const s = __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.spinner();
22887
- try {
22888
- const config = await (0, __WEBPACK_EXTERNAL_MODULE__hot_updater_plugin_core_40c1c502__.loadConfig)();
22889
- if (!config) {
22890
- console.error("No config found. Please run `hot-updater init` first.");
22891
- process.exit(1);
22892
- }
22893
- const cwd = (0, __WEBPACK_EXTERNAL_MODULE__hot_updater_plugin_core_40c1c502__.getCwd)();
22894
- const databasePlugin = await config.database({
22895
- cwd
22896
- });
22897
- s.start("Checking existing updates");
22898
- const bundles = await databasePlugin.getBundles();
22899
- const activeBundles = bundles.filter((bundle)=>bundle.enabled);
22900
- const inactiveBundles = bundles.filter((bundle)=>!bundle.enabled);
22901
- if (0 === inactiveBundles.length) {
22902
- s.stop("No inactive versions found", -1);
22903
- return;
22904
- }
22905
- s.message("Pruning updates");
22906
- await databasePlugin.setBundles(activeBundles);
22907
- await databasePlugin.commitBundle();
22908
- await databasePlugin.onUnmount?.();
22909
- const storagePlugin = await config.storage({
22910
- cwd
22911
- });
22912
- for (const bundle of inactiveBundles){
22913
- const key = await storagePlugin.deleteBundle(bundle.id);
22914
- __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.log.info(`deleting: ${key}`);
22915
- }
22916
- s.stop("Done");
22917
- } catch (e) {
22918
- s.stop("Pruning Failed !", -1);
22919
- console.error(e);
22920
- process.exit(-1);
22921
- }
22922
- };
22923
22885
  const program = new __WEBPACK_EXTERNAL_MODULE_commander__.Command();
22924
22886
  program.name("hot-updater").description(banner).version(packageJson_version);
22925
22887
  program.command("init").description("Initialize Hot Updater").action(init_init);
@@ -22950,5 +22912,4 @@ program.command("app-version").description("get the current app version").action
22950
22912
  __WEBPACK_EXTERNAL_MODULE__hot_updater_plugin_core_40c1c502__.log.info(`Android version: ${androidVersion}`);
22951
22913
  __WEBPACK_EXTERNAL_MODULE__hot_updater_plugin_core_40c1c502__.log.info(`iOS version: ${iosVersion}`);
22952
22914
  });
22953
- program.command("prune").description("prune all the inactive versions").action(prune);
22954
22915
  program.parse(process.argv);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hot-updater",
3
3
  "type": "module",
4
- "version": "0.6.4",
4
+ "version": "0.6.6",
5
5
  "bin": {
6
6
  "hot-updater": "./dist/index.js"
7
7
  },
@@ -49,9 +49,9 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@clack/prompts": "^0.9.0",
52
- "@hot-updater/console": "0.6.4",
53
- "@hot-updater/core": "0.6.4",
54
- "@hot-updater/plugin-core": "0.6.4",
52
+ "@hot-updater/console": "0.6.6",
53
+ "@hot-updater/core": "0.6.6",
54
+ "@hot-updater/plugin-core": "0.6.6",
55
55
  "commander": "^11.1.0",
56
56
  "cosmiconfig": "^9.0.0",
57
57
  "cosmiconfig-typescript-loader": "^5.0.0"
@@ -1 +0,0 @@
1
- export declare const prune: () => Promise<void>;