@todesktop/cli 1.6.0 → 1.6.2-0

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/cli.js CHANGED
@@ -20,7 +20,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
20
20
 
21
21
  // src/index.ts
22
22
  var import_commander = require("commander");
23
- var import_ink32 = require("ink");
23
+ var import_ink33 = require("ink");
24
24
  var import_react21 = require("react");
25
25
  var import_register = require("source-map-support/register");
26
26
 
@@ -197,10 +197,14 @@ if (fs2.existsSync(oldConfigPath)) {
197
197
  var import_pkg_up = __toESM(require("pkg-up"));
198
198
 
199
199
  // src/utilities/readJson.ts
200
- var readJson_default = (filePath) => require(filePath);
200
+ function readJson(filePath) {
201
+ return require(filePath);
202
+ }
201
203
 
202
204
  // src/utilities/getToDesktopPackageJson.ts
203
- var packageJson = readJson_default(import_pkg_up.default.sync({ cwd: __dirname }));
205
+ var packageJson = readJson(
206
+ import_pkg_up.default.sync({ cwd: __dirname })
207
+ );
204
208
  function getToDesktopPackageJson() {
205
209
  return packageJson;
206
210
  }
@@ -961,11 +965,16 @@ var import_fs = require("fs");
961
965
  var import_find_up = __toESM(require("find-up"));
962
966
 
963
967
  // src/utilities/projectConfig/loadConfig.ts
964
- var loadConfig_default = (configPath) => require(configPath);
968
+ function loadConfig(configPath) {
969
+ return require(configPath);
970
+ }
965
971
 
966
972
  // src/utilities/projectConfig/resolveConfigPaths.ts
967
973
  var path5 = __toESM(require("path"));
968
- var resolveConfigPaths_default = ({ config: config2, projectRoot }) => {
974
+ function resolveConfigPaths({
975
+ config: config2,
976
+ projectRoot
977
+ }) {
969
978
  const appRoot = config2.appPath ? path5.isAbsolute(config2.appPath) ? config2.appPath : path5.join(projectRoot, config2.appPath) : projectRoot;
970
979
  const transformIfExists = (value, transformer) => value ? transformer(value) : void 0;
971
980
  const resolvePath = (filePath) => path5.isAbsolute(filePath) ? filePath : path5.join(projectRoot, filePath);
@@ -1019,7 +1028,7 @@ var resolveConfigPaths_default = ({ config: config2, projectRoot }) => {
1019
1028
  }
1020
1029
  }
1021
1030
  return result;
1022
- };
1031
+ }
1023
1032
 
1024
1033
  // src/utilities/projectConfig/validateConfig.ts
1025
1034
  var import_ajv3 = __toESM(require("ajv"));
@@ -1603,6 +1612,10 @@ var full_default = (context) => {
1603
1612
  }
1604
1613
  }
1605
1614
  },
1615
+ packageManager: {
1616
+ type: "string",
1617
+ enum: ["npm", "yarn", "pnpm"]
1618
+ },
1606
1619
  schemaVersion: { type: "number", minimum: 1, maximum: 1 },
1607
1620
  snap: {
1608
1621
  type: "object",
@@ -1693,7 +1706,10 @@ var full_default = (context) => {
1693
1706
  };
1694
1707
 
1695
1708
  // src/utilities/projectConfig/validateConfig.ts
1696
- var validateConfig_default = ({ config: config2, projectRoot }) => {
1709
+ function validateConfig({
1710
+ config: config2,
1711
+ projectRoot
1712
+ }) {
1697
1713
  const context = { projectRoot };
1698
1714
  const schema = full_default(context);
1699
1715
  const ajv = new import_ajv3.default({ allErrors: true });
@@ -1720,19 +1736,19 @@ The "productName" property is no longer supported in todesktop.json. Please remo
1720
1736
  We made this change because Electron also uses the "productName" if it exists in your app's package.json. If you do not add it to your package.json, your app name will default to the value of the "name" property in your package.json.`
1721
1737
  );
1722
1738
  }
1723
- };
1739
+ }
1724
1740
 
1725
1741
  // src/utilities/projectConfig/computeFullProjectConfig.ts
1726
1742
  var import_path4 = require("path");
1727
1743
  var import_lodash2 = __toESM(require("lodash.merge"));
1728
- var computeFullProjectConfig = (partialConfig, projectRoot) => {
1744
+ function computeFullProjectConfig(partialConfig, projectRoot) {
1729
1745
  if (!partialConfig.extends) {
1730
1746
  logger_default.debug("No extends field, returning partial config");
1731
1747
  return partialConfig;
1732
1748
  } else {
1733
1749
  logger_default.debug("Extends field found, resolving");
1734
1750
  const parentConfigPath = (0, import_path4.resolve)(projectRoot, partialConfig.extends);
1735
- const parentConfig = loadConfig_default(parentConfigPath);
1751
+ const parentConfig = loadConfig(parentConfigPath);
1736
1752
  const parentFullConfig = computeFullProjectConfig(
1737
1753
  parentConfig,
1738
1754
  projectRoot
@@ -1741,11 +1757,10 @@ var computeFullProjectConfig = (partialConfig, projectRoot) => {
1741
1757
  delete result.extends;
1742
1758
  return result;
1743
1759
  }
1744
- };
1745
- var computeFullProjectConfig_default = computeFullProjectConfig;
1760
+ }
1746
1761
 
1747
1762
  // src/utilities/projectConfig/getProjectConfig.ts
1748
- var getProjectConfig_default = (configPath = null) => {
1763
+ function getProjectConfig(configPath = null) {
1749
1764
  if (configPath === null) {
1750
1765
  logger_default.debug("No config path provided, searching for one");
1751
1766
  configPath = import_find_up.default.sync("todesktop.json");
@@ -1766,13 +1781,13 @@ var getProjectConfig_default = (configPath = null) => {
1766
1781
  }
1767
1782
  }
1768
1783
  const projectRoot = (0, import_path5.dirname)(configPath);
1769
- const partialConfig = loadConfig_default(configPath);
1784
+ const partialConfig = loadConfig(configPath);
1770
1785
  partialConfig.appPath = partialConfig.appPath || ".";
1771
- const config2 = computeFullProjectConfig_default(partialConfig, projectRoot);
1772
- validateConfig_default({ config: config2, projectRoot });
1773
- const result = resolveConfigPaths_default({ config: config2, projectRoot });
1786
+ const config2 = computeFullProjectConfig(partialConfig, projectRoot);
1787
+ validateConfig({ config: config2, projectRoot });
1788
+ const result = resolveConfigPaths({ config: config2, projectRoot });
1774
1789
  return { config: result, unprocessedConfig: config2, projectRoot };
1775
- };
1790
+ }
1776
1791
 
1777
1792
  // src/utilities/postToFirebaseFunction.ts
1778
1793
  var import_axios = __toESM(require("axios"));
@@ -2141,7 +2156,7 @@ function removeNullDependencies(pkgJson) {
2141
2156
  function getAppPkgJson({ config: config2 }) {
2142
2157
  const packageJsonFromConfig = config2.packageJson || {};
2143
2158
  const extendsFrom = packageJsonFromConfig.extends || "package.json";
2144
- const packageJsonFromFile = readJson_default(import_path7.default.join(config2.appPath, extendsFrom));
2159
+ const packageJsonFromFile = readJson(import_path7.default.join(config2.appPath, extendsFrom));
2145
2160
  return removeNullDependencies(
2146
2161
  (0, import_lodash3.default)({}, packageJsonFromFile, packageJsonFromConfig)
2147
2162
  );
@@ -2152,7 +2167,7 @@ var getPackageJson_default = getAppPkgJson;
2152
2167
  var runBuild_default = async ({ onEvent, shouldCodeSign = true, configPath }) => {
2153
2168
  logForCI_default("Getting application information...");
2154
2169
  const primaryUserId = currentUser().uid;
2155
- const { config: config2, unprocessedConfig } = getProjectConfig_default(configPath);
2170
+ const { config: config2, unprocessedConfig } = getProjectConfig(configPath);
2156
2171
  const appId = config2.id;
2157
2172
  const appPkgJson = getPackageJson_default({ config: config2 });
2158
2173
  onEvent("progress", {
@@ -2358,7 +2373,7 @@ var checkIfReactIsUsable_default = ({ cons = console, proc = process } = {}) =>
2358
2373
  };
2359
2374
 
2360
2375
  // src/components/LoginHOC.tsx
2361
- var import_ink15 = require("ink");
2376
+ var import_ink16 = require("ink");
2362
2377
  var import_react10 = require("react");
2363
2378
  var import_prop_types11 = __toESM(require("prop-types"));
2364
2379
  var import_is_ci4 = __toESM(require("is-ci"));
@@ -2488,13 +2503,28 @@ Login.propTypes = {
2488
2503
  };
2489
2504
  var Login_default = Login;
2490
2505
 
2491
- // src/components/LoginHOC.tsx
2506
+ // src/components/LoadingText.tsx
2507
+ var import_ink15 = require("ink");
2492
2508
  var import_jsx_runtime16 = require("react/jsx-runtime");
2509
+ var LoadingText = () => {
2510
+ const { stdout } = (0, import_ink15.useStdout)();
2511
+ const stdOutRedirected = !stdout.isTTY;
2512
+ if (stdOutRedirected) {
2513
+ return null;
2514
+ }
2515
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_ink15.Text, { children: "Loading..." });
2516
+ };
2517
+ var LoadingText_default = LoadingText;
2518
+
2519
+ // src/components/LoginHOC.tsx
2520
+ var import_jsx_runtime17 = require("react/jsx-runtime");
2493
2521
  var LoginHOC = ({ children, isInteractive = true }) => {
2494
2522
  const [isLoggedIn, setIsLoggedIn] = (0, import_react10.useState)(false);
2495
2523
  const [isEffectDone, setEffectDone] = (0, import_react10.useState)(false);
2496
2524
  const [error, setError] = (0, import_react10.useState)(null);
2497
- const { isRawModeSupported } = (0, import_ink15.useStdin)();
2525
+ const { isRawModeSupported } = (0, import_ink16.useStdin)();
2526
+ const { stdout } = (0, import_ink16.useStdout)();
2527
+ const stdOutRedirected = !stdout.isTTY;
2498
2528
  const onFailure = (message2, err = {}) => {
2499
2529
  setError({
2500
2530
  ...err,
@@ -2556,15 +2586,15 @@ var LoginHOC = ({ children, isInteractive = true }) => {
2556
2586
  isAccessTokenValid();
2557
2587
  }, []);
2558
2588
  if (error && isInteractive) {
2559
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ErrorDisplay_default, { error });
2589
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ErrorDisplay_default, { error });
2560
2590
  }
2561
2591
  if (!isEffectDone) {
2562
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_ink15.Text, { children: "..." });
2592
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(LoadingText_default, {});
2563
2593
  }
2564
2594
  if (!isLoggedIn && isInteractive) {
2565
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Login_default, { setIsLoggedIn });
2595
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Login_default, { setIsLoggedIn });
2566
2596
  }
2567
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children });
2597
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, { children });
2568
2598
  };
