
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
inquirer-file-selector
Advanced tools
An file selector prompt implementation for Inquirer.js.
npm install inquirer-file-selector
import fileSelector from 'inquirer-file-selector'
const filePath = await fileSelector({
message: 'Select a file:',
...
})
Option | Type | Required | Description |
---|---|---|---|
message | string | β | The message to display in the prompt. |
path | string | The path to the directory where it will be started. Default: process.cwd() | |
pageSize | number | The maximum number of items to display in the list. Default: 10 | |
extensions | string[] | The extensions to filter the files. Default: [] | |
disabledLabel | string | The label to display when a file is disabled. Default: (not allowed) | |
noFilesFound | string | The message to display when no files are found. Default: No files found | |
theme | See Theming | The theme to use for the file selector. |
You can theme a prompt by passing a theme
object option. The theme object only need to includes the keys you wish to modify, we'll fallback on the defaults for the rest.
type FileSelectorTheme = {
icon: {
/**
* The prefix to use for the line.
* @default isLast => isLast ? βββ : βββ
*/
linePrefix: (isLast: boolean) => string
}
style: {
/**
* The style to use for the disabled items.
* @default chalk.dim
*/
disabled: (text: string) => string
/**
* The style to use for the active item.
* @default chalk.cyan
*/
active: (text: string) => string
/**
* The style to use for the no files found message.
* @default chalk.red
*/
noFilesFound: (text: string) => string
/**
* The style to use for items of type directory.
* @default chalk.yellow
*/
directory: (text: string) => string
/**
* The style to use for items of type file.
* @default chalk.white
*/
file: (text: string) => string
/**
* The style to use for the current directory header.
* @default chalk.magenta
*/
currentDir: (text: string) => string
/**
* The style to use for the key bindings help.
* @default chalk.white
*/
help: (text: string) => string
/**
* The style to use for the keys in the key bindings help.
* @default chalk.cyan
*/
key: (text: string) => string
}
}
Β© 2024 Brian Fernandez
This project is licensed under the MIT license. See the file LICENSE for details.
FAQs
Inquerer file selector prompt.
The npm package inquirer-file-selector receives a total of 5,935 weekly downloads. As such, inquirer-file-selector popularity was classified as popular.
We found that inquirer-file-selector demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.