Repl class
Repl class
Section titled “Repl class”Primary stateful orchestrator managing terminal streams, inputs, UI rendering, and script evaluation.
Signature:
export declare class ReplRemarks
Section titled “Remarks”Instantiates terminal raw environments to manage input text buffers, processes visual dropdown multi-line items, and maintains history and selection spaces for customized user sessions.
Constructors
Section titled “Constructors”|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Initializes an instances of the interactive REPL shell environment. |
Properties
Section titled “Properties”|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
Record<string, any> |
Contextual operational application state accessible in custom command hooks and run pipelines. | ||
|
Record<string, any> |
Registered structural package tooling and globals bound into Javascript VM contexts. |
Methods
Section titled “Methods”|
Method |
Modifiers |
Description |
|---|---|---|
|
Registers a post-execution completion monitoring hook triggered when commands finalize correctly. | ||
|
Asks a yes/no question and waits for a valid response, resolving with the answer. | ||
|
Registers an interception hook executing prior to executing valid matching user inputs. | ||
|
Wraps a string (or multi-line string) in an ASCII box. | ||
|
Fluent interface attaching an executable or namespace definition to the application environment. | ||
|
Eliminates [Object object] by properly inspecting deeply nested objects and arrays. | ||
|
Renders a progress bar. Usage: const update = repl.progress(“Building…”); update(0.5); // 50% | ||
|
Shows a dropdown list allowing the user to select an option using arrow keys. | ||
|
Shows a spinner. Returns a stop function. Usage: const stop = this.spinner(“Loading…”); await task(); stop(); | ||
|
Switches the selected stream target to interactive raw conditions and spins up active key reading pipelines. | ||
|
Renders an array of objects as a formatted table. |