@pokit/prompter-clack 0.0.24 → 0.0.26

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.
@@ -1 +1 @@
1
- {"version":3,"file":"prompter.d.ts","sourceRoot":"","sources":["../src/prompter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,QAAQ,EAQT,MAAM,aAAa,CAAC;AA6ZrB;;GAEG;AACH,wBAAgB,cAAc,IAAI,QAAQ,CAyEzC"}
1
+ {"version":3,"file":"prompter.d.ts","sourceRoot":"","sources":["../src/prompter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,QAAQ,EAQT,MAAM,aAAa,CAAC;AAqZrB;;GAEG;AACH,wBAAgB,cAAc,IAAI,QAAQ,CAyEzC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pokit/prompter-clack",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "description": "Clack-based prompter adapter for pok CLI applications",
5
5
  "keywords": [
6
6
  "cli",
@@ -51,7 +51,7 @@
51
51
  "@types/bun": "latest"
52
52
  },
53
53
  "peerDependencies": {
54
- "@pokit/core": "0.0.24"
54
+ "@pokit/core": "0.0.26"
55
55
  },
56
56
  "engines": {
57
57
  "bun": ">=1.0.0"
package/src/prompter.ts CHANGED
@@ -71,10 +71,7 @@ function debounce<T extends (...args: any[]) => any>(
71
71
  /**
72
72
  * Client-side filter for options
73
73
  */
74
- function filterOptionsClientSide<T>(
75
- options: SelectOption<T>[],
76
- filter: string
77
- ): SelectOption<T>[] {
74
+ function filterOptionsClientSide<T>(options: SelectOption<T>[], filter: string): SelectOption<T>[] {
78
75
  const lowerFilter = filter.toLowerCase();
79
76
  return options.filter(
80
77
  (opt) =>
@@ -124,9 +121,7 @@ async function showErrorRecovery(errorMessage: string): Promise<ErrorAction> {
124
121
  /**
125
122
  * Handle dynamic select with pagination, filtering, and error recovery
126
123
  */
127
- async function handleDynamicSelect<T>(
128
- dynamicOptions: DynamicSelectOptions<T>
129
- ): Promise<T> {
124
+ async function handleDynamicSelect<T>(dynamicOptions: DynamicSelectOptions<T>): Promise<T> {
130
125
  const controller = new AbortController();
131
126
  const provider = dynamicOptions.provider;
132
127
  const capabilities = provider.capabilities;
@@ -266,8 +261,7 @@ async function handleDynamicSelect<T>(
266
261
  continue;
267
262
  } catch (error) {
268
263
  loadMoreSpinner.stop('Failed to load more');
269
- const errorMessage =
270
- error instanceof Error ? error.message : 'Failed to load more options';
264
+ const errorMessage = error instanceof Error ? error.message : 'Failed to load more options';
271
265
 
272
266
  // Show error recovery
273
267
  const action = await showErrorRecovery(errorMessage);
@@ -403,9 +397,7 @@ async function handleDynamicSelectWithTypeahead<T>(
403
397
  if (nextPage.totalCount !== undefined) {
404
398
  totalCount = nextPage.totalCount;
405
399
  }
406
- loadMoreSpinner.stop(
407
- `Loaded ${allOptions.length}${totalCount ? ` of ${totalCount}` : ''}`
408
- );
400
+ loadMoreSpinner.stop(`Loaded ${allOptions.length}${totalCount ? ` of ${totalCount}` : ''}`);
409
401
  continue;
410
402
  } catch (error) {
411
403
  loadMoreSpinner.stop('Failed to load more');