@better-update/cli 0.13.1 → 0.14.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/index.mjs CHANGED
@@ -8,7 +8,7 @@ import { NodeContext } from "@effect/platform-node";
8
8
  import path, { join } from "node:path";
9
9
  import process$1 from "node:process";
10
10
  import AppleUtils from "@expo/apple-utils";
11
- import { cancel, confirm, isCancel, multiselect, password, select, text } from "@clack/prompts";
11
+ import { autocomplete, cancel, confirm, isCancel, multiselect, password, select, text } from "@clack/prompts";
12
12
  import { once } from "node:events";
13
13
  import { createServer } from "node:http";
14
14
  import { maxBy, uniqBy } from "es-toolkit";
@@ -28,7 +28,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
28
28
 
29
29
  //#endregion
30
30
  //#region package.json
31
- var version = "0.13.1";
31
+ var version = "0.14.0";
32
32
 
33
33
  //#endregion
34
34
  //#region src/lib/interactive-mode.ts
@@ -1796,6 +1796,15 @@ const promptSelect = (message, options) => Effect.gen(function* () {
1796
1796
  options: [...options]
1797
1797
  })));
1798
1798
  });
1799
+ const promptAutocomplete = (message, options, config) => Effect.gen(function* () {
1800
+ yield* ensureInteractive(message);
1801
+ return handleCancel(yield* Effect.promise(async () => autocomplete({
1802
+ message,
1803
+ options: [...options],
1804
+ ...config?.placeholder === void 0 ? {} : { placeholder: config.placeholder },
1805
+ ...config?.maxItems === void 0 ? {} : { maxItems: config.maxItems }
1806
+ })));
1807
+ });
1799
1808
  const promptMultiSelect = (message, options, config) => Effect.gen(function* () {
1800
1809
  yield* ensureInteractive(message);
1801
1810
  return handleCancel(yield* Effect.promise(async () => multiselect({
@@ -1886,10 +1895,13 @@ const resolveProvider = (appleUtils, availableProviders, currentProviderId) => E
1886
1895
  return yield* new InteractiveProhibitedError({ message: "Multiple App Store Connect providers are available but no APPLE_PROVIDER_ID is set; re-run interactively or set the env var." });
1887
1896
  }
1888
1897
  return {
1889
- providerId: yield* applyChoice(yield* promptSelect("Select App Store Connect provider:", availableProviders.map((provider) => ({
1898
+ providerId: yield* applyChoice(yield* promptAutocomplete("Select App Store Connect provider:", availableProviders.map((provider) => ({
1890
1899
  value: provider.providerId,
1891
1900
  label: `${provider.name} [${provider.subType}] (${provider.providerId})`
1892
- })))),
1901
+ })), {
1902
+ placeholder: "Type to filter…",
1903
+ maxItems: 10
1904
+ })),
1893
1905
  switched
1894
1906
  };
1895
1907
  });