2569
2599
  LoginHOC.propTypes = {
2570
2600
  children: import_prop_types11.default.object,
@@ -2600,26 +2630,26 @@ var ErrorBoundary = class extends import_react11.default.Component {
2600
2630
  var ErrorBoundary_default = ErrorBoundary;
2601
2631
 
2602
2632
  // src/components/OngoingBuildGuard.tsx
2603
- var import_ink19 = require("ink");
2633
+ var import_ink20 = require("ink");
2604
2634
  var import_ink_select_input = __toESM(require("ink-select-input"));
2605
2635
  var import_prop_types15 = __toESM(require("prop-types"));
2606
2636
  var import_react13 = require("react");
2607
2637
 
2608
2638
  // src/components/CustomSelectInputIndicator.tsx
2609
- var import_ink16 = require("ink");
2639
+ var import_ink17 = require("ink");
2610
2640
  var import_prop_types12 = __toESM(require("prop-types"));
2611
- var import_jsx_runtime17 = require("react/jsx-runtime");
2612
- var CustomSelectInputIndicator = ({ isSelected, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ink16.Box, { marginRight: 1, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ink16.Text, { children: isSelected ? process.platform === "win32" ? ">" : "\u276F" : " " }) });
2641
+ var import_jsx_runtime18 = require("react/jsx-runtime");
2642
+ var CustomSelectInputIndicator = ({ isSelected, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ink17.Box, { marginRight: 1, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ink17.Text, { children: isSelected ? process.platform === "win32" ? ">" : "\u276F" : " " }) });
2613
2643
  CustomSelectInputIndicator.propTypes = {
2614
2644
  isSelected: import_prop_types12.default.bool.isRequired
2615
2645
  };
2616
2646
  var CustomSelectInputIndicator_default = CustomSelectInputIndicator;
2617
2647
 
2618
2648
  // src/components/CustomSelectInputItem.tsx
2619
- var import_ink17 = require("ink");
2649
+ var import_ink18 = require("ink");
2620
2650
  var import_prop_types13 = __toESM(require("prop-types"));
2621
- var import_jsx_runtime18 = require("react/jsx-runtime");
2622
- var CustomSelectInputItem = ({ isSelected, label, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ink17.Text, { bold: isSelected, color: isSelected ? void 0 : "gray", ...props, children: label });
2651
+ var import_jsx_runtime19 = require("react/jsx-runtime");
2652
+ var CustomSelectInputItem = ({ isSelected, label, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ink18.Text, { bold: isSelected, color: isSelected ? void 0 : "gray", ...props, children: label });
2623
2653
  CustomSelectInputItem.propTypes = {
2624
2654
  isSelected: import_prop_types13.default.bool.isRequired,
2625
2655
  label: import_prop_types13.default.string.isRequired
@@ -2627,7 +2657,7 @@ CustomSelectInputItem.propTypes = {
2627
2657
  var CustomSelectInputItem_default = CustomSelectInputItem;
2628
2658
 
2629
2659
  // src/components/ViewBuild.tsx
2630
- var import_ink18 = require("ink");
2660
+ var import_ink19 = require("ink");
2631
2661
  var import_prop_types14 = __toESM(require("prop-types"));
2632
2662
  var import_react12 = require("react");
2633
2663
 
@@ -2677,7 +2707,7 @@ var findAppUserId = async (appId) => {
2677
2707
  var findAppUserId_default = findAppUserId;
2678
2708
 
2679
2709
  // src/components/ViewBuild.tsx
2680
- var import_jsx_runtime19 = require("react/jsx-runtime");
2710
+ var import_jsx_runtime20 = require("react/jsx-runtime");
2681
2711
  var ViewBuild = ({ commandUsed, id, configPath }) => {
2682
2712
  const exit = useExit_default();
2683
2713
  const [
@@ -2711,7 +2741,7 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
2711
2741
  async function viewBuild() {
2712
2742
  let config2;
2713
2743
  try {
2714
- config2 = getProjectConfig_default(configPath).config;
2744
+ config2 = getProjectConfig(configPath).config;
2715
2745
  } catch (e) {
2716
2746
  setState((previousState) => ({ ...previousState, error: e }));
2717
2747
  return;
@@ -2748,7 +2778,7 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
2748
2778
  if (!latestBuildId) {
2749
2779
  setState((previousState) => ({
2750
2780
  ...previousState,
2751
- arbitraryMessageComponent: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ink18.Text, { children: "There are no builds yet" })
2781
+ arbitraryMessageComponent: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_ink19.Text, { children: "There are no builds yet" })
2752
2782
  }));
2753
2783
  return;
2754
2784
  }
@@ -2774,13 +2804,13 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
2774
2804
  }
2775
2805
  }, [arbitraryMessageComponent, exit]);
2776
2806
  if (error) {
2777
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ErrorDisplay_default, { commandUsed, error });
2807
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ErrorDisplay_default, { commandUsed, error });
2778
2808
  }
2779
2809
  if (arbitraryMessageComponent) {
2780
2810
  return arbitraryMessageComponent;
2781
2811
  }
2782
2812
  if (isLoading) {
2783
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ink18.Text, { children: "Loading..." });
2813
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(LoadingText_default, {});
2784
2814
  }
2785
2815
  const onBuildFailure = () => {
2786
2816
  if (hasBuildEverFailed) {
@@ -2791,7 +2821,7 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
2791
2821
  hasBuildEverFailed: true
2792
2822
  }));
2793
2823
  };
2794
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2824
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2795
2825
  MainLayout_default,
2796
2826
  {
2797
2827
  appId,
@@ -2800,7 +2830,7 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
2800
2830
  build,
2801
2831
  commandUsed,
2802
2832
  hasBuildEverFailed,
2803
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(BuildProgress_default, { build, onBuildFailure })
2833
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(BuildProgress_default, { build, onBuildFailure })
2804
2834
  }
2805
2835
  );
