@todesktop/cli 1.20.0-0 → 1.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/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 = {
@@ -3909,8 +3922,13 @@ async function prepareWorkspaceBundle(input) {
3909
3922
  });
3910
3923
  if (!bundledPackageNames.size) {
3911
3924
  logger_default.info("No workspace packages matched bundle criteria.");
3925
+ const rewrittenAppPkgJson2 = applyRewriteMap(
3926
+ appPkgJson,
3927
+ {},
3928
+ workspace.catalog
3929
+ );
3912
3930
  return {
3913
- appPackageJson: appPkgJson,
3931
+ appPackageJson: rewrittenAppPkgJson2,
3914
3932
  entries: [],
3915
3933
  shouldBundle: false
3916
3934
  };
@@ -4722,8 +4740,8 @@ async function uploadApplicationSource({
4722
4740
  onError: (e) => {
4723
4741
  throw e;
4724
4742
  },
4725
- onProgress({ fs: fs6 }) {
4726
- totalBytes = fs6.totalBytes;
4743
+ onProgress({ fs: fileStats }) {
4744
+ totalBytes = fileStats.totalBytes;
4727
4745
  },
4728
4746
  appPkgJson: effectiveAppPkgJson
4729
4747
  }),
@@ -4969,12 +4987,12 @@ function Build({
4969
4987
  // src/components/LoginHOC.tsx
4970
4988
  var import_ink19 = require("ink");
4971
4989
  var import_react12 = require("react");
4972
- var import_prop_types9 = __toESM(require("prop-types"));
4990
+ var import_prop_types7 = __toESM(require("prop-types"));
4973
4991
  var import_is_ci4 = __toESM(require("is-ci"));
4974
4992
 
4975
4993
  // src/components/Login.tsx
4976
4994
  var import_ink17 = require("ink");
4977
- var import_prop_types8 = __toESM(require("prop-types"));
4995
+ var import_prop_types6 = __toESM(require("prop-types"));
4978
4996
  var import_react11 = require("react");
4979
4997
  var import_react_final_form = require("react-final-form");
4980
4998
 
@@ -5092,11 +5110,11 @@ var Error2 = ({
5092
5110
  marginTop
5093
5111
  }) => /* @__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
5112
  Error2.propTypes = {
5095
- errorMessage: import_prop_types8.default.string.isRequired,
5096
- marginTop: import_prop_types8.default.bool
5113
+ errorMessage: import_prop_types6.default.string.isRequired,
5114
+ marginTop: import_prop_types6.default.bool
5097
5115
  };
5098
5116
  Login.propTypes = {
5099
- setIsLoggedIn: import_prop_types8.default.func.isRequired
5117
+ setIsLoggedIn: import_prop_types6.default.func.isRequired
5100
5118
  };
5101
5119
  var Login_default = Login;
5102
5120
 
@@ -5191,8 +5209,8 @@ var LoginHOC = ({ children, isInteractive = true }) => {
5191
5209
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children });
5192
5210
  };
5193
5211
  LoginHOC.propTypes = {
5194
- children: import_prop_types9.default.object,
5195
- isInteractive: import_prop_types9.default.bool
5212
+ children: import_prop_types7.default.node,
5213
+ isInteractive: import_prop_types7.default.bool
5196
5214
  };
5197
5215
  var LoginHOC_default = LoginHOC;
5198
5216
 
@@ -5227,7 +5245,7 @@ var ErrorBoundary_default = ErrorBoundary;
5227
5245
  // src/commands/build/components/OngoingBuildGuard.tsx
5228
5246
  var import_ink23 = require("ink");
5229
5247
  var import_ink_select_input = __toESM(require("ink-select-input"));
5230
- var import_prop_types11 = __toESM(require("prop-types"));
5248
+ var import_prop_types9 = __toESM(require("prop-types"));
5231
5249
  var import_react15 = require("react");
5232
5250
 
5233
5251
  // src/components/CustomSelectInputIndicator.tsx
@@ -5254,7 +5272,7 @@ function CustomSelectInputItem({
5254
5272
 
5255
5273
  // src/components/ViewBuild.tsx
5256
5274
  var import_ink22 = require("ink");
5257
- var import_prop_types10 = __toESM(require("prop-types"));
5275
+ var import_prop_types8 = __toESM(require("prop-types"));
5258
5276
  var import_react14 = require("react");
5259
5277
 
5260
5278
  // src/utilities/getLatestBuildId.ts
@@ -5373,11 +5391,11 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
5373
5391
  isLoading: true
5374
5392
  });
5375
5393
  const onError = (e) => {
5376
- const error2 = e.response ? e.response.data : e;
5377
- logForCI(error2);
5394
+ const errorData = e.response ? e.response.data : e;
5395
+ logForCI(errorData);
5378
5396
  setState((prevState) => ({
5379
5397
  ...prevState,
5380
- error: error2
5398
+ error: errorData
5381
5399
  }));
5382
5400
  };
5383
5401
  (0, import_react14.useEffect)(() => {
@@ -5492,8 +5510,8 @@ ViewBuild.propTypes = {
5492
5510
  );
5493
5511
  }
5494
5512
  },
5495
- commandUsed: import_prop_types10.default.string.isRequired,
5496
- configPath: import_prop_types10.default.string
5513
+ commandUsed: import_prop_types8.default.string.isRequired,
5514
+ configPath: import_prop_types8.default.string
5497
5515
  };
5498
5516
  var ViewBuild_default = ViewBuild;
5499
5517
 
@@ -5612,7 +5630,10 @@ var OngoingBuildGuard = ({
5612
5630
  label: "Exit",
5613
5631
  value: "exit"
5614
5632
  });
5615
- const handleSelect = (itemChosen2) => setState((previousState) => ({ ...previousState, itemChosen: itemChosen2 }));
5633
+ const handleSelect = (selectedItem) => setState((previousState) => ({
5634
+ ...previousState,
5635
+ itemChosen: selectedItem
5636
+ }));
5616
5637
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
5617
5638
  /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_ink23.Box, { marginBottom: 1, children: [
5618
5639
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ink23.Text, { bold: true, children: multiple ? "There are ongoing builds " : "There is an ongoing build " }),
@@ -5638,9 +5659,9 @@ var OngoingBuildGuard = ({
5638
5659
  }
5639
5660
  };
5640
5661
  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
5662
+ commandUsed: import_prop_types9.default.string.isRequired,
5663
+ children: import_prop_types9.default.oneOfType([import_prop_types9.default.array, import_prop_types9.default.object]),
5664
+ configPath: import_prop_types9.default.string
5644
5665
  };
5645
5666
  var OngoingBuildGuard_default = OngoingBuildGuard;
5646
5667
 
@@ -5712,16 +5733,16 @@ function BuildCommand({
5712
5733
 
5713
5734
  // src/components/ViewBuilds.tsx
5714
5735
  var import_ink29 = require("ink");
5715
- var import_prop_types17 = __toESM(require("prop-types"));
5736
+ var import_prop_types15 = __toESM(require("prop-types"));
5716
5737
  var import_react18 = require("react");
5717
5738
 
5718
5739
  // src/components/Table.tsx
5719
5740
  var import_ink27 = require("ink");
5720
- var import_prop_types16 = __toESM(require("prop-types"));
5741
+ var import_prop_types14 = __toESM(require("prop-types"));
5721
5742
 
5722
5743
  // src/components/TableEnd.tsx
5723
5744
  var import_ink24 = require("ink");
5724
- var import_prop_types12 = __toESM(require("prop-types"));
5745
+ var import_prop_types10 = __toESM(require("prop-types"));
5725
5746
  var import_jsx_runtime25 = require("react/jsx-runtime");
5726
5747
  var TableEnd = ({ keyDetails, ...props }) => {
5727
5748
  let content = "\u2514";
@@ -5730,13 +5751,13 @@ var TableEnd = ({ keyDetails, ...props }) => {
5730
5751
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ink24.Box, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ink24.Text, { children: content }) });
5731
5752
  };
5732
5753
  TableEnd.propTypes = {
5733
- keyDetails: import_prop_types12.default.object.isRequired
5754
+ keyDetails: import_prop_types10.default.shape({}).isRequired
5734
5755
  };
5735
5756
  var TableEnd_default = TableEnd;
5736
5757
 
5737
5758
  // src/components/TableHead.tsx
5738
5759
  var import_ink25 = require("ink");
5739
- var import_prop_types13 = __toESM(require("prop-types"));
5760
+ var import_prop_types11 = __toESM(require("prop-types"));
5740
5761
  var import_react17 = require("react");
5741
5762
  var import_jsx_runtime26 = require("react/jsx-runtime");
5742
5763
  var TableHead = ({ keyDetails, ...props }) => {
@@ -5761,17 +5782,17 @@ var TableHead = ({ keyDetails, ...props }) => {
5761
5782
  ] });
5762
5783
  };
5763
5784
  TableHead.propTypes = {
5764
- bottomLinePrefix: import_prop_types13.default.string,
5765
- keyDetails: import_prop_types13.default.object.isRequired
5785
+ bottomLinePrefix: import_prop_types11.default.string,
5786
+ keyDetails: import_prop_types11.default.shape({}).isRequired
5766
5787
  };
5767
5788
  var TableHead_default = TableHead;
5768
5789
 
5769
5790
  // src/components/TableBody.tsx
5770
- var import_prop_types15 = __toESM(require("prop-types"));
5791
+ var import_prop_types13 = __toESM(require("prop-types"));
5771
5792
 
5772
5793
  // src/components/TableRow.tsx
5773
5794
  var import_ink26 = require("ink");
5774
- var import_prop_types14 = __toESM(require("prop-types"));
5795
+ var import_prop_types12 = __toESM(require("prop-types"));
5775
5796
  var import_jsx_runtime27 = require("react/jsx-runtime");
5776
5797
  var TableRow = ({
5777
5798
  data,
@@ -5809,10 +5830,10 @@ var TableRow = ({
5809
5830
  ] });
5810
5831
  };
5811
5832
  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
5833
+ data: import_prop_types12.default.shape({}).isRequired,
5834
+ getCellTextProps: import_prop_types12.default.func,
5835
+ keyDetails: import_prop_types12.default.shape({}).isRequired,
5836
+ textProps: import_prop_types12.default.shape({})
5816
5837
  };
5817
5838
  var TableRow_default = TableRow;
5818
5839
 
@@ -5843,8 +5864,8 @@ TableBody.propTypes = {
5843
5864
  );
5844
5865
  }
5845
5866
  },
5846
- getCellTextProps: import_prop_types15.default.func,
5847
- keyDetails: import_prop_types15.default.object.isRequired
5867
+ getCellTextProps: import_prop_types13.default.func,
5868
+ keyDetails: import_prop_types13.default.shape({}).isRequired
5848
5869
  };
5849
5870
  var TableBody_default = TableBody;
5850
5871
 
@@ -5894,7 +5915,7 @@ Table.propTypes = {
5894
5915
  );
5895
5916
  }
5896
5917
  },
5897
- getCellTextProps: import_prop_types16.default.func
5918
+ getCellTextProps: import_prop_types14.default.func
5898
5919
  };
5899
5920
  var Table_default = Table;
5900
5921
 
@@ -6033,12 +6054,12 @@ var ViewBuilds = ({
6033
6054
  return;
6034
6055
  }
6035
6056
  const pageSize = count || 5;
6036
- const user2 = await findAppUserId_default(config.id);
6057
+ const fetchedUser = await findAppUserId_default(config.id);
6037
6058
  getBuilds({
6038
6059
  appId: config.id,
6039
6060
  limit: pageSize + 1,
6040
6061
  startAfter,
6041
- userId: user2.id
6062
+ userId: fetchedUser.id
6042
6063
  }).then((buildsResult) => {
6043
6064
  setState((previousState) => {
6044
6065
  const stateUpdates = {
@@ -6048,7 +6069,7 @@ var ViewBuilds = ({
6048
6069
  isLoading: false,
6049
6070
  projectConfig: config,
6050
6071
  startAfter: null,
6051
- user: user2
6072
+ user: fetchedUser
6052
6073
  };
6053
6074
  if (buildsResult.length) {
6054
6075
  stateUpdates.builds = [
@@ -6099,7 +6120,7 @@ var ViewBuilds = ({
6099
6120
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(LoadingText_default, {});
6100
6121
  }
6101
6122
  if (builds.length) {
6102
- const formatData = (builds2) => builds2.map((build) => ({
6123
+ const formatData = (buildList) => buildList.map((build) => ({
6103
6124
  "ID": build.id,
6104
6125
  "Version": build.appVersion || "n/a",
6105
6126
  "Creation date": getRelativeDateFromDateString_default(build.createdAt),
@@ -6134,12 +6155,21 @@ var ViewBuilds = ({
6134
6155
  }
6135
6156
  ) : null,
6136
6157
  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
6158
+ !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
6159
  ] });
6139
6160
  } else {
6140
6161
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ink29.Text, { children: "There are no builds yet" });
6141
6162
  }
6142
6163
  };
6164
+ var getBuildsStatusText = (isLoading, hasMoreToLoad, buildsCount) => {
6165
+ if (isLoading) {
6166
+ return "Loading more...";
6167
+ }
6168
+ if (hasMoreToLoad) {
6169
+ return `Showing the latest ${buildsCount} builds. Press space/down to load more.`;
6170
+ }
6171
+ return `Showing all (${buildsCount}) builds`;
6172
+ };
6143
6173
  var removeAppBuilderLibConfig = (builds) => {
6144
6174
  return builds.map((build) => {
6145
6175
  if (build.mac && build.mac.appBuilderLibConfig) {
@@ -6155,11 +6185,11 @@ var removeAppBuilderLibConfig = (builds) => {
6155
6185
  });
6156
6186
  };
6157
6187
  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
6188
+ commandUsed: import_prop_types15.default.string.isRequired,
6189
+ configPath: import_prop_types15.default.string,
6190
+ count: import_prop_types15.default.number,
6191
+ format: import_prop_types15.default.string,
6192
+ exit: import_prop_types15.default.bool
6163
6193
  };
6164
6194
  var ViewBuilds_default = ViewBuilds;
6165
6195
 
@@ -6356,11 +6386,11 @@ function startTokenRefreshMonitoring(user, verbose) {
6356
6386
  const timeUntilExpiry = decoded.exp * 1e3 - Date.now();
6357
6387
  if (timeUntilExpiry < 5 * 60 * 1e3) {
6358
6388
  if (verbose) {
6359
- console.log("[Token refresh] ID token expiring soon, refreshing...");
6389
+ console.info("[Token refresh] ID token expiring soon, refreshing...");
6360
6390
  }
6361
6391
  await user.getIdToken(true);
6362
6392
  if (verbose) {
6363
- console.log("[Token refresh] ID token refreshed successfully");
6393
+ console.info("[Token refresh] ID token refreshed successfully");
6364
6394
  }
6365
6395
  }
6366
6396
  } catch (err) {
@@ -6458,7 +6488,7 @@ ${message2}`;
6458
6488
  if (isError) {
6459
6489
  console.error(output);
6460
6490
  } else {
6461
- console.log(output);
6491
+ console.info(output);
6462
6492
  }
6463
6493
  }
6464
6494
  const exitFn = exitRef.current;
@@ -6483,7 +6513,7 @@ ${message2}`;
6483
6513
  );
6484
6514
  setJti(sessionResponse.jti);
6485
6515
  if (verbose) {
6486
- console.log(
6516
+ console.info(
6487
6517
  `
6488
6518
  Session started (JTI: ${sessionResponse.jti}, expires: ${new Date(
6489
6519
  sessionResponse.expiresAt * 1e3
@@ -6557,16 +6587,16 @@ The ${platform} build may not have started yet.`,
6557
6587
  "ECONNRESET",
6558
6588
  "ETIMEDOUT"
6559
6589
  ]);
6560
- const shouldRetry = (error2) => {
6590
+ const shouldRetry = (err) => {
6561
6591
  var _a2, _b, _c;
6562
6592
  if (retryCountRef.current >= maxRetries) {
6563
6593
  return false;
6564
6594
  }
6565
- const code = (_a2 = error2.code) == null ? void 0 : _a2.toUpperCase();
6595
+ const code = (_a2 = err.code) == null ? void 0 : _a2.toUpperCase();
6566
6596
  if (code && retryableErrorCodes.has(code)) {
6567
6597
  return true;
6568
6598
  }
6569
- const message2 = ((_c = (_b = error2.message) == null ? void 0 : _b.toLowerCase) == null ? void 0 : _c.call(_b)) ?? "";
6599
+ const message2 = ((_c = (_b = err.message) == null ? void 0 : _b.toLowerCase) == null ? void 0 : _c.call(_b)) ?? "";
6570
6600
  return ["enotfound", "eai_again", "econnrefused", "etimedout"].some(
6571
6601
  (indicator) => message2.includes(indicator)
6572
6602
  );
@@ -6576,7 +6606,7 @@ The ${platform} build may not have started yet.`,
6576
6606
  retryCountRef.current = attempt;
6577
6607
  if (verbose) {
6578
6608
  const attemptLabel = attempt === 1 ? "initial" : `retry ${attempt}`;
6579
- console.log(
6609
+ console.info(
6580
6610
  `[Introspect] Starting ${attemptLabel} connection attempt to ${tunnelUrlValue}`
6581
6611
  );
6582
6612
  }
@@ -6627,7 +6657,7 @@ The ${platform} build may not have started yet.`,
6627
6657
  }
6628
6658
  } else if (message2.type === "state") {
6629
6659
  if (verbose) {
6630
- console.log(
6660
+ console.info(
6631
6661
  `
6632
6662
  [Server state] Platform: ${message2.platform}, WD: ${message2.workingDirectory}, Shell: ${message2.shell}
6633
6663
  `
@@ -6638,19 +6668,19 @@ The ${platform} build may not have started yet.`,
6638
6668
  process.stdout.write(dataStr);
6639
6669
  }
6640
6670
  });
6641
- socket.on("error", (err) => {
6642
- const error2 = err;
6643
- if (shouldRetry(error2)) {
6671
+ socket.on("error", (socketErr) => {
6672
+ const socketError = socketErr;
6673
+ if (shouldRetry(socketError)) {
6644
6674
  const nextAttempt = retryCountRef.current + 1;
6645
6675
  const delay2 = Math.min(5e3, baseRetryDelayMs * nextAttempt);
6646
6676
  isRetryingRef.current = true;
6647
6677
  if (verbose) {
6648
- console.log(
6649
- `[Introspect] Connection attempt ${retryCountRef.current} failed (${error2.code ?? error2.message}). Retrying in ${delay2}ms...`
6678
+ console.info(
6679
+ `[Introspect] Connection attempt ${retryCountRef.current} failed (${socketError.code ?? socketError.message}). Retrying in ${delay2}ms...`
6650
6680
  );
6651
6681
  } else {
6652
- console.log(
6653
- `Connection failed (${error2.code ?? error2.message}). Retrying (${nextAttempt}/${maxRetries})...`
6682
+ console.info(
6683
+ `Connection failed (${socketError.code ?? socketError.message}). Retrying (${nextAttempt}/${maxRetries})...`
6654
6684
  );
6655
6685
  }
6656
6686
  if (retryTimeoutRef.current) {
@@ -6669,7 +6699,7 @@ The ${platform} build may not have started yet.`,
6669
6699
  }, delay2);
6670
6700
  return;
6671
6701
  }
6672
- const errorMessage = `WebSocket error: ${error2.message}`;
6702
+ const errorMessage = `WebSocket error: ${socketError.message}`;
6673
6703
  setError(errorMessage);
6674
6704
  setStatus("error");
6675
6705
  exitSession({ message: errorMessage, isError: true });
@@ -6765,7 +6795,7 @@ var import_ink32 = require("ink");
6765
6795
  // src/components/SelectTable.tsx
6766
6796
  var import_ink31 = require("ink");
6767
6797
  var import_ink_select_input2 = __toESM(require("ink-select-input"));
6768
- var import_prop_types18 = __toESM(require("prop-types"));
6798
+ var import_prop_types16 = __toESM(require("prop-types"));
6769
6799
  var import_jsx_runtime34 = require("react/jsx-runtime");
6770
6800
  var CustomIndicator = (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CustomSelectInputIndicator, { marginTop: 1, ...props });
6771
6801
  var SelectTable = ({ data, onSelect }) => {
@@ -6824,7 +6854,7 @@ SelectTable.propTypes = {
6824
6854
  );
6825
6855
  }
6826
6856
  },
6827
- onSelect: import_prop_types18.default.func
6857
+ onSelect: import_prop_types16.default.func
6828
6858
  };
6829
6859
  var SelectTable_default = SelectTable;
6830
6860
 
@@ -7038,7 +7068,7 @@ async function getRunningBuildsWithIntrospection(configPath) {
7038
7068
  if (snapshot.empty) {
7039
7069
  return [];
7040
7070
  }
7041
- const builds = snapshot.docs.map((doc11) => doc11.data()).filter((build) => {
7071
+ const builds = snapshot.docs.map((docSnapshot) => docSnapshot.data()).filter((build) => {
7042
7072
  var _a2, _b, _c;
7043
7073
  if (!build.introspect) return false;
7044
7074
  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 +7853,13 @@ function validateBuild(build) {
7823
7853
  `The build must be completed successfully. Actual build status: ${build.status}`
7824
7854
  );
7825
7855
  }
7826
- if (!build.todesktopRuntimeVersionSpecified) {
7856
+ const actualRange = build.todesktopRuntimeVersionUsed || build.todesktopRuntimeVersionSpecified;
7857
+ if (!actualRange) {
7827
7858
  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"
7859
+ "The build has no todesktopRuntimeVersionSpecified or todesktopRuntimeVersionUsed set. Please make sure @todesktop/runtime is installed as a dependency and make a new build"
7829
7860
  );
7830
7861
  }
7831
- if (!isRuntimeVerRangeAllowed(build.todesktopRuntimeVersionSpecified)) {
7862
+ if (!isRuntimeVerRangeAllowed(actualRange)) {
7832
7863
  throw new CliError(
7833
7864
  `This build should have @todesktop/runtime version ${MIN_RUNTIME_VERSION} or later to run smoke tests.`
7834
7865
  );
@@ -8688,7 +8719,7 @@ var package_default = {
8688
8719
  access: "public"
8689
8720
  },
8690
8721
  name: "@todesktop/cli",
8691
- version: "1.20.0-0",
8722
+ version: "1.20.2",
8692
8723
  license: "MIT",
8693
8724
  author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
8694
8725
  homepage: "https://todesktop.com/cli",
@@ -8714,13 +8745,15 @@ var package_default = {
8714
8745
  test: "ava",
8715
8746
  "test:e2e": "node test/output-snapshots/output.test.js",
8716
8747
  "test--watch": "npm test -- --watch",
8717
- typecheck: "tsc --noEmit && tsc-strict"
8748
+ typecheck: "tsc --noEmit && tsc-strict",
8749
+ prepublishOnly: "npm run docs:generate"
8718
8750
  },
8719
8751
  files: [
8720
8752
  "scripts/postinstall.js",
8721
8753
  "schemas",
8722
8754
  "dist",
8723
- ".env"
8755
+ ".env",
8756
+ "README.md"
8724
8757
  ],
8725
8758
  dependencies: {
8726
8759
  "@segment/analytics-node": "^2.3.0",
@@ -8905,7 +8938,7 @@ async function continueBreakpoint({
8905
8938
  platform,
8906
8939
  idToken
8907
8940
  });
8908
- console.log(
8941
+ console.info(
8909
8942
  `Sent resume command for build ${buildId} (${platform}). Check the original terminal for progress.`
8910
8943
  );
8911
8944
  }
@@ -9013,7 +9046,7 @@ import_commander.program.command("build").description(
9013
9046
  process.exit(1);
9014
9047
  }
9015
9048
  if (breakpoints === "list") {
9016
- console.log(formatBreakpointCatalog());
9049
+ console.info(formatBreakpointCatalog());
9017
9050
  return;
9018
9051
  }
9019
9052
  let breakpointPlan;