@todesktop/cli 1.7.0-0 → 1.7.0-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
@@ -4076,7 +4076,7 @@ var PickBuildForRelease = ({ commandUsed, shouldConfirm, configPath }) => {
4076
4076
  ] });
4077
4077
  } else {
4078
4078
  return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_ink30.Box, { children: [
4079
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ink30.Text, { children: "No elligible builds found " }),
4079
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ink30.Text, { children: "No eligible builds found " }),
4080
4080
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ink30.Text, { dimColor: true, children: "(i.e. unreleased and successful)" })
4081
4081
  ] });
4082
4082
  }
@@ -4178,7 +4178,7 @@ function BuildPicker({
4178
4178
  state: state.state,
4179
4179
  updateState
4180
4180
  });
4181
- }, [buildId, configPath, state.state]);
4181
+ }, []);
4182
4182
  onInput((input, key) => {
4183
4183
  if (key.escape && ["show-builds", "loading"].includes(state.state)) {
4184
4184
  exit();
@@ -4198,7 +4198,7 @@ function BuildPicker({
4198
4198
  case "no-builds":
4199
4199
  return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_ink32.Box, { children: [
4200
4200
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_ink32.Text, { children: "No eligible builds found " }),
4201
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_ink32.Text, { dimColor: true, children: "(i.e. unreleased and successful)" })
4201
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_ink32.Text, { dimColor: true, children: "(candidates for smoke-test must be built with @todesktop/runtime@1.2.1 or later)" })
4202
4202
  ] });
4203
4203
  case "selected":
4204
4204
  return children(state.selectedBuildId);
@@ -4399,9 +4399,9 @@ function TestProgress({
4399
4399
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(LoadingText_default, { text: "Loading test stats" });
4400
4400
  }
4401
4401
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
4402
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OsProgress, { os: "Windows", progress: progress.windows }),
4403
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OsProgress, { os: "macOS", progress: progress.mac }),
4404
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OsProgress, { os: "Linux", progress: progress.linux })
4402
+ !progress.windows.shouldSkip && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OsProgress, { os: "Windows", progress: progress.windows }),
4403
+ !progress.mac.shouldSkip && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OsProgress, { os: "macOS", progress: progress.mac }),
4404
+ !progress.linux.shouldSkip && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OsProgress, { os: "Linux", progress: progress.linux })
4405
4405
  ] });
4406
4406
  }