2806
2836
  };
@@ -2838,9 +2868,9 @@ var ViewBuild_default = ViewBuild;
2838
2868
 
2839
2869
  // src/components/OngoingBuildGuard.tsx
2840
2870
  var import_is_ci5 = __toESM(require("is-ci"));
2841
- var import_jsx_runtime20 = require("react/jsx-runtime");
2871
+ var import_jsx_runtime21 = require("react/jsx-runtime");
2842
2872
  var OngoingBuildGuard = ({ children, commandUsed, configPath }) => {
2843
- const { isRawModeSupported } = (0, import_ink19.useStdin)();
2873
+ const { isRawModeSupported } = (0, import_ink20.useStdin)();
2844
2874
  const onInput = useInput_default();
2845
2875
  const exit = useExit_default();
2846
2876
  const [{ appId, builds, error, isLoading, itemChosen }, setState] = (0, import_react13.useState)({
@@ -2856,7 +2886,7 @@ var OngoingBuildGuard = ({ children, commandUsed, configPath }) => {
2856
2886
  }
2857
2887
  (async () => {
2858
2888
  try {
2859
- const applicationId = getProjectConfig_default(configPath).config.id;
2889
+ const applicationId = getProjectConfig(configPath).config.id;
2860
2890
  const { id } = await findAppUserId_default(applicationId);
2861
2891
  const buildsResult = await firestore_default.doc(`users/${id}/applications/${applicationId}`).collection("builds").orderBy("createdAt", "desc").limit(10).get();
2862
2892
  const stateUpdates = {
@@ -2895,20 +2925,20 @@ var OngoingBuildGuard = ({ children, commandUsed, configPath }) => {
2895
2925
  });
2896
2926
  }
2897
2927
  if (error) {
2898
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ErrorDisplay_default, { commandUsed, error });
2928
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ErrorDisplay_default, { commandUsed, error });
2899
2929
  }
2900
2930
  if (isLoading) {
2901
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_ink19.Text, { children: "..." });
2931
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_ink20.Text, { children: "..." });
2902
2932
  }
2903
2933
  if (itemChosen) {
2904
2934
  logger_default.debug({ itemChosen }, "OngoingBuildGuard component: item chosen");
2905
2935
  const build = builds.find(Boolean);
2906
2936
  if (itemChosen.value === "view") {
2907
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ViewBuild_default, { commandUsed, id: build.id });
2937
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ViewBuild_default, { commandUsed, id: build.id });
2908
2938
  } else if (itemChosen.value === "cancel") {
2909
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CancelBuild_default, { appId, commandUsed, id: build.id, children });
2939
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CancelBuild_default, { appId, commandUsed, id: build.id, children });
2910
2940
  } else if (itemChosen.value === "concurrent") {
2911
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_jsx_runtime20.Fragment, { children });
2941
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_jsx_runtime21.Fragment, { children });
2912
2942
  } else {
2913
2943
  setTimeout(exit, 10);
2914
2944
  }
@@ -2937,17 +2967,17 @@ var OngoingBuildGuard = ({ children, commandUsed, configPath }) => {
2937
2967
  value: "exit"
2938
2968
  });
2939
2969
  const handleSelect = (itemChosen2) => setState((previousState) => ({ ...previousState, itemChosen: itemChosen2 }));
2940
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
2941
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_ink19.Box, { marginBottom: 1, children: [
2942
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_ink19.Text, { bold: true, children: multiple ? "There are ongoing builds " : "There is an ongoing build " }),
2943
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_ink19.Text, { children: [
2970
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
2971
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_ink20.Box, { marginBottom: 1, children: [
2972
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_ink20.Text, { bold: true, children: multiple ? "There are ongoing builds " : "There is an ongoing build " }),
2973
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_ink20.Text, { children: [
2944
2974
  "(",
2945
2975
  latestBuild.appName,
2946
2976
  latestBuild.appVersion ? ` v${latestBuild.appVersion}` : "",
2947
2977
  ")"
2948
2978
  ] })
2949
2979
  ] }),
2950
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2980
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2951
2981
  import_ink_select_input.default,
2952
2982
  {
2953
2983
  indicatorComponent: CustomSelectInputIndicator_default,
@@ -2958,7 +2988,7 @@ var OngoingBuildGuard = ({ children, commandUsed, configPath }) => {
2958
2988
  )
2959
2989
  ] });
2960
2990
  } else {
2961
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_jsx_runtime20.Fragment, { children });
2991
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_jsx_runtime21.Fragment, { children });
2962
2992
  }
2963
2993
  };
