@todesktop/cli 1.18.0 → 1.18.1

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.
Files changed (4) hide show
  1. package/README.md +313 -145
  2. package/dist/cli.js +112 -155
  3. package/dist/cli.js.map +3 -3
  4. package/package.json +9 -35
package/dist/cli.js CHANGED
@@ -136,18 +136,18 @@ try {
136
136
  };
137
137
  try {
138
138
  Sentry.captureException(e);
139
- } catch (err) {
139
+ } catch {
140
140
  }
141
141
  }
142
142
  var logger_default = logger;
143
143
 
144
144
  // src/utilities/logForCI.ts
145
- var logForCI_default = (...args2) => {
145
+ function logForCI(...args2) {
146
146
  logger_default.info({ args: args2 }, "logForCI");
147
147
  if (import_is_ci.default || !process.stdin.isTTY) {
148
- console.log(...args2);
148
+ console.info(...args2);
149
149
  }
150
- };
150
+ }
151
151
 
152
152
  // src/utilities/useExit.ts
153
153
  var import_ink = require("ink");
@@ -241,7 +241,7 @@ if (fs2.existsSync(oldConfigPath)) {
241
241
  const { email, accessToken, jwtToken } = require(oldConfigPath);
242
242
  setAuthConfig(email, accessToken, jwtToken);
243
243
  (0, import_del.default)(oldConfigPath, { force: true });
244
- } catch (err) {
244
+ } catch {
245
245
  (0, import_del.default)(oldConfigPath, { force: true });
246
246
  }
247
247
  }
@@ -298,26 +298,26 @@ function getAnalyticsBaseProperties() {
298
298
  name: import_os.default.platform(),
299
299
  version: import_os.default.release()
300
300
  };
301
- } catch (err) {
301
+ } catch {
302
302
  }
303
303
  try {
304
304
  baseProps.user = {
305
305
  email: getAuthConfig().email
306
306
  };
307
- } catch (err) {
307
+ } catch {
308
308
  }
309
309
  try {
310
310
  baseProps.app = {
311
311
  cliVersion: getCliVersion_default()
312
312
  };
313
- } catch (err) {
313
+ } catch {
314
314
  }
315
315
  try {
316
316
  baseProps.runtime = {
317
317
  name: "Node.js",
318
318
  version: process.version
319
319
  };
320
- } catch (err) {
320
+ } catch {
321
321
  }
322
322
  return baseProps;
323
323
  }
@@ -338,14 +338,14 @@ var track = (event, properties = {}, callback = () => {
338
338
  },
339
339
  callback
340
340
  );
341
- } catch (err) {
341
+ } catch {
342
342
  }
343
343
  };
344
344
  var identify = (id, traits = {}, callback = () => {
345
345
  }) => {
346
346
  try {
347
347
  analytics.identify({ userId: id, anonymousId, traits }, callback);
348
- } catch (err) {
348
+ } catch {
349
349
  }
350
350
  };
351
351
  var flush = (callback = () => {
@@ -393,7 +393,7 @@ var BuildCompleteMessage = ({ build }) => {
393
393
  if (process.platform === "darwin" && ((_a2 = build.mac) == null ? void 0 : _a2.standardDownloadUrl)) {
394
394
  url = fixMacUrl(build.mac.standardDownloadUrl);
395
395
  }
396
- logForCI_default(`Build complete! ${url}`);
396
+ logForCI(`Build complete! ${url}`);
397
397
  (0, import_react.useEffect)(() => {
398
398
  if (url) {
399
399
  setTimeout(exit, 10);
@@ -463,11 +463,11 @@ var PlatformProgress = ({
463
463
  if (activityNameToDisplay.length > 64) {
464
464
  activityNameToDisplay = `${activityNameToDisplay.substr(0, 61)}...`;
465
465
  }
466
- progressIndicator = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ink3.Box, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink3.Text, { children: [
466
+ progressIndicator = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ink3.Box, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink3.Text, { children: [
467
467
  ["preparation", "queue"].includes(activityType) ? void 0 : getProgressPercentageLabel(percent, activityType),
468
468
  activityNameToDisplay,
469
469
  activityType === "error" ? "" : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ink3.Text, { children: "..." })
470
- ] }) }) });
470
+ ] }) });
471
471
  }
