Files
aitbc/dev/env/node_modules/enquirer/index.d.ts
aitbc 816e258d4c refactor: move brother_node development artifact to dev/test-nodes subdirectory
Development Artifact Cleanup:
 BROTHER_NODE REORGANIZATION: Moved development test node to appropriate location
- dev/test-nodes/brother_node/: Moved from root directory for better organization
- Contains development configuration, test logs, and test chain data
- No impact on production systems - purely development/testing artifact

 DEVELOPMENT ARTIFACTS IDENTIFIED:
- Chain ID: aitbc-brother-chain (test/development chain)
- Ports: 8010 (P2P) and 8011 (RPC) - different from production
- Environment: .env file with test configuration
- Logs: rpc.log and node.log from development testing session (March 15, 2026)

 ROOT DIRECTORY CLEANUP: Removed development clutter from production directory
- brother_node/ moved to dev/test-nodes/brother_node/
- Root directory now contains only production-ready components
- Development artifacts properly organized in dev/ subdirectory

DIRECTORY STRUCTURE IMPROVEMENT:
📁 dev/test-nodes/: Development and testing node configurations
🏗️ Root Directory: Clean production structure with only essential components
🧪 Development Isolation: Test environments separated from production

BENEFITS:
 Clean Production Directory: No development artifacts in root
 Better Organization: Development nodes grouped in dev/ subdirectory
 Clear Separation: Production vs development environments clearly distinguished
 Maintainability: Easier to identify and manage development components

RESULT: Successfully moved brother_node development artifact to dev/test-nodes/ subdirectory, cleaning up the root directory while preserving development testing environment for future use.
2026-03-30 17:09:06 +02:00

157 lines
3.7 KiB
TypeScript
Executable File

import { EventEmitter } from "events";
interface BasePromptOptions {
name: string | (() => string)
type: string | (() => string)
message: string | (() => string) | (() => Promise<string>)
prefix?: string
initial?: any
required?: boolean
enabled?: boolean | string
disabled?: boolean | string
format?(value: string): string | Promise<string>
result?(value: string): string | Promise<string>
skip?: ((state: object) => boolean | Promise<boolean>) | boolean
validate?(value: string): boolean | string | Promise<boolean | string>
onSubmit?(name: string, value: any, prompt: Enquirer.Prompt): boolean | Promise<boolean>
onCancel?(name: string, value: any, prompt: Enquirer.Prompt): boolean | Promise<boolean>
stdin?: NodeJS.ReadStream
stdout?: NodeJS.WriteStream
}
interface Choice {
name: string
message?: string
value?: unknown
hint?: string
role?: string
enabled?: boolean
disabled?: boolean | string
}
interface ArrayPromptOptions extends BasePromptOptions {
type:
| 'autocomplete'
| 'editable'
| 'form'
| 'multiselect'
| 'select'
| 'survey'
| 'list'
| 'scale'
choices: (string | Choice)[]
maxChoices?: number
multiple?: boolean
initial?: number
delay?: number
separator?: boolean
sort?: boolean
linebreak?: boolean
edgeLength?: number
align?: 'left' | 'right'
scroll?: boolean
}
interface BooleanPromptOptions extends BasePromptOptions {
type: 'confirm'
initial?: boolean
}
interface StringPromptOptions extends BasePromptOptions {
type: 'input' | 'invisible' | 'list' | 'password' | 'text'
initial?: string
multiline?: boolean
}
interface NumberPromptOptions extends BasePromptOptions {
type: 'numeral'
min?: number
max?: number
delay?: number
float?: boolean
round?: boolean
major?: number
minor?: number
initial?: number
}
interface SnippetPromptOptions extends BasePromptOptions {
type: 'snippet'
newline?: string
template?: string
}
interface SortPromptOptions extends BasePromptOptions {
type: 'sort'
hint?: string
drag?: boolean
numbered?: boolean
}
type PromptOptions =
| BasePromptOptions
| ArrayPromptOptions
| BooleanPromptOptions
| StringPromptOptions
| NumberPromptOptions
| SnippetPromptOptions
| SortPromptOptions
declare class BasePrompt extends EventEmitter {
constructor(options?: PromptOptions);
render(): void;
run(): Promise<any>;
}
declare class Enquirer<T = object> extends EventEmitter {
constructor(options?: object, answers?: T);
/**
* Register a custom prompt type.
*
* @param type
* @param fn `Prompt` class, or a function that returns a `Prompt` class.
*/
register(type: string, fn: typeof BasePrompt | (() => typeof BasePrompt)): this;
/**
* Register a custom prompt type.
*/
register(type: { [key: string]: typeof BasePrompt | (() => typeof BasePrompt) }): this;
/**
* Prompt function that takes a "question" object or array of question objects,
* and returns an object with responses from the user.
*
* @param questions Options objects for one or more prompts to run.
*/
prompt(
questions:
| PromptOptions
| ((this: Enquirer) => PromptOptions)
| (PromptOptions | ((this: Enquirer) => PromptOptions))[]
): Promise<T>;
/**
* Use an enquirer plugin.
*
* @param plugin Plugin function that takes an instance of Enquirer.
*/
use(plugin: (this: this, enquirer: this) => void): this;
}
declare namespace Enquirer {
function prompt<T = object>(
questions:
| PromptOptions
| ((this: Enquirer) => PromptOptions)
| (PromptOptions | ((this: Enquirer) => PromptOptions))[]
): Promise<T>;
class Prompt extends BasePrompt {}
}
export = Enquirer;