2964
2994
  OngoingBuildGuard.propTypes = {
@@ -2977,7 +3007,7 @@ var useAnalyticsCommand = (command, flags = {}, properties = {}) => {
2977
3007
  if (flags.projectPath) {
2978
3008
  properties = {
2979
3009
  ...properties,
2980
- ...getProjectConfig_default()
3010
+ ...getProjectConfig()
2981
3011
  };
2982
3012
  }
2983
3013
  } catch (err) {
@@ -3012,7 +3042,7 @@ var useAnalyticsCommand = (command, flags = {}, properties = {}) => {
3012
3042
  };
3013
3043
 
3014
3044
  // src/commands/BuildCommand.tsx
3015
- var import_jsx_runtime21 = require("react/jsx-runtime");
3045
+ var import_jsx_runtime22 = require("react/jsx-runtime");
3016
3046
  var BuildCommand = ({
3017
3047
  shouldCodeSign = true,
3018
3048
  configPath = null
@@ -3023,7 +3053,7 @@ var BuildCommand = ({
3023
3053
  config: configPath
3024
3054
  });
3025
3055
  const commandUsed = "todesktop build";
3026
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ErrorBoundary_default, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(LoginHOC_default, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(OngoingBuildGuard_default, { configPath, commandUsed, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3056
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ErrorBoundary_default, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(LoginHOC_default, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(OngoingBuildGuard_default, { configPath, commandUsed, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3027
3057
  Build_default,
3028
3058
  {
3029
3059
  commandUsed,
@@ -3035,23 +3065,23 @@ var BuildCommand = ({
3035
3065
  var BuildCommand_default = BuildCommand;
3036
3066
 
3037
3067
  // src/components/ViewBuilds.tsx
3038
- var import_ink25 = require("ink");
3039
- var import_prop_types22 = __toESM(require("prop-types"));
3068
+ var import_ink26 = require("ink");
3069
+ var import_prop_types21 = __toESM(require("prop-types"));
3040
3070
  var import_react16 = require("react");
3041
3071
 
3042
3072
  // src/components/Table.tsx
3043
- var import_ink23 = require("ink");
3073
+ var import_ink24 = require("ink");
3044
3074
  var import_prop_types20 = __toESM(require("prop-types"));
3045
3075
 
3046
3076
  // src/components/TableEnd.tsx
3047
- var import_ink20 = require("ink");
3077
+ var import_ink21 = require("ink");
3048
3078
  var import_prop_types16 = __toESM(require("prop-types"));
3049
- var import_jsx_runtime22 = require("react/jsx-runtime");
3079
+ var import_jsx_runtime23 = require("react/jsx-runtime");
3050
3080
  var TableEnd = ({ keyDetails, ...props }) => {
3051
3081
  let content = "\u2514";
3052
3082
  content += Object.values(keyDetails).map(({ width }) => "\u2500".repeat(width + 2)).join("\u2534");
3053
3083
  content += "\u2518";
3054
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_ink20.Box, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_ink20.Text, { children: content }) });
3084
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ink21.Box, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ink21.Text, { children: content }) });
3055
3085
  };
3056
3086
  TableEnd.propTypes = {
3057
3087
  keyDetails: import_prop_types16.default.object.isRequired
@@ -3059,28 +3089,28 @@ TableEnd.propTypes = {
3059
3089
  var TableEnd_default = TableEnd;
3060
3090
 
3061
3091
  // src/components/TableHead.tsx
3062
- var import_ink21 = require("ink");
3092
+ var import_ink22 = require("ink");
3063
3093
  var import_prop_types17 = __toESM(require("prop-types"));
3064
3094
  var import_react15 = require("react");
3065
- var import_jsx_runtime23 = require("react/jsx-runtime");
3095
+ var import_jsx_runtime24 = require("react/jsx-runtime");
3066
3096
  var TableHead = ({ keyDetails, ...props }) => {
3067
3097
  let topLine = "\u250C";
3068
3098
  topLine += Object.values(keyDetails).map(({ width }) => "\u2500".repeat(width + 2)).join("\u252C");
3069
3099
  topLine += "\u2510";
3070
3100
  const contentLineElements = Object.values(keyDetails).map(
3071
3101
  ({ key, width }, index) => {
3072
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react15.Fragment, { children: [
3073
- index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ink21.Text, { children: " \u2502 " }) : null,
3074
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ink21.Box, { width, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ink21.Text, { bold: true, children: key }) })
3102
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react15.Fragment, { children: [
3103
+ index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Text, { children: " \u2502 " }) : null,
3104
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Box, { width, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Text, { bold: true, children: key }) })
3075
3105
  ] }, key);
3076
3106
  }
3077
3107
  );
3078
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_ink21.Box, { flexDirection: "column", ...props, children: [
3079
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ink21.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ink21.Text, { children: topLine }) }),
3080
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ink21.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_ink21.Box, { children: [
3081
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ink21.Text, { children: "\u2502 " }),
3108
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_ink22.Box, { flexDirection: "column", ...props, children: [
3109
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Text, { children: topLine }) }),
3110
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_ink22.Box, { children: [
3111
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Text, { children: "\u2502 " }),
3082
3112
  contentLineElements,
3083
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ink21.Text, { children: " \u2502" })
3113
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Text, { children: " \u2502" })
3084
3114
  ] }) })
3085
3115
  ] });
3086
3116
  };
@@ -3094,9 +3124,9 @@ var TableHead_default = TableHead;
3094
3124
  var import_prop_types19 = __toESM(require("prop-types"));
3095
3125
 
3096
3126
  // src/components/TableRow.tsx
3097
- var import_ink22 = require("ink");
3127
+ var import_ink23 = require("ink");
3098
3128
  var import_prop_types18 = __toESM(require("prop-types"));
3099
- var import_jsx_runtime24 = require("react/jsx-runtime");
3129
+ var import_jsx_runtime25 = require("react/jsx-runtime");
3100
3130
  var TableRow = ({
3101
3131
  data,
3102
3132
  getCellTextProps = ({ props }) => props,
@@ -3106,13 +3136,13 @@ var TableRow = ({
3106
3136
  let topLine = "\u251C";
3107
3137
  topLine += Object.values(keyDetails).map(({ width }) => "\u2500".repeat(width + 2)).join("\u253C");
3108
3138
  topLine += "\u2524";
3109
- const content = /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
3110
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Text, { children: "\u2502 " }),
3139
+ const content = /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
3140
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ink23.Text, { children: "\u2502 " }),
3111
3141
  Object.entries(data).map(([key, value], index) => {
3112
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_ink22.Box, { children: [
3113
- index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Text, { children: " \u2502 " }) : null,
3114
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Box, { width: keyDetails[key].width, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3115
- import_ink22.Text,
3142
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_ink23.Box, { children: [
3143
+ index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ink23.Text, { children: " \u2502 " }) : null,
3144
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ink23.Box, { width: keyDetails[key].width, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3145
+ import_ink23.Text,
3116
3146
  {
3117
3147
  ...getCellTextProps({
3118
3148
  key,
@@ -3125,11 +3155,11 @@ var TableRow = ({
3125
3155
  ) })
3126
3156
  ] }, key);
3127
3157
  }),
3128
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Text, { children: " \u2502" })
3158
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ink23.Text, { children: " \u2502" })
3129
3159
  ] });
3130
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_jsx_runtime24.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_ink22.Box, { flexDirection: "column", children: [
3131
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Text, { children: topLine }),
3132
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink22.Box, { children: content })
3160
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_ink23.Box, { flexDirection: "column", children: [
3161
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ink23.Text, { children: topLine }),
3162
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ink23.Box, { children: content })
3133
3163
  ] }) });
3134
3164
  };