472
472
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink3.Box, { children: [
473
473
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ink3.Box, { width: preLabelMaxWidth, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ink3.Text, { children: [
@@ -513,7 +513,7 @@ var isPlatformBuildRunning = (platformBuild) => {
513
513
 
514
514
  // src/components/BuildProgress.tsx
515
515
  var import_jsx_runtime3 = require("react/jsx-runtime");
516
- var logForCIThrottled = (0, import_lodash.default)(logForCI_default, 60 * 1e3, { trailing: true });
516
+ var logForCIThrottled = (0, import_lodash.default)(logForCI, 60 * 1e3, { trailing: true });
517
517
  var BuildProgress = ({ build, onBuildFailure }) => {
518
518
  const exit = useExit_default();
519
519
  const [{ hasKickedOff }, setState] = (0, import_react2.useState)({
@@ -549,7 +549,7 @@ var BuildProgress = ({ build, onBuildFailure }) => {
549
549
  if (!hasKickedOff) {
550
550
  return null;
551
551
  }
552
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ink4.Box, { flexDirection: "column", children: platformsNotSkipped.map((platform) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ink4.Box, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
552
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ink4.Box, { flexDirection: "column", children: platformsNotSkipped.map((platform) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ink4.Box, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
553
553
  PlatformProgress_default,
554
554
  {
555
555
  activityName: build[platform].status === "failed" ? build[platform].errorMessage : build[platform].progressActivityName,
@@ -559,7 +559,7 @@ var BuildProgress = ({ build, onBuildFailure }) => {
559
559
  platform,
560
560
  shouldShowReadyPrefix: !(build && ["failed", "succeeded"].includes(build.status))
561
561
  }
562
- ) }, platform)) }) });
562
+ ) }, platform)) });
563
563
  };