4407
4407
  function OsProgress({
@@ -4411,7 +4411,8 @@ function OsProgress({
4411
4411
  const colors = {
4412
4412
  progress: "white",
4413
4413
  error: "red",
4414
- done: "green"
4414
+ done: "green",
4415
+ skipped: "yellow"
4415
4416
  };
4416
4417
  const text = progress.message + (progress.state === "progress" ? "..." : "");
4417
4418
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
@@ -4457,7 +4458,7 @@ function SmokeTestView({
4457
4458
  BuildError,
4458
4459
  {
4459
4460
  build: state.build,
4460
- message: (_d = (_c = state.progress) == null ? void 0 : _c.total) == null ? void 0 : _d.message
4461
+ message: (_d = (_c = state.progress) == null ? void 0 : _c.total) == null ? void 0 : _d.error
4461
4462
  }
4462
4463
  )
4463
4464
  ] });
@@ -4525,7 +4526,7 @@ async function cancelSmokeTest({
4525
4526
  buildId,
4526
4527
  userId
4527
4528
  }) {
4528
- await postToFirebaseFunction_default("cancelSmokeTest", {
4529
+ await postToFirebaseFunction_default("cancelSmokeTest_HTTP", {
4529
4530
  appId,
4530
4531
  buildId,
4531
4532
  userId
@@ -4563,7 +4564,7 @@ async function queueSmokeTest({
4563
4564
  userId
4564
4565
  }) {
4565
4566
  try {
4566
- await postToFirebaseFunction_default("queueSmokeTest", {
4567
+ await postToFirebaseFunction_default("queueSmokeTest_HTTP", {
4567
4568
  appId,
4568
4569
  buildId,
4569
4570
  nodeVersion,
@@ -4605,9 +4606,27 @@ async function waitUntilFinished({
4605
4606
  });
4606
4607
  }
4607
4608
  function makeProgress(build) {
4608
- const def = { progress: 0, state: "progress" };
4609
- const { linux = def, mac = def, windows = def } = build.smokeTest;
4610
- const platforms = [linux, mac, windows];
4609
+ var _a, _b, _c, _d, _e, _f;
4610
+ const def = {
4611
+ progress: 0,
4612
+ state: "progress",
4613
+ shouldSkip: false
4614
+ };
4615
+ const linux = {
4616
+ ...((_a = build.smokeTest) == null ? void 0 : _a.linux) || def,
4617
+ shouldSkip: ((_b = build.linux) == null ? void 0 : _b.shouldSkip) || false
4618
+ };
4619
+ const mac = {
4620
+ ...((_c = build.smokeTest) == null ? void 0 : _c.mac) || def,
4621
+ shouldSkip: ((_d = build.mac) == null ? void 0 : _d.shouldSkip) || false
4622
+ };
4623
+ const windows = {
4624
+ ...((_e = build.smokeTest) == null ? void 0 : _e.windows) || def,
4625
+ shouldSkip: ((_f = build.windows) == null ? void 0 : _f.shouldSkip) || false
4626
+ };
4627
+ const platforms = [linux, mac, windows].filter(
4628
+ (p) => !p.shouldSkip && p.state !== "skipped"
4629
+ );
4611
4630
  const isFinished = platforms.every((p) => p.state !== "progress");
4612
4631
  let totalState = "progress";
4613
4632
  if (platforms.every((p) => p.state === "done")) {
@@ -4621,10 +4640,7 @@ function makeProgress(build) {
4621
4640
  mac,
4622
4641
  windows,
4623
4642
  total: {
4624
- message: platforms.filter((p) => p.state === "error").map((p) => p.message).join("\n\n"),
4625
- progress: Math.round(
4626
- (linux.progress + mac.progress + windows.progress) / 3
4627
- ),
4643
+ error: platforms.filter((p) => p.state === "error").map((p) => p.message).join("\n\n"),
4628
4644
  state: totalState
4629
4645
  }
4630
4646
  };
@@ -4668,7 +4684,7 @@ function SmokeTestContainer({
4668
4684
  const abortSignal = abortController.signal;
4669
4685
  (0, import_react22.useEffect)(() => {
4670
4686
  smokeTestWorkflow({ abortSignal, buildId, configPath, updateState });
4671
- }, [buildId, configPath]);
4687
+ }, []);
4672
4688
  function updateState(changes) {
4673
4689
  setState((previousState) => ({ ...previousState, ...changes }));
4674
4690
  if (["build-error", "complete", "progress-error"].includes(changes.state)) {
@@ -4795,7 +4811,7 @@ var package_default = {
4795
4811
  access: "public"
4796
4812
  },
4797
4813
  name: "@todesktop/cli",
4798
- version: "1.6.3",
4814
+ version: "1.7.0-1",
4799
4815
  license: "MIT",
4800
4816
  author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
4801
4817
  homepage: "https://todesktop.com/cli",
@@ -4875,7 +4891,7 @@ var package_default = {
4875
4891
  "xdg-basedir": "^4.0.0"
4876
4892
  },
4877
4893
  devDependencies: {
4878
- "@todesktop/shared": "^7.160.0",
4894
+ "@todesktop/shared": "^7.179.0",
4879
4895
  "@types/bunyan": "^1.8.6",
4880
4896
  "@types/react": "^18.0.26",
4881
4897
  "@typescript-eslint/eslint-plugin": "^5.46.1",