3135
3165
  TableRow.propTypes = {
@@ -3141,9 +3171,9 @@ TableRow.propTypes = {
3141
3171
  var TableRow_default = TableRow;
3142
3172
 
3143
3173
  // src/components/TableBody.tsx
3144
- var import_jsx_runtime25 = require("react/jsx-runtime");
3174
+ var import_jsx_runtime26 = require("react/jsx-runtime");
3145
3175
  var TableBody = ({ data, getCellTextProps, keyDetails }) => {
3146
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children: data.map((rowData, index) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3176
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: data.map((rowData, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3147
3177
  TableRow_default,
3148
3178
  {
3149
3179
  data: rowData,
@@ -3188,12 +3218,12 @@ var getKeyDetails_default = (data) => {
3188
3218
  };
3189
3219
 
3190
3220
  // src/components/Table.tsx
3191
- var import_jsx_runtime26 = require("react/jsx-runtime");
3221
+ var import_jsx_runtime27 = require("react/jsx-runtime");
3192
3222
  var Table = ({ data, getCellTextProps }) => {
3193
3223
  const keyDetails = getKeyDetails_default(data);
3194
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_ink23.Box, { flexDirection: "column", children: [
3195
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableHead_default, { keyDetails }),
3196
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3224
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_ink24.Box, { flexDirection: "column", children: [
3225
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableHead_default, { keyDetails }),
3226
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3197
3227
  TableBody_default,
3198
3228
  {
3199
3229
  data,
@@ -3201,7 +3231,7 @@ var Table = ({ data, getCellTextProps }) => {
3201
3231
  keyDetails
3202
3232
  }
3203
3233
  ),
3204
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableEnd_default, { keyDetails })
3234
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableEnd_default, { keyDetails })
3205
3235
  ] });
3206
3236
  };
3207
3237
  Table.propTypes = {
@@ -3263,25 +3293,26 @@ var dateFns = __toESM(require("date-fns"));
3263
3293
  var getRelativeDateFromDateString_default = (input) => dateFns.formatDistance(new Date(input), new Date()) + " ago";
3264
3294
 
3265
3295
  // src/components/SyntaxHighlight.tsx
3296
+ var import_chalk2 = __toESM(require("chalk"));
3266
3297
  var React3 = __toESM(require("react"));
3267
- var import_prop_types21 = __toESM(require("prop-types"));
3268
- var import_ink24 = require("ink");
3269
- var import_cli_highlight = require("cli-highlight");
3270
- var import_jsx_runtime27 = require("react/jsx-runtime");
3271
- var SyntaxHighlight = ({ code, language }) => {
3298
+ var import_ink25 = require("ink");
3299
+ var import_util2 = __toESM(require("util"));
3300
+ var import_jsx_runtime28 = require("react/jsx-runtime");
3301
+ var supportsColor = import_chalk2.default.stderr.supportsColor;
3302
+ var SyntaxHighlight = ({
3303
+ object,
3304
+ colors = supportsColor == null ? void 0 : supportsColor.hasBasic
3305
+ }) => {
3306
+ const { stdout } = (0, import_ink25.useStdout)();
3272
3307
  const highlightedCode = React3.useMemo(() => {
3273
- return (0, import_cli_highlight.highlight)(code, { language });
3274
- }, [code, language]);
3275
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_ink24.Text, { children: highlightedCode });
3276
- };
3277
- SyntaxHighlight.propTypes = {
3278
- code: import_prop_types21.default.string.isRequired,
3279
- language: import_prop_types21.default.string
3308
+ return stdout.isTTY ? import_util2.default.inspect(object, { colors, depth: 6 }) : JSON.stringify(object, null, 2);
3309
+ }, [colors, object, stdout.isTTY]);
3310
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ink25.Text, { wrap: "end", children: highlightedCode });
3280
3311
  };
3281
3312
  var SyntaxHighlight_default = SyntaxHighlight;
3282
3313
 
3283
3314
  // src/components/ViewBuilds.tsx
3284
- var import_jsx_runtime28 = require("react/jsx-runtime");
3315
+ var import_jsx_runtime29 = require("react/jsx-runtime");
3285
3316
  var ViewBuilds = ({
3286
3317
  commandUsed,
3287
3318
  configPath,
@@ -3347,7 +3378,7 @@ var ViewBuilds = ({
3347
3378
  }));
3348
3379
  let config2;
3349
3380
  try {
3350
- config2 = projectConfig || getProjectConfig_default(configPath).config;
3381
+ config2 = projectConfig || getProjectConfig(configPath).config;
3351
3382
  } catch (e) {
3352
3383
  setState((previousState) => ({ ...previousState, error: e }));
3353
3384
  return;
@@ -3410,10 +3441,10 @@ var ViewBuilds = ({
3410
3441
  }
3411
3442
  }, [exit, isLoading, shouldExitAfterViewingBuilds, isInitialLoadComplete]);
3412
3443
  if (error) {
3413
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ErrorDisplay_default, { commandUsed, error });
3444
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ErrorDisplay_default, { commandUsed, error });
3414
3445
  }
3415
3446
  if (!isInitialLoadComplete) {
3416
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ink25.Text, { children: "Loading..." });
3447
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(LoadingText_default, {});
3417
3448
  }
3418
3449
  if (builds.length) {
3419
3450
  const formatData = (builds2) => builds2.map((build) => ({
@@ -3442,52 +3473,46 @@ var ViewBuilds = ({
3442
3473
  }
3443
3474
  return result;
3444
3475
  };
3445
- const removeAppBuilderLibConfig = (builds2) => {
3446
- return builds2.map((build) => {
3447
- if (build.mac && build.mac.appBuilderLibConfig) {
3448
- delete build.mac.appBuilderLibConfig;
3449
- }
3450
- if (build.windows && build.windows.appBuilderLibConfig) {
3451
- delete build.windows.appBuilderLibConfig;
3452
- }
3453
- if (build.linux && build.linux.appBuilderLibConfig) {
3454
- delete build.linux.appBuilderLibConfig;
3455
- }
3456
- return build;
3457
- });
3458
- };
3459
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
3460
- format === "table" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3476
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
3477
+ format === "table" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3461
3478
  Table_default,
3462
3479
  {
3463
3480
  getCellTextProps,
3464
3481
  data: formatData(builds)
3465
3482
  }
3466
3483
  ) : null,
3467
- format === "json" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3468
- SyntaxHighlight_default,
3469
- {
3470
- code: JSON.stringify(removeAppBuilderLibConfig(builds), null, 2),
3471
- language: "JSON"
3472
- }
3473
- ) : null,
3474
- !shouldExitAfterViewingBuilds && builds.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ink25.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ink25.Text, { color: "gray", dimColor: true, children: isLoading ? "Loading more..." : hasMoreToLoad ? `Showing the latest ${builds.length} builds. Press space/down to load more.` : `Showing all (${builds.length}) builds` }) }) : null
3484
+ format === "json" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SyntaxHighlight_default, { object: removeAppBuilderLibConfig(builds) }) : null,
3485
+ !shouldExitAfterViewingBuilds && builds.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_ink26.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_ink26.Text, { color: "gray", dimColor: true, children: isLoading ? "Loading more..." : hasMoreToLoad ? `Showing the latest ${builds.length} builds. Press space/down to load more.` : `Showing all (${builds.length}) builds` }) }) : null
3475
3486
  ] });
3476
3487
  } else {
3477
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ink25.Text, { children: "There are no builds yet" });
3488
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_ink26.Text, { children: "There are no builds yet" });
3478
3489
  }
3479
3490
  };
3491
+ var removeAppBuilderLibConfig = (builds) => {
3492
+ return builds.map((build) => {
3493
+ if (build.mac && build.mac.appBuilderLibConfig) {
3494
+ delete build.mac.appBuilderLibConfig;
3495
+ }
3496
+ if (build.windows && build.windows.appBuilderLibConfig) {
3497
+ delete build.windows.appBuilderLibConfig;
3498
+ }
3499
+ if (build.linux && build.linux.appBuilderLibConfig) {
3500
+ delete build.linux.appBuilderLibConfig;
3501
+ }
3502
+ return build;
3503
+ });
3504
+ };
3480
3505
  ViewBuilds.propTypes = {
3481
- commandUsed: import_prop_types22.default.string.isRequired,
3482
- configPath: import_prop_types22.default.string,
3483
- count: import_prop_types22.default.number,
3484
- format: import_prop_types22.default.string,
3485
- exit: import_prop_types22.default.bool
3506
+ commandUsed: import_prop_types21.default.string.isRequired,
3507
+ configPath: import_prop_types21.default.string,
3508
+ count: import_prop_types21.default.number,
3509
+ format: import_prop_types21.default.string,
3510
+ exit: import_prop_types21.default.bool
3486
3511
  };
3487
3512
  var ViewBuilds_default = ViewBuilds;
3488
3513
 
3489
3514
  // src/commands/BuildsCommand.tsx