564
564
  BuildProgress.propTypes = {
565
565
  build: import_prop_types3.default.object.isRequired,
@@ -690,7 +690,7 @@ var CancelBuild = ({
690
690
  return;
691
691
  }
692
692
  setState((previousState) => ({ ...previousState, hasStarted: true }));
693
- logForCI_default("Cancelling build...");
693
+ logForCI("Cancelling build...");
694
694
  cancelBuild({ appId, buildId: id }).then((result) => {
695
695
  logger_default.debug(
696
696
  { appId, buildId: id, result },
@@ -905,7 +905,7 @@ var MainLayout = ({
905
905
  }));
906
906
  }, [build, isCancellingBuild, isRawModeSupported]);
907
907
  onInput(
908
- async (input, key) => {
908
+ async (_input, key) => {
909
909
  if (key.escape && canCancelBuild) {
910
910
  logger_default.debug("MainLayout component: esc pressed, cancelling build");
911
911
  setState((previousState) => ({
@@ -1019,7 +1019,7 @@ var import_pretty_bytes = __toESM(require("pretty-bytes"));
1019
1019
  // src/utilities/postToFirebaseFunction.ts
1020
1020
  var import_axios = __toESM(require("axios"));
1021
1021
  var { TODESKTOP_CLI_FIREBASE_FUNCTIONS_BASE } = getEnvironmentVariables_default();
1022
- async function postToFirebaseFunction_default(functionName, body = {}, config2 = {}) {
1022
+ async function postToFirebaseFunction(functionName, body = {}, config2 = {}) {
1023
1023
  logger_default.debug(
1024
1024
  { scrub: { functionName, body, config: config2 } },
1025
1025
  "postToFirebaseFunction"
@@ -1064,11 +1064,11 @@ function loadTypeScriptConfig(configPath) {
1064
1064
  const tsPath = (0, import_path2.resolve)(projectRoot, "node_modules", "typescript");
1065
1065
  typescript = require(tsPath);
1066
1066
  logger_default.debug(`Found TypeScript in user's project at: ${tsPath}`);
1067
- } catch (error) {
1067
+ } catch {
1068
1068
  try {
1069
1069
  typescript = require("typescript");
1070
1070
  logger_default.debug("Using globally available TypeScript installation");
1071
- } catch (globalError) {
1071
+ } catch {
1072
1072
  throw new Error(
1073
1073
  `TypeScript is required to load .ts configuration files but was not found. Please install TypeScript in your project: npm install --save-dev typescript`
1074
1074
  );
@@ -1376,7 +1376,7 @@ var addCustomKeywords_default = (ajv, context) => {
1376
1376
  addKeyword({
1377
1377
  keyword: "validSemver",
1378
1378
  type: "string",
1379
- validate: (schema, data) => {
1379
+ validate: (_schema, data) => {
1380
1380
  if (!(0, import_valid.default)(data)) {
1381
1381
  throw new import_ajv2.ValidationError([
1382
1382
  {
@@ -1409,7 +1409,7 @@ var addCustomKeywords_default = (ajv, context) => {
1409
1409
  addKeyword({
1410
1410
  keyword: "email",
1411
1411
  type: "string",
1412
- validate: (schema, data) => {
1412
+ validate: (_schema, data) => {
1413
1413
  if (!(0, import_email_regex.default)({ exact: true }).test(data)) {
1414
1414
  throw new import_ajv2.ValidationError([
1415
1415
  {
@@ -1492,7 +1492,7 @@ var addCustomKeywords_default = (ajv, context) => {
1492
1492
  let pkg;
1493
1493
  try {
1494
1494
  pkg = require(pkgPath);
1495
- } catch (e) {
1495
+ } catch {
1496
1496
  throw new import_ajv2.ValidationError([
1497
1497
  {
1498
1498
  keyword: "App",
@@ -1513,15 +1513,13 @@ var addCustomKeywords_default = (ajv, context) => {
1513
1513
  }
1514
1514
  ]);
1515
1515
  }
1516
- } else {
1517
- if (!fs3.existsSync(path4.join(appRoot, "index.js"))) {
1518
- throw new import_ajv2.ValidationError([
1519
- {
1520
- keyword: "App",
1521
- message: 'invalid. There is neither a "main" property in your package.json nor an index.js at the root of your app'
1522
- }
1523
- ]);
1524
- }
1516
+ } else if (!fs3.existsSync(path4.join(appRoot, "index.js"))) {
1517
+ throw new import_ajv2.ValidationError([
1518
+ {
1519
+ keyword: "App",
1520
+ message: 'invalid. There is neither a "main" property in your package.json nor an index.js at the root of your app'
1521
+ }
1522
+ ]);
1525
1523
  }
1526
1524
  }
1527
1525
  return true;
@@ -1530,7 +1528,7 @@ var addCustomKeywords_default = (ajv, context) => {
1530
1528
  });
1531
1529
  addKeyword({
1532
1530
  keyword: "npmAuthor",
1533
- validate: (schema, data) => {
1531
+ validate: (_schema, data) => {
1534
1532
  const dataType = typeof data;
1535
1533
  if (dataType === "undefined") {
1536
1534
  return true;
@@ -1568,24 +1566,22 @@ var addCustomKeywords_default = (ajv, context) => {
1568
1566
  message: `invalid. "email" property is missing.`
1569
1567
  }
1570
1568
  ]);
1571
- } else {
1572
- if (typeof data.email === "string") {
1573
- if (!(0, import_email_regex.default)({ exact: true }).test(data.email)) {
1574
- throw new import_ajv2.ValidationError([
1575
- {
1576
- keyword: "author",
1577
- message: `.email invalid. It does not look like an email.`
1578
- }
1579
- ]);
1580
- }
1581
- } else {
1569
+ } else if (typeof data.email === "string") {
1570
+ if (!(0, import_email_regex.default)({ exact: true }).test(data.email)) {
1582
1571
  throw new import_ajv2.ValidationError([
1583
1572
  {
1584
1573
  keyword: "author",
1585
- message: `.email invalid. It must be a string.`
1574
+ message: `.email invalid. It does not look like an email.`
1586
1575
  }
1587
1576
  ]);
1588
1577
  }
1578
+ } else {
1579
+ throw new import_ajv2.ValidationError([
1580
+ {
1581
+ keyword: "author",
1582
+ message: `.email invalid. It must be a string.`
1583
+ }
1584
+ ]);
1589
1585
  }
1590
1586
  }
1591
1587
  } else {
@@ -2580,8 +2576,7 @@ var schema_default = {
2580
2576
  // src/utilities/projectConfig/schema/full.ts
2581
2577
  var full_default = (context) => {
2582
2578
  function updateFileProperty(record) {
2583
- for (const key in record) {
2584
- const value = record[key];
2579
+ for (const [key, value] of Object.entries(record)) {
2585
2580
  if (key === "file" && typeof value === "object") {
2586
2581
  value["from"] = context.projectRoot;
2587
2582
  } else if (typeof value === "object" && value !== null) {
@@ -2756,7 +2751,7 @@ var getVersionControlInfo_default = async (directory) => {
2756
2751
  versionControlSystemName: "git"
2757
2752
  };
2758
2753
  }
2759
- } catch (e) {
2754
+ } catch {
2760
2755
  }
2761
2756
  return result;
2762
2757
  };
@@ -2909,7 +2904,7 @@ var import_du = __toESM(require("du"));
2909
2904
  var import_fs2 = __toESM(require("fs"));
2910
2905
  var import_chalk = __toESM(require("chalk"));
2911
2906
  var import_path7 = __toESM(require("path"));
2912
- async function zip_default({
2907
+ async function zip({
2913
2908
  files,
2914
2909
  fileSizeLimit = 20,
2915
2910
  onError,
@@ -2918,7 +2913,7 @@ async function zip_default({
2918
2913
  }) {
2919
2914
  logger_default.debug({ files }, "zip");
2920
2915
  const stream = (0, import_archiver.default)("zip");
2921
- stream.on("warning", function(err) {
2916
+ stream.on("warning", (err) => {
2922
2917
  if (err.code === "ENOENT") {
2923
2918
  console.warn(err);
2924
2919
  logger_default.warn({ err }, "zip: stream warning ENOENT");
@@ -2926,7 +2921,7 @@ async function zip_default({
2926
2921
  onError(err);
2927
2922
  }
2928
2923
  });
2929
- stream.on("error", function(err) {
2924
+ stream.on("error", (err) => {
2930
2925
  onError(err);
2931
2926
  });
2932
2927
  const processedFiles = await Promise.all(
@@ -3260,7 +3255,7 @@ function collectWorkspacePackages(definition) {
3260
3255
  if (!manifest || !manifest.name) {
3261
3256
  continue;
3262
3257
  }
3263
- const name = manifest.name;
3258
+ const { name } = manifest;
3264
3259
  if (packages.has(name)) {
3265
3260
  const existing = packages.get(name);
3266
3261
  throw new Error(
@@ -3421,7 +3416,7 @@ async function buildPackageEntries({
3421
3416
  contexts
3422
3417
  }) {
3423
3418
  const packageDir = workspacePackage.dir;
3424
- const manifest = workspacePackage.manifest;
3419
+ const { manifest } = workspacePackage;
3425
3420
  const filesToInclude = await gatherPackageFiles({ packageDir, manifest });
3426
3421
  const files = filesToInclude.map((absolutePath) => {
3427
3422
  const relative3 = import_path8.default.relative(packageDir, absolutePath);
@@ -3462,7 +3457,7 @@ async function gatherPackageFiles({
3462
3457
  const posixPattern = pattern.replace(/\\/g, "/");
3463
3458
  return [pattern, `${posixPattern}/**/*`];
3464
3459
  }
3465
- } catch (error) {
3460
+ } catch {
3466
3461
  }
3467
3462
  return [pattern];
3468
3463
  });
@@ -3789,7 +3784,7 @@ async function uploadApplicationSource({
3789
3784
  }
3790
3785
  return uploadToS3_default({
3791
3786
  bucket: config2.bucket || void 0,
3792
- inputStream: await zip_default({
3787
+ inputStream: await zip({
3793
3788
  files,
3794
3789
  fileSizeLimit: config2.uploadSizeLimit,
3795
3790
  onError: (e) => {
@@ -3814,7 +3809,7 @@ async function exists(filePath) {
3814
3809
  try {
3815
3810
  await fs6.promises.access(filePath);
3816
3811
  return true;
3817
- } catch (e) {
3812
+ } catch {
3818
3813
  return false;
3819
3814
  }
3820
3815
  }
@@ -3826,7 +3821,7 @@ async function runBuild({
3826
3821
  flags
3827
3822
  }) {
3828
3823
  var _a2, _b, _c, _d;
3829
- logForCI_default("Getting application information...");
3824
+ logForCI("Getting application information...");
3830
3825
  const primaryUserId = (_a2 = currentUser()) == null ? void 0 : _a2.uid;
3831
3826
  const { config: config2, unprocessedConfig } = getProjectConfig(configPath, {
3832
3827
  build: flags
@@ -3843,10 +3838,10 @@ async function runBuild({
3843
3838
  preparationProgress: 0.02,
3844
3839
  state: "preparing"
3845
3840
  });
3846
- logForCI_default("Preparing...");
3841
+ logForCI("Preparing...");
3847
3842
  let buildId;
3848
3843
  try {
3849
- const prepareResult = await postToFirebaseFunction_default("prepareNewBuild", {
3844
+ const prepareResult = await postToFirebaseFunction("prepareNewBuild", {
3850
3845
  appPkgName: appPkgJson.name,
3851
3846
  appPkgProductName: appPkgJson.productName,
3852
3847
  appVersion: appPkgJson.version,
@@ -3865,12 +3860,12 @@ async function runBuild({
3865
3860
  } catch (e) {
3866
3861
  throw addErrorMessage(e, "Failed while preparing new build");
3867
3862
  }
3868
- logForCI_default(`Retrieved build ID: ${buildId}`);
3863
+ logForCI(`Retrieved build ID: ${buildId}`);
3869
3864
  updateState({
3870
3865
  preparationProgress: 0.05,
3871
3866
  preparationStageLabel: "Uploading"
3872
3867
  });
3873
- logForCI_default("Uploading...");
3868
+ logForCI("Uploading...");
3874
3869
  let sourceArchiveDetails;
3875
3870
  try {
3876
3871
  sourceArchiveDetails = await uploadApplicationSource({
@@ -3893,9 +3888,9 @@ async function runBuild({
3893
3888
  throw addErrorMessage(e, "Failed while uploading application source");
3894
3889
  }
3895
3890
  updateState({ state: "building" });
3896
- logForCI_default("Kicking off build...");
3891
+ logForCI("Kicking off build...");
3897
3892
  try {
3898
- await postToFirebaseFunction_default("kickOffBuild", {
3893
+ await postToFirebaseFunction("kickOffBuild", {
3899
3894
  appBuilderLibVersion: config2.appBuilderLibVersion,
3900
3895
  appId,
3901
3896
  appPkgName: appPkgJson.name,
@@ -3953,7 +3948,7 @@ function Build({
3953
3948
  (0, import_react6.useEffect)(() => {
3954
3949
  runBuild({ configPath, flags, updateState }).catch((e) => {
3955
3950
  const error = e.response ? e.response.data : e;
3956
- logForCI_default(error);
3951
+ logForCI(error);
3957
3952
  updateState({ state: "error", error });
3958
3953
  });
3959
3954
  return () => {
@@ -4090,7 +4085,7 @@ var Login = ({ setIsLoggedIn }) => {
4090
4085
  setFailureMessage(null);
4091
4086
  setIsSubmittingForm(true);
4092
4087
  try {
4093
- const jwtToken = await postToFirebaseFunction_default("loginWithAccessToken", {
4088
+ const jwtToken = await postToFirebaseFunction("loginWithAccessToken", {
4094
4089
  email,
4095
4090
  accessToken
4096
4091
  });
@@ -4188,7 +4183,7 @@ var LoginHOC = ({ children, isInteractive = true }) => {
4188
4183
  const { TODESKTOP_ACCESS_TOKEN, TODESKTOP_EMAIL } = getEnvironmentVariables_default();
4189
4184
  try {
4190
4185
  if (TODESKTOP_ACCESS_TOKEN && TODESKTOP_EMAIL) {
4191
- const newJwtToken = await postToFirebaseFunction_default(
4186
+ const newJwtToken = await postToFirebaseFunction(
4192
4187
  "loginWithAccessToken",
4193
4188
  {
4194
4189
  email: TODESKTOP_EMAIL,
@@ -4217,11 +4212,11 @@ var LoginHOC = ({ children, isInteractive = true }) => {
4217
4212
  userCreds = await signInWithCustomToken(jwtToken);
4218
4213
  if (userCreds.user) setIsLoggedIn(true);
4219
4214
  }
4220
- } catch (err) {
4215
+ } catch {
4221
4216
  }
4222
4217
  try {
4223
4218
  if (!userCreds && accessToken && email) {
4224
- const newJwtToken = await postToFirebaseFunction_default(
4219
+ const newJwtToken = await postToFirebaseFunction(
4225
4220
  "loginWithAccessToken",
4226
4221
  { email, accessToken }
4227
4222
  );
@@ -4231,7 +4226,7 @@ var LoginHOC = ({ children, isInteractive = true }) => {
4231
4226
  if (userCreds.user) setIsLoggedIn(true);
4232
4227
  }
4233
4228
  }
4234
- } catch (err) {
4229
+ } catch {
4235
4230
  }
4236
4231
  setEffectDone(true);
4237
4232
  }
@@ -4255,12 +4250,12 @@ LoginHOC.propTypes = {
4255
4250
  var LoginHOC_default = LoginHOC;
4256
4251
 
4257
4252
  // src/components/ErrorBoundary.tsx
4258
- var import_react10 = __toESM(require("react"));
4259
4253
  var Sentry2 = __toESM(require("@sentry/node"));
4254
+ var import_react10 = __toESM(require("react"));
4260
4255
  var ErrorBoundary = class extends import_react10.default.Component {
4261
4256
  constructor(props) {
4262
4257
  super(props);
4263
- this.state = { eventId: null, error: null };
4258
+ this.state = { error: null };
4264
4259
  }
4265
4260
  static getDerivedStateFromError(error) {
4266
4261
  return { error };
@@ -4268,15 +4263,16 @@ var ErrorBoundary = class extends import_react10.default.Component {
4268
4263
  componentDidCatch(error, errorInfo) {
4269
4264
  Sentry2.withScope((scope) => {
4270
4265
  scope.setExtras(errorInfo);
4271
- const eventId = Sentry2.captureException(error);
4272
- this.setState({ eventId });
4266
+ Sentry2.captureException(error);
4273
4267
  });
4274
4268
  }
4275
4269
  render() {
4276
- if (this.state.error) {
4277
- throw this.state.error;
4270
+ const { children } = this.props;
4271
+ const { error } = this.state;
4272
+ if (error) {
4273
+ throw error;
4278
4274
  }
4279
- return this.props.children;
4275
+ return children;
4280
4276
  }
4281
4277
  };
4282
4278
  var ErrorBoundary_default = ErrorBoundary;
@@ -4431,7 +4427,7 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
4431
4427
  });
4432
4428
  const onError = (e) => {
4433
4429
  const error2 = e.response ? e.response.data : e;
4434
- logForCI_default(error2);
4430
+ logForCI(error2);
4435
4431
  setState((prevState) => ({
4436
4432
  ...prevState,
4437
4433
  error: error2
@@ -4536,7 +4532,7 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
4536
4532
  );
4537
4533
  };
4538
4534
  ViewBuild.propTypes = {
4539
- id: (props, propName, componentName) => {
4535
+ id: (props, _propName, componentName) => {
4540
4536
  if ([props.id, props.shouldViewLatest].filter(Boolean).length !== 1) {
4541
4537
  return new Error(
4542
4538
  `Exactly one of 'id' and 'shouldViewLatest' must be specified in '${componentName}'`
@@ -4550,19 +4546,6 @@ ViewBuild.propTypes = {
4550
4546
  }
4551
4547
  },
4552
4548
  commandUsed: import_prop_types10.default.string.isRequired,
4553
- shouldViewLatest: (props, propName, componentName) => {
4554
- if ([props.id, props.shouldViewLatest].filter(Boolean).length !== 1) {
4555
- return new Error(
4556
- `Exactly one of 'id' and 'shouldViewLatest' must be specified in '${componentName}'`
4557
- );
4558
- }
4559
- const type = typeof props.shouldViewLatest;
4560
- if (!["boolean", "undefined"].includes(type)) {
4561
- return new Error(
4562
- `'shouldViewLatest' is a '${type}', not a boolean, in '${componentName}'.`
4563
- );
4564
- }
4565
- },
4566
4549
  configPath: import_prop_types10.default.string
4567
4550
  };
4568
4551
  var ViewBuild_default = ViewBuild;
@@ -4729,7 +4712,7 @@ var useAnalyticsCommand = (command, flags = {}, properties = {}) => {
4729
4712
  ...getProjectConfig()
4730
4713
  };
4731
4714
  }
4732
- } catch (err) {
4715
+ } catch {
4733
4716
  }
4734
4717
  (0, import_react13.useEffect)(() => {
4735
4718
  const authUnsubscribe = onUserAuth(async (user) => {
@@ -4750,7 +4733,7 @@ var useAnalyticsCommand = (command, flags = {}, properties = {}) => {
4750
4733
  },
4751
4734
  () => setTrackingAttempt(true)
4752
4735
  );
4753
- authUnsubscribe && authUnsubscribe();
4736
+ authUnsubscribe == null ? void 0 : authUnsubscribe();
4754
4737
  }
4755
4738
  );
4756
4739
  }
@@ -4876,10 +4859,10 @@ var TableRow = ({
4876
4859
  }),
4877
4860
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink23.Text, { children: " \u2502" })
4878
4861
  ] });
4879
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_jsx_runtime24.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_ink23.Box, { flexDirection: "column", children: [
4862
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_ink23.Box, { flexDirection: "column", children: [
4880
4863
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink23.Text, { children: topLine }),
4881
4864
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ink23.Box, { children: content })
4882
- ] }) });
4865
+ ] });
4883
4866
  };
4884
4867
  TableRow.propTypes = {
4885
4868
  data: import_prop_types14.default.object.isRequired,
@@ -4903,7 +4886,7 @@ var TableBody = ({ data, getCellTextProps, keyDetails }) => {
4903
4886
  )) });
4904
4887
  };
4905
4888
  TableBody.propTypes = {
4906
- data: (props, propName, componentName) => {
4889
+ data: (props, _propName, componentName) => {
4907
4890
  const type = typeof props.data;
4908
4891
  if (Array.isArray("array")) {
4909
4892
  return new Error(
@@ -4954,7 +4937,7 @@ var Table = ({ data, getCellTextProps }) => {
4954
4937
  ] });
4955
4938
  };
4956
4939
  Table.propTypes = {
4957
- data: (props, propName, componentName) => {
4940
+ data: (props, _propName, componentName) => {
4958
4941
  const type = typeof props.data;
4959
4942
  if (Array.isArray("array")) {
4960
4943
  return new Error(
@@ -5136,7 +5119,7 @@ var ViewBuilds = ({
5136
5119
  };
5137
5120
  });
5138
5121
  }).catch((e) => {
5139
- logForCI_default(e);
5122
+ logForCI(e);
5140
5123
  setState((previousState) => ({
5141
5124
  ...previousState,
5142
5125
  error: e,
@@ -5174,12 +5157,12 @@ var ViewBuilds = ({
5174
5157
  }
5175
5158
  if (builds.length) {
5176
5159
  const formatData = (builds2) => builds2.map((build) => ({
5177
- ID: build.id,
5178
- Version: build.appVersion || "n/a",
5160
+ "ID": build.id,
5161
+ "Version": build.appVersion || "n/a",
5179
5162
  "Creation date": getRelativeDateFromDateString_default(build.createdAt),
5180
- Status: capitalize_default(build.status),
5163
+ "Status": capitalize_default(build.status),
5181
5164
  "Release date": build.releasedAt ? getRelativeDateFromDateString_default(build.releasedAt) : "Unreleased",
5182
- Owner: user ? user.label : "unknown"
5165
+ "Owner": user ? user.label : "unknown"
5183
5166
  }));
5184
5167
  const getCellTextProps = ({ key, props, value }) => {
5185
5168
  const result = { ...props };
@@ -5361,7 +5344,7 @@ var SelectTable = ({ data, onSelect }) => {
5361
5344
  ] });
5362
5345
  };
5363
5346
  SelectTable.propTypes = {
5364
- data: (props, propName, componentName) => {
5347
+ data: (props, _propName, componentName) => {
5365
5348
  const type = typeof props.data;
5366
5349
  if (Array.isArray("array")) {
5367
5350
  return new Error(
@@ -5552,10 +5535,10 @@ async function getBuildItems({
5552
5535
  userId
5553
5536
  });
5554
5537
  return rawBuilds.filter((build) => buildFilter({ build, latestReleasedBuild })).slice(0, 5).map((build) => ({
5555
- ID: build.id,
5556
- Version: build.appVersion || "unknown",
5538
+ "ID": build.id,
5539
+ "Version": build.appVersion || "unknown",
5557
5540
  "Creation date": getRelativeDateFromDateString_default(build.createdAt),
5558
- Owner: userName || "unknown"
5541
+ "Owner": userName || "unknown"
5559
5542
  }));
5560
5543
  }
5561
5544
 
@@ -5728,7 +5711,7 @@ async function releaseBuildWorkflow({
5728
5711
  updateState({ build });
5729
5712
  updateState({ state: "releasing" });
5730
5713
  await releaseBuild({ appId, buildId });
5731
- logForCI_default("Released!");
5714
+ logForCI("Released!");
5732
5715
  updateState({ state: "complete" });
5733
5716
  } catch (e) {
5734
5717
  const error = CliError.from(e);
@@ -5747,7 +5730,7 @@ function isBuildTestable(build) {
5747
5730
  try {
5748
5731
  validateBuild(build);
5749
5732
  return true;
5750
- } catch (e) {
5733
+ } catch {
5751
5734
  return false;
5752
5735
  }
5753
5736
  }
@@ -6243,7 +6226,7 @@ function Cancellation({
6243
6226
  const [error, setError] = (0, import_react21.useState)();
6244
6227
  const onInput = useInput_default();
6245
6228
  const exit = useExit_default();
6246
- onInput(async (input, key) => {
6229
+ onInput(async (_input, key) => {
6247
6230
  if (key.escape) {
6248
6231
  cancel();
6249
6232
  }
@@ -6409,7 +6392,7 @@ async function cancelSmokeTest({
6409
6392
  userId
6410
6393
  }) {
6411
6394
  var _a2;
6412
- await postToFirebaseFunction_default("cancelSmokeTest_HTTP", {
6395
+ await postToFirebaseFunction("cancelSmokeTest_HTTP", {
6413
6396
  appId,
6414
6397
  buildId,
6415
6398
  userId,
@@ -6429,7 +6412,7 @@ async function queueSmokeTest({
6429
6412
  }) {
6430
6413
  var _a2;
6431
6414
  try {
6432
- await postToFirebaseFunction_default("queueSmokeTest_HTTP", {
6415
+ await postToFirebaseFunction("queueSmokeTest_HTTP", {
6433
6416
  appId,
6434
6417
  buildId,
6435
6418
  nodeVersion,
@@ -6643,12 +6626,12 @@ var exitIfCLIOutOfDate_default = () => {
6643
6626
  const commandToUpdate = import_chalk3.default.greenBright(
6644
6627
  `npm install ${import_is_installed_globally.default ? "-g" : "--save-dev"} @todesktop/cli`
6645
6628
  );
6646
- console.log(
6629
+ console.warn(
6647
6630
  `Your version of @todesktop/cli is out of date.
6648
6631
  Run ${commandToUpdate} to update to v${latest}.`
6649
6632
  );
6650
6633
  if (!import_semver3.default.satisfies(latest, `^${pkg.version}`)) {
6651
- console.log(`CLI is exiting because it is out out of date.`);
6634
+ console.error(`CLI is exiting because it is out out of date.`);
6652
6635
  process.exit(1);
6653
6636
  }
6654
6637
  }
@@ -6666,7 +6649,7 @@ var package_default = {
6666
6649
  access: "public"
6667
6650
  },
6668
6651
  name: "@todesktop/cli",
6669
- version: "1.18.0",
6652
+ version: "1.18.1",
6670
6653
  license: "MIT",
6671
6654
  author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
6672
6655
  homepage: "https://todesktop.com/cli",
@@ -6681,16 +6664,13 @@ var package_default = {
6681
6664
  node: ">=16"
6682
6665
  },
6683
6666
  scripts: {
6684
- build: "scripts/esbuild.js",
6685
- dev: "scripts/esbuild.js --link --watch --stage dev",
6686
- "dev:local:prod": "scripts/esbuild.js --link --watch --stage prod-local",
6687
- "dev:prod": "scripts/esbuild.js --link --watch",
6667
+ build: "node scripts/esbuild.js",
6668
+ dev: "node scripts/esbuild.js --link --watch --stage dev",
6669
+ "dev:local:prod": "node scripts/esbuild.js --link --watch --stage prod-local",
6670
+ "dev:prod": "node scripts/esbuild.js --link --watch",
6688
6671
  "docs:generate": "node scripts/generate-readme.js",
6689
- format: "prettier --write .",
6690
- lint: "npm run lint:types && npm run lint:styles",
6691
- "lint--fix": "eslint src test --fix",
6692
- "lint:styles": "eslint src test .eslintrc.js && prettier --check .",
6693
- "lint:types": "tsc && tsc-strict",
6672
+ format: "prettier . --write && eslint --fix",
6673
+ lint: "prettier . --check && eslint",
6694
6674
  "types:generate": "node scripts/generate-types.js",
6695
6675
  release: "npm run docs:generate && npm run build && pnpx np --tag=latest",
6696
6676
  "release-beta": "npm run docs:generate && npm run build && npx np --any-branch --no-tests --tag=beta",
@@ -6758,30 +6738,18 @@ var package_default = {
6758
6738
  "@types/is-ci": "^3.0.4",
6759
6739
  "@types/node": "^20.8.4",
6760
6740
  "@types/react": "^18.0.26",
6761
- "@typescript-eslint/eslint-plugin": "^5.46.1",
6762
- "@typescript-eslint/parser": "^5.46.1",
6763
6741
  ava: "^4.3.1",
6764
6742
  "cp-cli": "^2.0.0",
6765
6743
  esbuild: "^0.25.10",
6766
6744
  "esbuild-register": "^3.4.1",
6767
- eslint: "^8.29.0",
6768
- "eslint-config-prettier": "^8.5.0",
6769
- "eslint-plugin-import": "^2.26.0",
6770
- "eslint-plugin-node": "^11.1.0",
6771
- "eslint-plugin-prettier": "^4.2.1",
6772
- "eslint-plugin-promise": "^6.1.1",
6773
- "eslint-plugin-react": "^7.31.11",
6774
- "eslint-plugin-react-hooks": "^4.6.0",
6775
- "eslint-plugin-standard": "^4.1.0",
6745
+ eslint: "catalog:",
6776
6746
  execa: "^4.0.3",
6777
6747
  "extract-zip": "^2.0.1",
6778
6748
  "fs-extra": "^9.0.1",
6779
- husky: "^4.3.0",
6780
6749
  "ink-testing-library": "^2.1.0",
6781
6750
  "json-schema-to-typescript": "^15.0.4",
6782
- "lint-staged": "^10.2.11",
6783
6751
  "package-json-type": "^1.0.3",
6784
- prettier: "^2.8.1",
6752
+ prettier: "catalog:",
6785
6753
  proxyquire: "^2.1.3",
6786
6754
  sinon: "^9.0.3",
6787
6755
  typescript: "catalog:",
@@ -6807,17 +6775,6 @@ var package_default = {
6807
6775
  ],
6808
6776
  timeout: "10m"
6809
6777
  },
6810
- "lint-staged": {
6811
- "**/*.{js,ts,tsx}": [
6812
- "eslint src --fix",
6813
- "git add"
6814
- ]
6815
- },
6816
- husky: {
6817
- hooks: {
6818
- "pre-commit": "lint-staged"
6819
- }
6820
- },
6821
6778
  packageExtensions: {
6822
6779
  "ink-progress-bar@*": {
6823
6780
  dependencies: {
@@ -6840,33 +6797,33 @@ var initSentry_default = () => {
6840
6797
  const scope = Sentry3.getCurrentScope();
6841
6798
  try {
6842
6799
  scope.setUser({ email: getAuthConfig().email });
6843
- } catch (err) {
6800
+ } catch {
6844
6801
  }
6845
6802
  try {
6846
6803
  scope.setContext("os", {
6847
6804
  name: import_os2.default.platform(),
6848
6805
  version: import_os2.default.release()
6849
6806
  });
6850
- } catch (err) {
6807
+ } catch {
6851
6808
  }
6852
6809
  try {
6853
6810
  scope.setContext("runtime", {
6854
6811
  name: "Node.js",
6855
6812
  version: process.version
6856
6813
  });
6857
- } catch (err) {
6814
+ } catch {
6858
6815
  }
6859
6816
  try {
6860
6817
  scope.setContext("app", {
6861
6818
  app_name: package_default.name,
6862
6819
  app_version: package_default.version
6863
6820
  });
6864
- } catch (err) {
6821
+ } catch {
6865
6822
  }
6866
6823
  try {
6867
6824
  const configResult = getProjectConfig();
6868
6825
  scope.setExtra("config", configResult);
6869
- } catch (err) {
6826
+ } catch {
6870
6827
  }
6871
6828
  };
6872
6829