@todesktop/cli 1.20.0-1 → 1.21.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
@@ -1157,7 +1157,7 @@ function BreakpointPrompt({
1157
1157
  " to detach."
1158
1158
  ] }),
1159
1159
  inFlight ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink4.Text, { color: "cyan", children: [
1160
- inFlight.action === "renew" ? "Renewing lease" : inFlight.action === "skip" ? "Skipping remaining breakpoints" : "Resuming build",
1160
+ getInFlightActionText(inFlight.action),
1161
1161
  "\u2026"
1162
1162
  ] }) : null,
1163
1163
  error ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ink4.Text, { color: "red", children: error }) : null
@@ -1183,6 +1183,16 @@ function toBreakpointConfig(state) {
1183
1183
  id: state.id
1184
1184
  };
1185
1185
  }
1186
+ function getInFlightActionText(action) {
1187
+ switch (action) {
1188
+ case "renew":
1189
+ return "Renewing lease";
1190
+ case "skip":
1191
+ return "Skipping remaining breakpoints";
1192
+ default:
1193
+ return "Resuming build";
1194
+ }
1195
+ }
1186
1196
  function toDate(value) {
1187
1197
  if (!value) {
1188
1198
  throw new Error("Missing timestamp value");
@@ -1201,14 +1211,12 @@ function toDate(value) {
1201
1211
 
1202
1212
  // src/components/BuildProgress.tsx
1203
1213
  var import_ink8 = require("ink");
1204
- var import_prop_types3 = __toESM(require("prop-types"));
1205
1214
  var import_react5 = require("react");
1206
1215
  var import_lodash = __toESM(require("lodash.throttle"));
1207
1216
 
1208
1217
  // src/components/BuildCompleteMessage.tsx
1209
1218
  var import_ink5 = require("ink");
1210
1219
  var import_ink_link = __toESM(require("ink-link"));
1211
- var import_prop_types = __toESM(require("prop-types"));
1212
1220
  var import_react3 = require("react");
1213
1221
 
1214
1222
  // src/utilities/logForCI.ts
@@ -1248,13 +1256,10 @@ var BuildCompleteMessage = ({ build }) => {
1248
1256
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ink_link.default, { fallback: false, url, children: url || "" })
1249
1257
  ] }) });
1250
1258
  };
1251
- BuildCompleteMessage.propTypes = {
1252
- build: import_prop_types.default.object.isRequired
1253
- };
1254
1259
  var BuildCompleteMessage_default = BuildCompleteMessage;
1255
1260
 
1256
1261
  // src/components/PlatformProgress.tsx
1257
- var import_prop_types2 = __toESM(require("prop-types"));
1262
+ var import_prop_types = __toESM(require("prop-types"));
1258
1263
  var import_ink6 = require("ink");
1259
1264
  var import_ink_link2 = __toESM(require("ink-link"));
1260
1265
  var import_jsx_runtime4 = require("react/jsx-runtime");
@@ -1321,12 +1326,12 @@ var PlatformProgress = ({
1321
1326
  ] });
1322
1327
  };
1323
1328
  PlatformProgress.propTypes = {
1324
- activityName: import_prop_types2.default.string.isRequired,
1325
- activityType: import_prop_types2.default.string.isRequired,
1326
- downloadUrl: import_prop_types2.default.string,
1327
- percent: import_prop_types2.default.number.isRequired,
1328
- platform: import_prop_types2.default.string.isRequired,
1329
- shouldShowReadyPrefix: import_prop_types2.default.bool
1329
+ activityName: import_prop_types.default.string.isRequired,
1330
+ activityType: import_prop_types.default.string.isRequired,
1331
+ downloadUrl: import_prop_types.default.string,
1332
+ percent: import_prop_types.default.number.isRequired,
1333
+ platform: import_prop_types.default.string.isRequired,
1334
+ shouldShowReadyPrefix: import_prop_types.default.bool
1330
1335
  };
1331
1336
  var PlatformProgress_default = PlatformProgress;
1332
1337
 
@@ -1393,7 +1398,10 @@ var isPlatformBuildRunning = (platformBuild) => {
1393
1398
  // src/components/BuildProgress.tsx
1394
1399
  var import_jsx_runtime6 = require("react/jsx-runtime");
1395
1400
  var logForCIThrottled = (0, import_lodash.default)(logForCI, 60 * 1e3, { trailing: true });
1396
- var BuildProgress = ({ build, onBuildFailure }) => {
1401
+ var BuildProgress = ({
1402
+ build,
1403
+ onBuildFailure
1404
+ }) => {
1397
1405
  const exit = useExit_default();
1398
1406
  const [{ hasKickedOff }, setState] = (0, import_react5.useState)({
1399
1407
  hasKickedOff: false
@@ -1443,10 +1451,6 @@ var BuildProgress = ({ build, onBuildFailure }) => {
1443
1451
  ) }, platform)) })
1444
1452
  ] });
1445
1453
  };
1446
- BuildProgress.propTypes = {
1447
- build: import_prop_types3.default.object.isRequired,
1448
- onBuildFailure: import_prop_types3.default.func.isRequired
1449
- };
1450
1454
  var BuildProgress_default = BuildProgress;