3490
- var import_jsx_runtime29 = require("react/jsx-runtime");
3515
+ var import_jsx_runtime30 = require("react/jsx-runtime");
3491
3516
  var BuildsCommand = ({
3492
3517
  id,
3493
3518
  shouldViewLatest,
@@ -3509,10 +3534,10 @@ var BuildsCommand = ({
3509
3534
  let commandUsed = "todesktop builds";
3510
3535
  if (id) {
3511
3536
  commandUsed += " <id>";
3512
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ViewBuild_default, { commandUsed, id, configPath });
3537
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ViewBuild_default, { commandUsed, id, configPath });
3513
3538
  } else if (shouldViewLatest) {
3514
3539
  commandUsed += " --latest";
3515
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3540
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3516
3541
  ViewBuild_default,
3517
3542
  {
3518
3543
  commandUsed,
@@ -3521,7 +3546,7 @@ var BuildsCommand = ({
3521
3546
  }
3522
3547
  );
3523
3548
  } else {
3524
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3549
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3525
3550
  ViewBuilds_default,
3526
3551
  {
3527
3552
  commandUsed,
@@ -3533,14 +3558,14 @@ var BuildsCommand = ({
3533
3558
  );
3534
3559
  }
3535
3560
  };
3536
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ErrorBoundary_default, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(LoginHOC_default, { children: getContents() }) });
3561
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ErrorBoundary_default, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(LoginHOC_default, { children: getContents() }) });
3537
3562
  };
3538
3563
  var BuildsCommand_default = BuildsCommand;
3539
3564
 
3540
3565
  // src/commands/LogoutCommand.tsx
3541
3566
  var import_react17 = require("react");
3542
- var import_ink26 = require("ink");
3543
- var import_jsx_runtime30 = require("react/jsx-runtime");
3567
+ var import_ink27 = require("ink");
3568
+ var import_jsx_runtime31 = require("react/jsx-runtime");
3544
3569
  var Logout = () => {
3545
3570
  const exit = useExit_default();
3546
3571
  const { hasAttemptedTracking } = useAnalyticsCommand("logout");
@@ -3551,21 +3576,21 @@ var Logout = () => {
3551
3576
  exit();
3552
3577
  }
3553
3578
  }, [exit, hasAttemptedTracking]);
3554
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_ink26.Text, { children: "Log out successful" });
3579
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink27.Text, { children: "Log out successful" });
3555
3580
  };
3556
3581
  var LogoutWrapper = () => {
3557
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ErrorBoundary_default, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(LoginHOC_default, { isInteractive: false, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Logout, {}) }) });
3582
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ErrorBoundary_default, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(LoginHOC_default, { isInteractive: false, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Logout, {}) }) });
3558
3583
  };
3559
3584
  var LogoutCommand_default = LogoutWrapper;
3560
3585
 
3561
3586
  // src/commands/ReleaseCommand.tsx
3562
- var import_ink30 = require("ink");
3587
+ var import_ink31 = require("ink");
3563
3588
 
3564
3589
  // src/components/ReleaseBuild.tsx
3565
- var import_ink27 = require("ink");
3590
+ var import_ink28 = require("ink");
3566
3591
  var import_ink_link4 = __toESM(require("ink-link"));
3567
3592
  var import_ink_select_input2 = __toESM(require("ink-select-input"));
3568
- var import_prop_types23 = __toESM(require("prop-types"));
3593
+ var import_prop_types22 = __toESM(require("prop-types"));
3569
3594
  var import_react18 = require("react");
3570
3595
 
3571
3596
  // src/utilities/getBuildById.ts
@@ -3579,18 +3604,18 @@ var getBuildById_default = async ({ appId, buildId, userId }) => {
3579
3604
  };
3580
3605
 
3581
3606
  // src/components/ReleaseBuild.tsx
3582
- var import_jsx_runtime31 = require("react/jsx-runtime");
3607
+ var import_jsx_runtime32 = require("react/jsx-runtime");
3583
3608
  var getValidationErrorMessageDisplay = (build, validationMessage) => {
3584
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_ink27.Box, { flexDirection: "column", children: [
3585
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_ink27.Text, { bold: true, color: "red", children: [
3609
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_ink28.Box, { flexDirection: "column", children: [
3610
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_ink28.Text, { bold: true, color: "red", children: [
3586
3611
  "Can't release ",
3587
3612
  build.appName,
3588
3613
  " v",
3589
3614
  build.appVersion
3590
3615
  ] }),
3591
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink27.Box, { marginBottom: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink27.Text, { children: validationMessage }) }),
3592
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink27.Text, { bold: true, children: "See web UI for more information: " }),
3593
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink27.Text, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink_link4.default, { fallback: false, url: build.url, children: build.url }) })
3616
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Box, { marginBottom: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Text, { children: validationMessage }) }),
3617
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Text, { bold: true, children: "See web UI for more information: " }),
3618
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Text, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink_link4.default, { fallback: false, url: build.url, children: build.url }) })
3594
3619
  ] });
3595
3620
  };
3596
3621
  var ReleaseBuild = ({ commandUsed, id, shouldConfirm, configPath }) => {
@@ -3630,7 +3655,7 @@ var ReleaseBuild = ({ commandUsed, id, shouldConfirm, configPath }) => {
3630
3655
  if (build) {
3631
3656
  return;
3632
3657
  }
3633
- const config2 = getProjectConfig_default(configPath).config;
3658
+ const config2 = getProjectConfig(configPath).config;
3634
3659
  const appId2 = config2.id;
3635
3660
  const { id: userId } = await findAppUserId_default(appId2);
3636
3661
  const loadBuild = (buildId) => {
@@ -3654,7 +3679,7 @@ var ReleaseBuild = ({ commandUsed, id, shouldConfirm, configPath }) => {
3654
3679
  if (!buildId) {
3655
3680
  setState((previousState) => ({
3656
3681
  ...previousState,
3657
- arbitraryMessageComponent: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink27.Text, { children: "There are no builds yet" })
3682
+ arbitraryMessageComponent: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Text, { children: "There are no builds yet" })
3658
3683
  }));
3659
3684
  return;
3660
3685
  }
@@ -3742,7 +3767,7 @@ var ReleaseBuild = ({ commandUsed, id, shouldConfirm, configPath }) => {
3742
3767
  }
3743
3768
  }, [arbitraryMessageComponent, exit, isComplete]);
3744
3769
  if (error) {
3745
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ErrorDisplay_default, { commandUsed, error });
3770
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ErrorDisplay_default, { commandUsed, error });
3746
3771
  }
3747
3772
  if (arbitraryMessageComponent) {
3748
3773
  return arbitraryMessageComponent;
@@ -3768,21 +3793,21 @@ var ReleaseBuild = ({ commandUsed, id, shouldConfirm, configPath }) => {
3768
3793
  hasConfirmed: true
3769
3794
  }));
3770
3795
  };
3771
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_ink27.Box, { flexDirection: "column", children: [
3772
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_ink27.Box, { children: [
3773
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_ink27.Text, { children: [
3796
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_ink28.Box, { flexDirection: "column", children: [
3797
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_ink28.Box, { children: [
3798
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_ink28.Text, { children: [
3774
3799
  "This will release build ",
3775
3800
  build.id,
3776
3801
  " as "
3777
3802
  ] }),
3778
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_ink27.Text, { bold: true, children: [
3803
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_ink28.Text, { bold: true, children: [
3779
3804
  build.appName,
3780
3805
  " v",
3781
3806
  build.appVersion
3782
3807
  ] }),
3783
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink27.Text, { children: ", are you sure?" })
3808
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Text, { children: ", are you sure?" })
3784
3809
  ] }),
3785
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink27.Box, { marginBottom: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3810
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Box, { marginBottom: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3786
3811
  import_ink_select_input2.default,
3787
3812
  {
3788
3813
  indicatorComponent: CustomSelectInputIndicator_default,
@@ -3792,16 +3817,16 @@ var ReleaseBuild = ({ commandUsed, id, shouldConfirm, configPath }) => {
3792
3817
  onSelect: onSubmit
3793
3818
  }
3794
3819
  ) }),
3795
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink27.Text, { dimColor: true, children: "Your users will be auto-updated to this version. You can use --force to bypass this confirmation in future" })
3820
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Text, { dimColor: true, children: "Your users will be auto-updated to this version. You can use --force to bypass this confirmation in future" })
3796
3821
  ] });
