diff --git a/src/index.ts b/src/index.ts index b2594e1..1eae3f8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,7 +2,9 @@ import fs from 'node:fs'; import path, { dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; import { + autocomplete, cancel, + groupMultiselect, isCancel, log, multiselect, @@ -21,7 +23,7 @@ import { x } from 'tinyexec'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); -export { multiselect, select, text }; +export { autocomplete, groupMultiselect, multiselect, select, text }; function cancelAndExit() { cancel('Operation cancelled.'); diff --git a/test/index.test.ts b/test/index.test.ts index a029de3..db97455 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -1,3 +1,4 @@ +import * as promptsActual from '@clack/prompts' with { rstest: 'importActual' }; import { expect, test } from '@rstest/core'; import { checkCancel, @@ -6,6 +7,7 @@ import { select, text, } from '../dist/index.js'; +import * as publicApi from '../src'; test('should export public APIs', () => { expect(typeof checkCancel).toBe('function'); @@ -14,3 +16,9 @@ test('should export public APIs', () => { expect(typeof select).toBe('function'); expect(typeof text).toBe('function'); }); + +test('should expose selected clack prompt helpers from src entrypoint', () => { + expect(publicApi.autocomplete).toBe(promptsActual.autocomplete); + expect(publicApi.multiselect).toBe(promptsActual.multiselect); + expect(publicApi.groupMultiselect).toBe(promptsActual.groupMultiselect); +});