1451
1455
 
1452
1456
  // src/components/ErrorDisplay.tsx
@@ -1611,7 +1615,7 @@ var CancelBuild_default = CancelBuild;
1611
1615
  // src/components/Footer.tsx
1612
1616
  var import_ink11 = require("ink");
1613
1617
  var import_ink_link3 = __toESM(require("ink-link"));
1614
- var import_prop_types4 = __toESM(require("prop-types"));
1618
+ var import_prop_types2 = __toESM(require("prop-types"));
1615
1619
  var import_jsx_runtime9 = require("react/jsx-runtime");
1616
1620
  var Footer = ({
1617
1621
  hasBuildEverFailed,
@@ -1640,15 +1644,15 @@ var Footer = ({
1640
1644
  ] });
1641
1645
  };
1642
1646
  Footer.propTypes = {
1643
- hasBuildEverFailed: import_prop_types4.default.bool,
1644
- shouldShowCancelBuildInstructions: import_prop_types4.default.bool,
1645
- uiUrl: import_prop_types4.default.string
1647
+ hasBuildEverFailed: import_prop_types2.default.bool,
1648
+ shouldShowCancelBuildInstructions: import_prop_types2.default.bool,
1649
+ uiUrl: import_prop_types2.default.string
1646
1650
  };
1647
1651
  var Footer_default = Footer;
1648
1652
 
1649
1653
  // src/components/Header.tsx
1650
1654
  var import_ink12 = require("ink");
1651
- var import_prop_types5 = __toESM(require("prop-types"));
1655
+ var import_prop_types3 = __toESM(require("prop-types"));
1652
1656
  var import_jsx_runtime10 = require("react/jsx-runtime");
1653
1657
  var getText = (build, name, version) => {
1654
1658
  const suffix = name + (version ? ` v${version}` : "");
@@ -1676,9 +1680,9 @@ var getText = (build, name, version) => {
1676
1680
  };
1677
1681
  var Header = ({ build, name, version }) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ink12.Box, { marginBottom: 1, children: getText(build, name, version) });
1678
1682
  Header.propTypes = {
1679
- build: import_prop_types5.default.object,
1680
- name: import_prop_types5.default.string.isRequired,
1681
- version: import_prop_types5.default.string
1683
+ build: import_prop_types3.default.shape({}),
1684
+ name: import_prop_types3.default.string.isRequired,
1685
+ version: import_prop_types3.default.string
1682
1686
  };
1683
1687
  var Header_default = Header;
1684
1688
 
@@ -1761,7 +1765,7 @@ var MainLayout_default = MainLayout;
1761
1765
  var import_ink15 = require("ink");
1762
1766
 
1763
1767
  // src/commands/build/components/ProgressBar.tsx
1764
- var import_prop_types6 = __toESM(require("prop-types"));
1768
+ var import_prop_types4 = __toESM(require("prop-types"));
1765
1769
  var import_ink_gradient = __toESM(require("ink-gradient"));
1766
1770
 
1767
1771
  // src/libs/ink-progress-bar/index.tsx
@@ -1794,15 +1798,15 @@ var ink_progress_bar_default = Bar;
1794
1798
  var import_jsx_runtime13 = require("react/jsx-runtime");
1795
1799
  var ProgressBar = ({ left, right, percent }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ink_gradient.default, { colors: ["gray", "white"], children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ink_progress_bar_default, { left, right, percent }) });
1796
1800
  ProgressBar.propTypes = {
1797
- left: import_prop_types6.default.number,
1798
- right: import_prop_types6.default.number,
1801
+ left: import_prop_types4.default.number,
1802
+ right: import_prop_types4.default.number,
1799
1803
  // 0 -> 1
1800
- percent: import_prop_types6.default.number.isRequired
1804
+ percent: import_prop_types4.default.number.isRequired
1801
1805
  };
1802
1806
  var ProgressBar_default = ProgressBar;
1803
1807
 
1804
1808
  // src/commands/build/components/Preparation.tsx
1805
- var import_prop_types7 = __toESM(require("prop-types"));
1809
+ var import_prop_types5 = __toESM(require("prop-types"));
1806
1810
  var import_jsx_runtime14 = require("react/jsx-runtime");
1807
1811
  var Preparation = ({ progressPercentage, stageLabel, uploadedSize }) => {
1808
1812
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_ink15.Box, { marginBottom: 1, children: [
@@ -1817,9 +1821,9 @@ var Preparation = ({ progressPercentage, stageLabel, uploadedSize }) => {
1817
1821
  ] });
1818
1822
  };
1819
1823
  Preparation.propTypes = {
1820
- progressPercentage: import_prop_types7.default.number.isRequired,
1821
- stageLabel: import_prop_types7.default.string.isRequired,
1822
- uploadedSize: import_prop_types7.default.string
1824
+ progressPercentage: import_prop_types5.default.number.isRequired,
1825
+ stageLabel: import_prop_types5.default.string.isRequired,
1826
+ uploadedSize: import_prop_types5.default.string
1823
1827
  };
1824
1828
  var Preparation_default = Preparation;