3797
3822
  }
3798
3823
  if (isReleasing) {
3799
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink27.Text, { children: "Releasing..." });
3824
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Text, { children: "Releasing..." });
3800
3825
  }
3801
3826
  if (isComplete) {
3802
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink27.Text, { bold: true, color: "greenBright", children: "Released!" });
3827
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Text, { bold: true, color: "greenBright", children: "Released!" });
3803
3828
  }
3804
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink27.Text, { children: "..." });
3829
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ink28.Text, { children: "..." });
3805
3830
  };
3806
3831
  ReleaseBuild.propTypes = {
3807
3832
  id: (props, propName, componentName) => {
@@ -3817,7 +3842,7 @@ ReleaseBuild.propTypes = {
3817
3842
  );
3818
3843
  }
3819
3844
  },
3820
- commandUsed: import_prop_types23.default.string.isRequired,
3845
+ commandUsed: import_prop_types22.default.string.isRequired,
3821
3846
  shouldReleaseLatest: (props, propName, componentName) => {
3822
3847
  if ([props.id, props.shouldReleaseLatest].filter(Boolean).length !== 1) {
3823
3848
  return new Error(
@@ -3831,22 +3856,22 @@ ReleaseBuild.propTypes = {
3831
3856
  );
3832
3857
  }
3833
3858
  },
3834
- shouldConfirm: import_prop_types23.default.bool.isRequired,
3835
- configPath: import_prop_types23.default.string
3859
+ shouldConfirm: import_prop_types22.default.bool.isRequired,
3860
+ configPath: import_prop_types22.default.string
3836
3861
  };
3837
3862
  var ReleaseBuild_default = ReleaseBuild;
3838
3863
 
3839
3864
  // src/components/PickBuildForRelease.tsx
3840
- var import_ink29 = require("ink");
3841
- var import_prop_types25 = __toESM(require("prop-types"));
3865
+ var import_ink30 = require("ink");
3866
+ var import_prop_types24 = __toESM(require("prop-types"));
3842
3867
  var import_react19 = require("react");
3843
3868
 
3844
3869
  // src/components/SelectTable.tsx
3845
- var import_ink28 = require("ink");
3870
+ var import_ink29 = require("ink");
3846
3871
  var import_ink_select_input3 = __toESM(require("ink-select-input"));
3847
- var import_prop_types24 = __toESM(require("prop-types"));
3848
- var import_jsx_runtime32 = require("react/jsx-runtime");
3849
- var CustomIndicator = (props) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(CustomSelectInputIndicator_default, { marginTop: 1, ...props });
3872
+ var import_prop_types23 = __toESM(require("prop-types"));
3873
+ var import_jsx_runtime33 = require("react/jsx-runtime");
3874
+ var CustomIndicator = (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CustomSelectInputIndicator_default, { marginTop: 1, ...props });
3850
3875
  var SelectTable = ({ data, onSelect }) => {
3851
3876
  const keyDetails = getKeyDetails_default(data);
3852
3877
  const getSelectItems = () => {
@@ -3863,7 +3888,7 @@ var SelectTable = ({ data, onSelect }) => {
3863
3888
  index,
3864
3889
  isSelected
3865
3890
  }) => {
3866
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3891
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3867
3892
  TableRow_default,
3868
3893
  {
3869
3894
  data: data[index],
@@ -3873,9 +3898,9 @@ var SelectTable = ({ data, onSelect }) => {
3873
3898
  index
3874
3899
  );
3875
3900
  };
3876
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_ink28.Box, { flexDirection: "column", children: [
3877
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableHead_default, { keyDetails, marginLeft: 2 }),
3878
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3901
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_ink29.Box, { flexDirection: "column", children: [
3902
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableHead_default, { keyDetails, marginLeft: 2 }),
3903
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3879
3904
  import_ink_select_input3.default,
3880
3905
  {
3881
3906
  indicatorComponent: CustomIndicator,
@@ -3884,7 +3909,7 @@ var SelectTable = ({ data, onSelect }) => {
3884
3909
  onSelect
3885
3910
  }
3886
3911
  ),
3887
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableEnd_default, { keyDetails, marginLeft: 2 })
3912
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableEnd_default, { keyDetails, marginLeft: 2 })
3888
3913
  ] });
3889
3914
  };
3890
3915
  SelectTable.propTypes = {
@@ -3901,12 +3926,12 @@ SelectTable.propTypes = {
3901
3926
  );
3902
3927
  }
3903
3928
  },
3904
- onSelect: import_prop_types24.default.func
3929
+ onSelect: import_prop_types23.default.func
3905
3930
  };
3906
3931
  var SelectTable_default = SelectTable;
3907
3932
 
3908
3933
  // src/components/PickBuildForRelease.tsx
3909
- var import_jsx_runtime33 = require("react/jsx-runtime");
3934
+ var import_jsx_runtime34 = require("react/jsx-runtime");
3910
3935
  var PickBuildForRelease = ({ commandUsed, shouldConfirm, configPath }) => {
3911
3936
  const exit = useExit_default();
3912
3937
  const [{ error, builds, chosenBuildId, isLoading, user }, setState] = (0, import_react19.useState)({
@@ -3924,7 +3949,7 @@ var PickBuildForRelease = ({ commandUsed, shouldConfirm, configPath }) => {
3924
3949
  }
3925
3950
  let config2;
3926
3951
  try {
3927
- config2 = getProjectConfig_default(configPath).config;
3952
+ config2 = getProjectConfig(configPath).config;
3928
3953
  } catch (e) {
3929
3954
  setState((previousState) => ({ ...previousState, error: e }));
3930
3955
  return;
@@ -3962,13 +3987,13 @@ var PickBuildForRelease = ({ commandUsed, shouldConfirm, configPath }) => {
3962
3987
  }
3963
3988
  });
3964
3989
  if (error) {
3965
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ErrorDisplay_default, { commandUsed, error });
3990
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ErrorDisplay_default, { commandUsed, error });
3966
3991
  }
3967
3992
  if (isLoading) {
3968
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_ink29.Text, { children: "Loading..." });
3993
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LoadingText_default, {});
3969
3994
  }
3970
3995
  if (chosenBuildId) {
3971
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3996
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3972
3997
  ReleaseBuild_default,
3973
3998
  {
3974
3999
  commandUsed,
@@ -3988,31 +4013,31 @@ var PickBuildForRelease = ({ commandUsed, shouldConfirm, configPath }) => {
3988
4013
  ...previousState,
3989
4014
  chosenBuildId: item.value.ID
3990
4015
  }));
3991
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
3992
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_ink29.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_ink29.Text, { children: "Which build would you like to release?" }) }),
3993
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectTable_default, { data, onSelect }),
3994
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_ink29.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_ink29.Text, { dimColor: true, children: [
4016
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
4017
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ink30.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ink30.Text, { children: "Which build would you like to release?" }) }),
4018
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SelectTable_default, { data, onSelect }),
4019
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ink30.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_ink30.Text, { dimColor: true, children: [
3995
4020
  "Showing the latest ",
3996
4021
  builds.length,
3997
4022
  " unreleased successful builds"
3998
4023
  ] }) })
3999
4024
  ] });
4000
4025
  } else {
4001
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_ink29.Box, { children: [
4002
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_ink29.Text, { children: "No elligible builds found " }),
4003
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_ink29.Text, { dimColor: true, children: "(i.e. unreleased and successful)" })
4026
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_ink30.Box, { children: [
4027
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ink30.Text, { children: "No elligible builds found " }),
4028
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ink30.Text, { dimColor: true, children: "(i.e. unreleased and successful)" })
4004
4029
  ] });
4005
4030
  }
4006
4031
  };
4007
4032
  PickBuildForRelease.propTypes = {
4008
- commandUsed: import_prop_types25.default.string.isRequired,
4009
- shouldConfirm: import_prop_types25.default.bool.isRequired,
4010
- configPath: import_prop_types25.default.string
4033
+ commandUsed: import_prop_types24.default.string.isRequired,
4034
+ shouldConfirm: import_prop_types24.default.bool.isRequired,
4035
+ configPath: import_prop_types24.default.string
4011
4036
  };
4012
4037
  var PickBuildForRelease_default = PickBuildForRelease;
4013
4038
 
4014
4039
  // src/commands/ReleaseCommand.tsx
4015
- var import_jsx_runtime34 = require("react/jsx-runtime");
4040
+ var import_jsx_runtime35 = require("react/jsx-runtime");
4016
4041
  var ReleaseCommand = ({
4017
4042
  id,
4018
4043
  force,
@@ -4027,17 +4052,17 @@ var ReleaseCommand = ({
4027
4052
  config: configPath
4028
4053
  });
4029
4054
  if (id && id.startsWith(".")) {
4030
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
4031
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_ink30.Box, { children: [
4032
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ink30.Text, { bold: true, color: "red", children: "todesktop release <project-path>" }),
4033
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ink30.Text, { children: " is no longer supported. Run this instead:" })
4055
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
4056
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_ink31.Box, { children: [
4057
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_ink31.Text, { bold: true, color: "red", children: "todesktop release <project-path>" }),
4058
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_ink31.Text, { children: " is no longer supported. Run this instead:" })
4034
4059
  ] }),
4035
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ink30.Text, { bold: true, color: "greenBright", children: "todesktop build && todesktop release --latest --force" })
4060
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_ink31.Text, { bold: true, color: "greenBright", children: "todesktop build && todesktop release --latest --force" })
4036
4061
  ] });
4037
4062
  }
4038
4063
  const getContents = () => {
4039
4064
  if (id) {
4040
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4065
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4041
4066
  ReleaseBuild_default,
4042
4067
  {
4043
4068
  configPath,
@@ -4047,7 +4072,7 @@ var ReleaseCommand = ({
4047
4072
  }
4048
4073
  );
4049
4074
  } else if (shouldReleaseLatest) {
4050
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4075
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4051
4076
  ReleaseBuild_default,
4052
4077
  {
4053
4078
  configPath,
@@ -4057,7 +4082,7 @@ var ReleaseCommand = ({
4057
4082
  }
4058
4083
  );
4059
4084
  } else {
4060
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4085
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4061
4086
  PickBuildForRelease_default,
4062
4087
  {
4063
4088
  configPath,
@@ -4067,14 +4092,14 @@ var ReleaseCommand = ({
4067
4092
  );
4068
4093
  }
4069
4094
  };
4070
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ErrorBoundary_default, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LoginHOC_default, { children: getContents() }) });
4095
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ErrorBoundary_default, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(LoginHOC_default, { children: getContents() }) });
4071
4096
  };
4072
4097
  var ReleaseCommand_default = ReleaseCommand;
4073
4098
 
4074
4099
  // src/commands/WhoamiCommand.tsx
4075
4100
  var import_react20 = require("react");
4076
- var import_ink31 = require("ink");
4077
- var import_jsx_runtime35 = require("react/jsx-runtime");
4101
+ var import_ink32 = require("ink");
4102
+ var import_jsx_runtime36 = require("react/jsx-runtime");
4078
4103
  var WhoAmI = () => {
4079
4104
  const exit = useExit_default();
4080
4105
  checkIfReactIsUsable_default();
@@ -4086,15 +4111,15 @@ var WhoAmI = () => {
4086
4111
  }
4087
4112
  }, [exit, hasAttemptedTracking]);
4088
4113
  if (!auth || !auth.email) {
4089
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_ink31.Text, { children: "You're not signed in" });
4114
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_ink32.Text, { children: "You're not signed in" });
4090
4115
  }
4091
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_ink31.Text, { children: auth.email });
4116
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_ink32.Text, { children: auth.email });
4092
4117
  };
4093
- var WhoAmIWrapper = () => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ErrorBoundary_default, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(LoginHOC_default, { isInteractive: false, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(WhoAmI, {}) }) });
4118
+ var WhoAmIWrapper = () => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ErrorBoundary_default, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(LoginHOC_default, { isInteractive: false, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(WhoAmI, {}) }) });
4094
4119
  var WhoamiCommand_default = WhoAmIWrapper;
4095
4120
 
4096
4121
  // src/utilities/exitIfCLIOutOfDate.ts
4097
- var import_chalk2 = __toESM(require("chalk"));
4122
+ var import_chalk3 = __toESM(require("chalk"));
4098
4123
  var import_is_installed_globally = __toESM(require("is-installed-globally"));
4099
4124
  var import_latest_version = __toESM(require("latest-version"));
4100
4125
  var import_semver = __toESM(require("semver"));
@@ -4105,7 +4130,7 @@ var exitIfCLIOutOfDate_default = () => {
4105
4130
  const pkg = getToDesktopPackageJson();
4106
4131
  (0, import_latest_version.default)(pkg.name).then((latest) => {
4107
4132
  if (import_semver.default.gt(latest, pkg.version)) {
4108
- const commandToUpdate = import_chalk2.default.greenBright(
4133
+ const commandToUpdate = import_chalk3.default.greenBright(
4109
4134
  `npm install ${import_is_installed_globally.default ? "--location=global" : "--save-dev"} @todesktop/cli`
4110
4135
  );
4111
4136
  console.log(
@@ -4131,7 +4156,7 @@ var package_default = {
4131
4156
  access: "public"
4132
4157
  },
4133
4158
  name: "@todesktop/cli",
4134
- version: "1.5.1",
4159
+ version: "1.6.1",
4135
4160
  license: "MIT",
4136
4161
  author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
4137
4162
  homepage: "https://todesktop.com/cli",
@@ -4175,7 +4200,6 @@ var package_default = {
4175
4200
  "better-ajv-errors": "^1.2.0",
4176
4201
  bunyan: "^1.8.14",
4177
4202
  chalk: "^4.1.0",
4178
- "cli-highlight": "^2.1.11",
4179
4203
  commander: "^9.4.1",
4180
4204
  conf: "^7.1.2",
4181
4205
  "date-fns": "^2.28.0",
@@ -4212,6 +4236,7 @@ var package_default = {
4212
4236
  "xdg-basedir": "^4.0.0"
4213
4237
  },
4214
4238
  devDependencies: {
4239
+ "@todesktop/shared": "^7.147.0",
4215
4240
  "@types/bunyan": "^1.8.6",
4216
4241
  "@types/react": "^18.0.26",
4217
4242
  "@typescript-eslint/eslint-plugin": "^5.46.1",
@@ -4322,7 +4347,7 @@ var initSentry_default = () => {
4322
4347
  } catch (err) {
4323
4348
  }
4324
4349
  try {
4325
- const configResult = getProjectConfig_default();
4350
+ const configResult = getProjectConfig();
4326
4351
  scope.setExtra("config", configResult);
4327
4352
  } catch (err) {
4328
4353
  }
@@ -4396,7 +4421,7 @@ import_commander.program.command("whoami").description("Prints the email of the
4396
4421
  });
4397
4422
  var runCommand = (component, props = null, { exitIfOutOfDate = true } = {}) => {
4398
4423
  onCommand_default({ exitIfOutOfDate });
4399
- const { waitUntilExit } = (0, import_ink32.render)((0, import_react21.createElement)(component, props));
4424
+ const { waitUntilExit } = (0, import_ink33.render)((0, import_react21.createElement)(component, props));
4400
4425
  waitUntilExit().catch((error) => {
4401
4426
  console.error(error.stack);
4402
4427
  });