1825
1829
 
@@ -1959,11 +1963,20 @@ function loadConfig(configPath) {
1959
1963
 
1960
1964
  // src/utilities/projectConfig/resolveConfigPaths.ts
1961
1965
  var path3 = __toESM(require("path"));
1966
+ function resolveAppRoot(appPath, projectRoot) {
1967
+ if (!appPath) {
1968
+ return projectRoot;
1969
+ }
1970
+ if (path3.isAbsolute(appPath)) {
1971
+ return appPath;
1972
+ }
1973
+ return path3.join(projectRoot, appPath);
1974
+ }
1962
1975
  function resolveConfigPaths({
1963
1976
  config,
1964
1977
  projectRoot
1965
1978
  }) {
1966
- const appRoot = config.appPath ? path3.isAbsolute(config.appPath) ? config.appPath : path3.join(projectRoot, config.appPath) : projectRoot;
1979
+ const appRoot = resolveAppRoot(config.appPath, projectRoot);
1967
1980
  const transformIfExists = (value, transformer) => value ? transformer(value) : void 0;
1968
1981
  const resolvePath = (filePath) => path3.isAbsolute(filePath) ? filePath : path3.join(projectRoot, filePath);
1969
1982
  const result = {
@@ -2879,6 +2892,16 @@ var schema_default = {
2879
2892
  examples: ["0.1.0"],
2880
2893
  default: "0.0.12"
2881
2894
  },
2895
+ executableArgs: {
2896
+ type: "array",
2897
+ items: {
2898
+ type: "string"
2899
+ },
2900
+ description: "Additional command-line arguments to pass to the executable in the Linux .desktop file Exec line.",
2901
+ examples: [
2902
+ ["--enable-features=UseOzonePlatform", "--ozone-platform=x11"]
2903
+ ]
2904
+ },
2882
2905
  noSandbox: {
2883
2906
  type: "boolean",
2884
2907
  description: "This option allows you to configure whether your app should run in a sandboxed environment.",
@@ -3909,8 +3932,13 @@ async function prepareWorkspaceBundle(input) {
3909
3932
  });
3910
3933
  if (!bundledPackageNames.size) {
3911
3934
  logger_default.info("No workspace packages matched bundle criteria.");
3935
+ const rewrittenAppPkgJson2 = applyRewriteMap(
3936
+ appPkgJson,
3937
+ {},
3938
+ workspace.catalog
3939
+ );
3912
3940
  return {
3913
- appPackageJson: appPkgJson,
3941
+ appPackageJson: rewrittenAppPkgJson2,
3914
3942
  entries: [],
3915
3943
  shouldBundle: false
3916
3944
  };
@@ -4722,8 +4750,8 @@ async function uploadApplicationSource({
4722
4750
  onError: (e) => {
4723
4751
  throw e;
4724
4752
  },
4725
- onProgress({ fs: fs6 }) {
4726
- totalBytes = fs6.totalBytes;
4753
+ onProgress({ fs: fileStats }) {
4754
+ totalBytes = fileStats.totalBytes;
4727
4755
  },
4728
4756
  appPkgJson: effectiveAppPkgJson
4729
4757
  }),
@@ -4969,12 +4997,12 @@ function Build({
4969
4997
  // src/components/LoginHOC.tsx
4970
4998
  var import_ink19 = require("ink");
4971
4999
  var import_react12 = require("react");
4972
- var import_prop_types9 = __toESM(require("prop-types"));
5000
+ var import_prop_types7 = __toESM(require("prop-types"));
4973
5001
  var import_is_ci4 = __toESM(require("is-ci"));
4974
5002
 
4975
5003
  // src/components/Login.tsx
4976
5004
  var import_ink17 = require("ink");
4977
- var import_prop_types8 = __toESM(require("prop-types"));
5005
+ var import_prop_types6 = __toESM(require("prop-types"));
4978
5006
  var import_react11 = require("react");
4979
5007
  var import_react_final_form = require("react-final-form");
4980
5008
 
@@ -5092,11 +5120,11 @@ var Error2 = ({
5092
5120
  marginTop
5093
5121
  }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ink17.Box, { marginTop: marginTop ? 1 : 0, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ink17.Text, { color: "red", children: errorMessage }) });
5094
5122
  Error2.propTypes = {
5095
- errorMessage: import_prop_types8.default.string.isRequired,
5096
- marginTop: import_prop_types8.default.bool
5123
+ errorMessage: import_prop_types6.default.string.isRequired,
5124
+ marginTop: import_prop_types6.default.bool
5097
5125
  };
5098
5126
  Login.propTypes = {
5099
- setIsLoggedIn: import_prop_types8.default.func.isRequired
5127
+ setIsLoggedIn: import_prop_types6.default.func.isRequired
5100
5128
  };
5101
5129
  var Login_default = Login;
5102
5130
 
@@ -5139,7 +5167,15 @@ var LoginHOC = ({ children, isInteractive = true }) => {
5139
5167
  );
5140
5168
  if (newJwtToken) {
5141
5169
  userCreds = await signInWithCustomToken(newJwtToken);
5142
- if (userCreds.user) setIsLoggedIn(true);
5170
+ if (userCreds.user) {
5171
+ setEphemeralMode(true);
5172
+ setAuthConfig(
5173
+ TODESKTOP_EMAIL,
5174
+ TODESKTOP_ACCESS_TOKEN,
5175
+ newJwtToken
5176
+ );
5177
+ setIsLoggedIn(true);
5178
+ }
5143
5179
  }
5144
5180
  } else if (!isRawModeSupported || import_is_ci4.default) {
5145
5181
  setError(
@@ -5191,8 +5227,8 @@ var LoginHOC = ({ children, isInteractive = true }) => {
5191
5227
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children });
5192
5228
  };
5193
5229
  LoginHOC.propTypes = {
5194
- children: import_prop_types9.default.object,
5195
- isInteractive: import_prop_types9.default.bool
5230
+ children: import_prop_types7.default.node,
5231
+ isInteractive: import_prop_types7.default.bool
5196
5232
  };
5197
5233
  var LoginHOC_default = LoginHOC;
5198
5234
 
@@ -5227,7 +5263,7 @@ var ErrorBoundary_default = ErrorBoundary;
5227
5263
  // src/commands/build/components/OngoingBuildGuard.tsx
5228
5264
  var import_ink23 = require("ink");
5229
5265
  var import_ink_select_input = __toESM(require("ink-select-input"));
5230
- var import_prop_types11 = __toESM(require("prop-types"));
5266
+ var import_prop_types9 = __toESM(require("prop-types"));
5231
5267
  var import_react15 = require("react");
5232
5268
 
5233
5269
  // src/components/CustomSelectInputIndicator.tsx
@@ -5254,7 +5290,7 @@ function CustomSelectInputItem({
5254
5290
 
5255
5291
  // src/components/ViewBuild.tsx
5256
5292
  var import_ink22 = require("ink");
5257
- var import_prop_types10 = __toESM(require("prop-types"));
5293
+ var import_prop_types8 = __toESM(require("prop-types"));
5258
5294
  var import_react14 = require("react");
5259
5295
 
5260
5296
  // src/utilities/getLatestBuildId.ts
@@ -5373,11 +5409,11 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
5373
5409
  isLoading: true
5374
5410
  });
5375
5411
  const onError = (e) => {
5376
- const error2 = e.response ? e.response.data : e;
5377
- logForCI(error2);
5412
+ const errorData = e.response ? e.response.data : e;
5413
+ logForCI(errorData);
5378
5414
  setState((prevState) => ({
5379
5415
  ...prevState,
5380
- error: error2
5416
+ error: errorData
5381
5417
  }));
5382
5418
  };
5383
5419
  (0, import_react14.useEffect)(() => {
@@ -5492,8 +5528,8 @@ ViewBuild.propTypes = {
5492
5528
  );
5493
5529
  }
5494
5530
  },
5495
- commandUsed: import_prop_types10.default.string.isRequired,
5496
- configPath: import_prop_types10.default.string
5531
+ commandUsed: import_prop_types8.default.string.isRequired,
5532
+ configPath: import_prop_types8.default.string
5497
5533
  };
5498
5534
  var ViewBuild_default = ViewBuild;
5499
5535
 
@@ -5612,7 +5648,10 @@ var OngoingBuildGuard = ({
5612
5648
  label: "Exit",
5613
5649
  value: "exit"
5614
5650
  });
5615
- const handleSelect = (itemChosen2) => setState((previousState) => ({ ...previousState, itemChosen: itemChosen2 }));
5651
+ const handleSelect = (selectedItem) => setState((previousState) => ({
5652
+ ...previousState,
5653
+ itemChosen: selectedItem
5654
+ }));
5616
5655
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
5617
5656
  /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_ink23.Box, { marginBottom: 1, children: [
5618
5657
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ink23.Text, { bold: true, children: multiple ? "There are ongoing builds " : "There is an ongoing build " }),
@@ -5638,9 +5677,9 @@ var OngoingBuildGuard = ({
5638
5677
  }
5639
5678
  };
5640
5679
  OngoingBuildGuard.propTypes = {
5641
- commandUsed: import_prop_types11.default.string.isRequired,
5642
- children: import_prop_types11.default.oneOfType([import_prop_types11.default.array, import_prop_types11.default.object]),
5643
- configPath: import_prop_types11.default.string
5680
+ commandUsed: import_prop_types9.default.string.isRequired,
5681
+ children: import_prop_types9.default.oneOfType([import_prop_types9.default.array, import_prop_types9.default.object]),
5682
+ configPath: import_prop_types9.default.string
5644
5683
  };
5645
5684
  var OngoingBuildGuard_default = OngoingBuildGuard;
5646
5685
 
@@ -5712,16 +5751,16 @@ function BuildCommand({
5712
5751
 
5713
5752
  // src/components/ViewBuilds.tsx
5714
5753
  var import_ink29 = require("ink");
5715
- var import_prop_types17 = __toESM(require("prop-types"));
5754
+ var import_prop_types15 = __toESM(require("prop-types"));
5716
5755
  var import_react18 = require("react");
5717
5756
 
5718
5757
  // src/components/Table.tsx
5719
5758
  var import_ink27 = require("ink");
5720
- var import_prop_types16 = __toESM(require("prop-types"));
5759
+ var import_prop_types14 = __toESM(require("prop-types"));
5721
5760
 
5722
5761
  // src/components/TableEnd.tsx
5723
5762
  var import_ink24 = require("ink");
5724
- var import_prop_types12 = __toESM(require("prop-types"));
5763
+ var import_prop_types10 = __toESM(require("prop-types"));
5725
5764
  var import_jsx_runtime25 = require("react/jsx-runtime");
5726
5765
  var TableEnd = ({ keyDetails, ...props }) => {
5727
5766
  let content = "\u2514";
@@ -5730,13 +5769,13 @@ var TableEnd = ({ keyDetails, ...props }) => {
5730
5769
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ink24.Box, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ink24.Text, { children: content }) });
5731
5770
  };
5732
5771
  TableEnd.propTypes = {
5733
- keyDetails: import_prop_types12.default.object.isRequired
5772
+ keyDetails: import_prop_types10.default.shape({}).isRequired
5734
5773
  };
5735
5774
  var TableEnd_default = TableEnd;
5736
5775
 
5737
5776
  // src/components/TableHead.tsx
5738
5777
  var import_ink25 = require("ink");
5739
- var import_prop_types13 = __toESM(require("prop-types"));
5778
+ var import_prop_types11 = __toESM(require("prop-types"));
5740
5779
  var import_react17 = require("react");
5741
5780
  var import_jsx_runtime26 = require("react/jsx-runtime");
5742
5781
  var TableHead = ({ keyDetails, ...props }) => {
@@ -5761,17 +5800,17 @@ var TableHead = ({ keyDetails, ...props }) => {
5761
5800
  ] });
5762
5801
  };
5763
5802
  TableHead.propTypes = {
5764
- bottomLinePrefix: import_prop_types13.default.string,
5765
- keyDetails: import_prop_types13.default.object.isRequired
5803
+ bottomLinePrefix: import_prop_types11.default.string,
5804
+ keyDetails: import_prop_types11.default.shape({}).isRequired
5766
5805
  };
5767
5806
  var TableHead_default = TableHead;
5768
5807
 
5769
5808
  // src/components/TableBody.tsx
5770
- var import_prop_types15 = __toESM(require("prop-types"));
5809
+ var import_prop_types13 = __toESM(require("prop-types"));
5771
5810
 
5772
5811
  // src/components/TableRow.tsx
5773
5812
  var import_ink26 = require("ink");
5774
- var import_prop_types14 = __toESM(require("prop-types"));
5813
+ var import_prop_types12 = __toESM(require("prop-types"));
5775
5814
  var import_jsx_runtime27 = require("react/jsx-runtime");
5776
5815
  var TableRow = ({
5777
5816
  data,
@@ -5809,10 +5848,10 @@ var TableRow = ({
5809
5848
  ] });
5810
5849
  };
5811
5850
  TableRow.propTypes = {
5812
- data: import_prop_types14.default.object.isRequired,
5813
- getCellTextProps: import_prop_types14.default.func,
5814
- keyDetails: import_prop_types14.default.object.isRequired,
5815
- textProps: import_prop_types14.default.object
5851
+ data: import_prop_types12.default.shape({}).isRequired,
5852
+ getCellTextProps: import_prop_types12.default.func,
5853
+ keyDetails: import_prop_types12.default.shape({}).isRequired,
5854
+ textProps: import_prop_types12.default.shape({})
5816
5855
  };
5817
5856
  var TableRow_default = TableRow;
5818
5857
 
@@ -5843,8 +5882,8 @@ TableBody.propTypes = {
5843
5882
  );
5844
5883
  }
5845
5884
  },
5846
- getCellTextProps: import_prop_types15.default.func,
5847
- keyDetails: import_prop_types15.default.object.isRequired
5885
+ getCellTextProps: import_prop_types13.default.func,
5886
+ keyDetails: import_prop_types13.default.shape({}).isRequired
5848
5887
  };
5849
5888
  var TableBody_default = TableBody;
5850
5889
 
@@ -5894,7 +5933,7 @@ Table.propTypes = {
5894
5933
  );
5895
5934
  }
5896
5935
  },
5897
- getCellTextProps: import_prop_types16.default.func
5936
+ getCellTextProps: import_prop_types14.default.func
5898
5937
  };
5899
5938
  var Table_default = Table;
5900
5939
 
@@ -6033,12 +6072,12 @@ var ViewBuilds = ({
6033
6072
  return;
6034
6073
  }
6035
6074
  const pageSize = count || 5;
6036
- const user2 = await findAppUserId_default(config.id);
6075
+ const fetchedUser = await findAppUserId_default(config.id);
6037
6076
  getBuilds({
6038
6077
  appId: config.id,
6039
6078
  limit: pageSize + 1,
6040
6079
  startAfter,
6041
- userId: user2.id
6080
+ userId: fetchedUser.id
6042
6081
  }).then((buildsResult) => {
6043
6082
  setState((previousState) => {
6044
6083
  const stateUpdates = {
@@ -6048,7 +6087,7 @@ var ViewBuilds = ({
6048
6087
  isLoading: false,
6049
6088
  projectConfig: config,
6050
6089
  startAfter: null,
6051
- user: user2
6090
+ user: fetchedUser
6052
6091
  };
6053
6092
  if (buildsResult.length) {
6054
6093
  stateUpdates.builds = [
@@ -6099,7 +6138,7 @@ var ViewBuilds = ({
6099
6138
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(LoadingText_default, {});
6100
6139
  }
6101
6140
  if (builds.length) {
6102
- const formatData = (builds2) => builds2.map((build) => ({
6141
+ const formatData = (buildList) => buildList.map((build) => ({
6103
6142
  "ID": build.id,
6104
6143
  "Version": build.appVersion || "n/a",
6105
6144
  "Creation date": getRelativeDateFromDateString_default(build.createdAt),
@@ -6134,12 +6173,21 @@ var ViewBuilds = ({
6134
6173
  }
6135
6174
  ) : null,
6136
6175
  format === "json" ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SyntaxHighlight_default, { object: removeAppBuilderLibConfig(builds) }) : null,
6137
- !shouldExitAfterViewingBuilds && builds.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink29.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink29.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
6176
+ !shouldExitAfterViewingBuilds && builds.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink29.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink29.Text, { color: "gray", dimColor: true, children: getBuildsStatusText(isLoading, hasMoreToLoad, builds.length) }) }) : null
6138
6177
  ] });
6139
6178
  } else {
6140
6179
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink29.Text, { children: "There are no builds yet" });
6141
6180
  }
6142
6181
  };
6182
+ var getBuildsStatusText = (isLoading, hasMoreToLoad, buildsCount) => {
6183
+ if (isLoading) {
6184
+ return "Loading more...";
6185
+ }
6186
+ if (hasMoreToLoad) {
6187
+ return `Showing the latest ${buildsCount} builds. Press space/down to load more.`;
6188
+ }
6189
+ return `Showing all (${buildsCount}) builds`;
6190
+ };
6143
6191
  var removeAppBuilderLibConfig = (builds) => {
6144
6192
  return builds.map((build) => {
6145
6193
  if (build.mac && build.mac.appBuilderLibConfig) {
@@ -6155,11 +6203,11 @@ var removeAppBuilderLibConfig = (builds) => {
6155
6203
  });
6156
6204
  };
6157
6205
  ViewBuilds.propTypes = {
6158
- commandUsed: import_prop_types17.default.string.isRequired,
6159
- configPath: import_prop_types17.default.string,
6160
- count: import_prop_types17.default.number,
6161
- format: import_prop_types17.default.string,
6162
- exit: import_prop_types17.default.bool
6206
+ commandUsed: import_prop_types15.default.string.isRequired,
6207
+ configPath: import_prop_types15.default.string,
6208
+ count: import_prop_types15.default.number,
6209
+ format: import_prop_types15.default.string,
6210
+ exit: import_prop_types15.default.bool
6163
6211
  };
6164
6212
  var ViewBuilds_default = ViewBuilds;
6165
6213
 
@@ -6356,11 +6404,11 @@ function startTokenRefreshMonitoring(user, verbose) {
6356
6404
  const timeUntilExpiry = decoded.exp * 1e3 - Date.now();
6357
6405
  if (timeUntilExpiry < 5 * 60 * 1e3) {
6358
6406
  if (verbose) {
6359
- console.log("[Token refresh] ID token expiring soon, refreshing...");
6407
+ console.info("[Token refresh] ID token expiring soon, refreshing...");
6360
6408
  }
6361
6409
  await user.getIdToken(true);
6362
6410
  if (verbose) {
6363
- console.log("[Token refresh] ID token refreshed successfully");
6411
+ console.info("[Token refresh] ID token refreshed successfully");
6364
6412
  }
6365
6413
  }
6366
6414
  } catch (err) {
@@ -6458,7 +6506,7 @@ ${message2}`;
6458
6506
  if (isError) {
6459
6507
  console.error(output);
6460
6508
  } else {
6461
- console.log(output);
6509
+ console.info(output);
6462
6510
  }
6463
6511
  }
6464
6512
  const exitFn = exitRef.current;
@@ -6483,7 +6531,7 @@ ${message2}`;
6483
6531
  );
6484
6532
  setJti(sessionResponse.jti);
6485
6533
  if (verbose) {
6486
- console.log(
6534
+ console.info(
6487
6535
  `
6488
6536
  Session started (JTI: ${sessionResponse.jti}, expires: ${new Date(
6489
6537
  sessionResponse.expiresAt * 1e3
@@ -6557,16 +6605,16 @@ The ${platform} build may not have started yet.`,
6557
6605
  "ECONNRESET",
6558
6606
  "ETIMEDOUT"
6559
6607
  ]);
6560
- const shouldRetry = (error2) => {
6608
+ const shouldRetry = (err) => {
6561
6609
  var _a2, _b, _c;
6562
6610
  if (retryCountRef.current >= maxRetries) {
6563
6611
  return false;
6564
6612
  }
6565
- const code = (_a2 = error2.code) == null ? void 0 : _a2.toUpperCase();
6613
+ const code = (_a2 = err.code) == null ? void 0 : _a2.toUpperCase();
6566
6614
  if (code && retryableErrorCodes.has(code)) {
6567
6615
  return true;
6568
6616
  }
6569
- const message2 = ((_c = (_b = error2.message) == null ? void 0 : _b.toLowerCase) == null ? void 0 : _c.call(_b)) ?? "";
6617
+ const message2 = ((_c = (_b = err.message) == null ? void 0 : _b.toLowerCase) == null ? void 0 : _c.call(_b)) ?? "";
6570
6618
  return ["enotfound", "eai_again", "econnrefused", "etimedout"].some(
6571
6619
  (indicator) => message2.includes(indicator)
6572
6620
  );
@@ -6576,7 +6624,7 @@ The ${platform} build may not have started yet.`,
6576
6624
  retryCountRef.current = attempt;
6577
6625
  if (verbose) {
6578
6626
  const attemptLabel = attempt === 1 ? "initial" : `retry ${attempt}`;
6579
- console.log(
6627
+ console.info(
6580
6628
  `[Introspect] Starting ${attemptLabel} connection attempt to ${tunnelUrlValue}`
6581
6629
  );
6582
6630
  }
@@ -6627,7 +6675,7 @@ The ${platform} build may not have started yet.`,
6627
6675
  }
6628
6676
  } else if (message2.type === "state") {
6629
6677
  if (verbose) {
6630
- console.log(
6678
+ console.info(
6631
6679
  `
6632
6680
  [Server state] Platform: ${message2.platform}, WD: ${message2.workingDirectory}, Shell: ${message2.shell}
6633
6681
  `
@@ -6638,19 +6686,19 @@ The ${platform} build may not have started yet.`,
6638
6686
  process.stdout.write(dataStr);
6639
6687
  }
6640
6688
  });
6641
- socket.on("error", (err) => {
6642
- const error2 = err;
6643
- if (shouldRetry(error2)) {
6689
+ socket.on("error", (socketErr) => {
6690
+ const socketError = socketErr;
6691
+ if (shouldRetry(socketError)) {
6644
6692
  const nextAttempt = retryCountRef.current + 1;
6645
6693
  const delay2 = Math.min(5e3, baseRetryDelayMs * nextAttempt);
6646
6694
  isRetryingRef.current = true;
6647
6695
  if (verbose) {
6648
- console.log(
6649
- `[Introspect] Connection attempt ${retryCountRef.current} failed (${error2.code ?? error2.message}). Retrying in ${delay2}ms...`
6696
+ console.info(
6697
+ `[Introspect] Connection attempt ${retryCountRef.current} failed (${socketError.code ?? socketError.message}). Retrying in ${delay2}ms...`
6650
6698
  );
6651
6699
  } else {
6652
- console.log(
6653
- `Connection failed (${error2.code ?? error2.message}). Retrying (${nextAttempt}/${maxRetries})...`
6700
+ console.info(
6701
+ `Connection failed (${socketError.code ?? socketError.message}). Retrying (${nextAttempt}/${maxRetries})...`
6654
6702
  );
6655
6703
  }
6656
6704
  if (retryTimeoutRef.current) {
@@ -6669,7 +6717,7 @@ The ${platform} build may not have started yet.`,
6669
6717
  }, delay2);
6670
6718
  return;
6671
6719
  }
6672
- const errorMessage = `WebSocket error: ${error2.message}`;
6720
+ const errorMessage = `WebSocket error: ${socketError.message}`;
6673
6721
  setError(errorMessage);
6674
6722
  setStatus("error");
6675
6723
  exitSession({ message: errorMessage, isError: true });
@@ -6765,7 +6813,7 @@ var import_ink32 = require("ink");
6765
6813
  // src/components/SelectTable.tsx
6766
6814
  var import_ink31 = require("ink");
6767
6815
  var import_ink_select_input2 = __toESM(require("ink-select-input"));
6768
- var import_prop_types18 = __toESM(require("prop-types"));
6816
+ var import_prop_types16 = __toESM(require("prop-types"));
6769
6817
  var import_jsx_runtime34 = require("react/jsx-runtime");
6770
6818
  var CustomIndicator = (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CustomSelectInputIndicator, { marginTop: 1, ...props });
6771
6819
  var SelectTable = ({ data, onSelect }) => {
@@ -6824,7 +6872,7 @@ SelectTable.propTypes = {
6824
6872
  );
6825
6873
  }
6826
6874
  },
6827
- onSelect: import_prop_types18.default.func
6875
+ onSelect: import_prop_types16.default.func
6828
6876
  };
6829
6877
  var SelectTable_default = SelectTable;
6830
6878
 
@@ -7038,7 +7086,7 @@ async function getRunningBuildsWithIntrospection(configPath) {
7038
7086
  if (snapshot.empty) {
7039
7087
  return [];
7040
7088
  }
7041
- const builds = snapshot.docs.map((doc11) => doc11.data()).filter((build) => {
7089
+ const builds = snapshot.docs.map((docSnapshot) => docSnapshot.data()).filter((build) => {
7042
7090
  var _a2, _b, _c;
7043
7091
  if (!build.introspect) return false;
7044
7092
  const hasEnabledPlatform = ((_a2 = build.introspect.mac) == null ? void 0 : _a2.enabled) || ((_b = build.introspect.windows) == null ? void 0 : _b.enabled) || ((_c = build.introspect.linux) == null ? void 0 : _c.enabled);
@@ -7823,12 +7871,13 @@ function validateBuild(build) {
7823
7871
  `The build must be completed successfully. Actual build status: ${build.status}`
7824
7872
  );
7825
7873
  }
7826
- if (!build.todesktopRuntimeVersionSpecified) {
7874
+ const actualRange = build.todesktopRuntimeVersionUsed || build.todesktopRuntimeVersionSpecified;
7875
+ if (!actualRange) {
7827
7876
  throw new CliError(
7828
- "The build has no todesktopRuntimeVersionSpecified set. Please make sure @todesktop/runtime is installed as a dependency and make a new build"
7877
+ "The build has no todesktopRuntimeVersionSpecified or todesktopRuntimeVersionUsed set. Please make sure @todesktop/runtime is installed as a dependency and make a new build"
7829
7878
  );
7830
7879
  }
7831
- if (!isRuntimeVerRangeAllowed(build.todesktopRuntimeVersionSpecified)) {
7880
+ if (!isRuntimeVerRangeAllowed(actualRange)) {
7832
7881
  throw new CliError(
7833
7882
  `This build should have @todesktop/runtime version ${MIN_RUNTIME_VERSION} or later to run smoke tests.`
7834
7883
  );
@@ -8688,7 +8737,7 @@ var package_default = {
8688
8737
  access: "public"
8689
8738
  },
8690
8739
  name: "@todesktop/cli",
8691
- version: "1.20.0-1",
8740
+ version: "1.21.0",
8692
8741
  license: "MIT",
8693
8742
  author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
8694
8743
  homepage: "https://todesktop.com/cli",
@@ -8704,18 +8753,19 @@ var package_default = {
8704
8753
  },
8705
8754
  scripts: {
8706
8755
  build: "npm run docs:generate && npm run types:generate && node scripts/esbuild.js",
8707
- dev: "node scripts/esbuild.js --link --watch --stage dev",
8708
- "dev:local:prod": "node scripts/esbuild.js --link --watch --stage prod-local",
8709
- "dev:prod": "node scripts/esbuild.js --link --watch",
8710
8756
  "docs:generate": "node scripts/generate-readme.js",
8711
8757
  format: "prettier . --write && eslint --fix",
8712
8758
  lint: "prettier . --check && eslint",
8713
- "types:generate": "node scripts/generate-types.js",
8759
+ prepublishOnly: "npm run docs:generate",
8714
8760
  test: "ava",
8715
8761
  "test:e2e": "node test/output-snapshots/output.test.js",
8716
- "test--watch": "npm test -- --watch",
8762
+ "test:watch": "npm test -- --watch",
8717
8763
  typecheck: "tsc --noEmit && tsc-strict",
8718
- prepublishOnly: "npm run docs:generate"
8764
+ "types:generate": "node scripts/generate-types.js",
8765
+ "watch:dev": "node scripts/esbuild.js --link --watch --stage dev",
8766
+ "watch:dev-local": "node scripts/esbuild.js --link --watch --stage dev-local",
8767
+ "watch:prod": "node scripts/esbuild.js --link --watch",
8768
+ "watch:prod-local": "node scripts/esbuild.js --link --watch --stage prod-local"
8719
8769
  },
8720
8770
  files: [
8721
8771
  "scripts/postinstall.js",
@@ -8907,7 +8957,7 @@ async function continueBreakpoint({
8907
8957
  platform,
8908
8958
  idToken
8909
8959
  });
8910
- console.log(
8960
+ console.info(
8911
8961
  `Sent resume command for build ${buildId} (${platform}). Check the original terminal for progress.`
8912
8962
  );
8913
8963
  }
@@ -9015,7 +9065,7 @@ import_commander.program.command("build").description(
9015
9065
  process.exit(1);
9016
9066
  }
9017
9067
  if (breakpoints === "list") {
9018
- console.log(formatBreakpointCatalog());
9068
+ console.info(formatBreakpointCatalog());
9019
9069
  return;
9020
9070
  }
9021
9071
  let breakpointPlan;
@@ -9090,7 +9140,8 @@ import_commander.program.command("introspect [buildId]").description("Connect to
9090
9140
  configPath: options == null ? void 0 : options.config
9091
9141
  });
9092
9142
  }
9093
- ).command("whoami").description("Prints the email of the account you're signed into").action(() => {
9143
+ );
9144
+ import_commander.program.command("whoami").description("Prints the email of the account you're signed into").action(() => {
9094
9145
  runCommand(WhoamiCommand_default);
9095
9146
  });
9096
9147
  var runCommand = (component, props = null, { exitIfOutOfDate = true } = {}) => {