Compare commits

..

7 commits

Author SHA1 Message Date
Killer Boss Original
65547f1cfc 2023.03.13-1 2023-03-13 16:07:14 +01:00
Killer Boss Original
ab7c0207d6
Update package.json 2023-01-30 18:34:56 +01:00
Killer Boss Original
8da5a6004d
Update package.json 2023-01-30 18:34:24 +01:00
Killer Boss Original
6e3210a9e6
Update package.json 2023-01-26 20:57:37 +01:00
Killer Boss Original
07dff32e12
Update package.json 2023-01-26 20:54:50 +01:00
Killer Boss Original
968aed3c9b
Update package.json 2023-01-26 20:54:36 +01:00
Killer Boss Original
61fced1008 2022.01.26 2023-01-26 19:51:41 +00:00
15 changed files with 303 additions and 13 deletions

View file

@ -0,0 +1,27 @@
# Details
Date : 2023-03-13 15:49:54
Directory c:\\Users\\kille_zvmepd7\\Documents\\readline-sync
Total : 12 files, 2912 codes, 211 comments, 727 blanks, all 3850 lines
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
## Files
| filename | language | code | comment | blank | total |
| :--- | :--- | ---: | ---: | ---: | ---: |
| [.eslintrc.json](/.eslintrc.json) | JSON with Comments | 12 | 0 | 1 | 13 |
| [.github/workflows/npm-publish.yml](/.github/workflows/npm-publish.yml) | YAML | 39 | 0 | 1 | 40 |
| [README-Deprecated.md](/README-Deprecated.md) | Markdown | 58 | 0 | 32 | 90 |
| [README.md](/README.md) | Markdown | 1,329 | 0 | 510 | 1,839 |
| [index.d.ts](/index.d.ts) | TypeScript | 53 | 22 | 13 | 88 |
| [lib/encrypt.js](/lib/encrypt.js) | JavaScript | 15 | 7 | 3 | 25 |
| [lib/read.ps1](/lib/read.ps1) | PowerShell | 98 | 12 | 19 | 129 |
| [lib/read.sh](/lib/read.sh) | Shell Script | 97 | 21 | 20 | 138 |
| [lib/read.wsh.js](/lib/read.wsh.js) | JavaScript | 100 | 10 | 14 | 124 |
| [lib/readline-sync.js](/lib/readline-sync.js) | JavaScript | 1,078 | 139 | 113 | 1,330 |
| [package.json](/package.json) | JSON | 32 | 0 | 1 | 33 |
| [tslint.json](/tslint.json) | JSON | 1 | 0 | 0 | 1 |
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)

View file

@ -0,0 +1,15 @@
# Diff Details
Date : 2023-03-13 15:49:54
Directory c:\\Users\\kille_zvmepd7\\Documents\\readline-sync
Total : 0 files, 0 codes, 0 comments, 0 blanks, all 0 lines
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
## Files
| filename | language | code | comment | blank | total |
| :--- | :--- | ---: | ---: | ---: | ---: |
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details

View file

@ -0,0 +1,2 @@
"filename", "language", "", "comment", "blank", "total"
"Total", "-", , 0, 0, 0
1 filename language comment blank total
2 Total - 0 0 0

View file

@ -0,0 +1,19 @@
# Diff Summary
Date : 2023-03-13 15:49:54
Directory c:\\Users\\kille_zvmepd7\\Documents\\readline-sync
Total : 0 files, 0 codes, 0 comments, 0 blanks, all 0 lines
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
## Languages
| language | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
## Directories
| path | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)

View file

@ -0,0 +1,22 @@
Date : 2023-03-13 15:49:54
Directory : c:\Users\kille_zvmepd7\Documents\readline-sync
Total : 0 files, 0 codes, 0 comments, 0 blanks, all 0 lines
Languages
+----------+------------+------------+------------+------------+------------+
| language | files | code | comment | blank | total |
+----------+------------+------------+------------+------------+------------+
+----------+------------+------------+------------+------------+------------+
Directories
+------+------------+------------+------------+------------+------------+
| path | files | code | comment | blank | total |
+------+------------+------------+------------+------------+------------+
+------+------------+------------+------------+------------+------------+
Files
+----------+----------+------------+------------+------------+------------+
| filename | language | code | comment | blank | total |
+----------+----------+------------+------------+------------+------------+
| Total | | 0 | 0 | 0 | 0 |
+----------+----------+------------+------------+------------+------------+

View file

@ -0,0 +1,14 @@
"filename", "language", "JSON", "Markdown", "JavaScript", "Shell Script", "PowerShell", "TypeScript", "YAML", "JSON with Comments", "comment", "blank", "total"
"c:\Users\kille_zvmepd7\Documents\readline-sync\.eslintrc.json", "JSON with Comments", 0, 0, 0, 0, 0, 0, 0, 12, 0, 1, 13
"c:\Users\kille_zvmepd7\Documents\readline-sync\.github\workflows\npm-publish.yml", "YAML", 0, 0, 0, 0, 0, 0, 39, 0, 0, 1, 40
"c:\Users\kille_zvmepd7\Documents\readline-sync\README-Deprecated.md", "Markdown", 0, 58, 0, 0, 0, 0, 0, 0, 0, 32, 90
"c:\Users\kille_zvmepd7\Documents\readline-sync\README.md", "Markdown", 0, 1329, 0, 0, 0, 0, 0, 0, 0, 510, 1839
"c:\Users\kille_zvmepd7\Documents\readline-sync\index.d.ts", "TypeScript", 0, 0, 0, 0, 0, 53, 0, 0, 22, 13, 88
"c:\Users\kille_zvmepd7\Documents\readline-sync\lib\encrypt.js", "JavaScript", 0, 0, 15, 0, 0, 0, 0, 0, 7, 3, 25
"c:\Users\kille_zvmepd7\Documents\readline-sync\lib\read.ps1", "PowerShell", 0, 0, 0, 0, 98, 0, 0, 0, 12, 19, 129
"c:\Users\kille_zvmepd7\Documents\readline-sync\lib\read.sh", "Shell Script", 0, 0, 0, 97, 0, 0, 0, 0, 21, 20, 138
"c:\Users\kille_zvmepd7\Documents\readline-sync\lib\read.wsh.js", "JavaScript", 0, 0, 100, 0, 0, 0, 0, 0, 10, 14, 124
"c:\Users\kille_zvmepd7\Documents\readline-sync\lib\readline-sync.js", "JavaScript", 0, 0, 1078, 0, 0, 0, 0, 0, 139, 113, 1330
"c:\Users\kille_zvmepd7\Documents\readline-sync\package.json", "JSON", 32, 0, 0, 0, 0, 0, 0, 0, 0, 1, 33
"c:\Users\kille_zvmepd7\Documents\readline-sync\tslint.json", "JSON", 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
"Total", "-", 33, 1387, 1193, 97, 98, 53, 39, 12, 211, 727, 3850
1 filename language JSON Markdown JavaScript Shell Script PowerShell TypeScript YAML JSON with Comments comment blank total
2 c:\Users\kille_zvmepd7\Documents\readline-sync\.eslintrc.json JSON with Comments 0 0 0 0 0 0 0 12 0 1 13
3 c:\Users\kille_zvmepd7\Documents\readline-sync\.github\workflows\npm-publish.yml YAML 0 0 0 0 0 0 39 0 0 1 40
4 c:\Users\kille_zvmepd7\Documents\readline-sync\README-Deprecated.md Markdown 0 58 0 0 0 0 0 0 0 32 90
5 c:\Users\kille_zvmepd7\Documents\readline-sync\README.md Markdown 0 1329 0 0 0 0 0 0 0 510 1839
6 c:\Users\kille_zvmepd7\Documents\readline-sync\index.d.ts TypeScript 0 0 0 0 0 53 0 0 22 13 88
7 c:\Users\kille_zvmepd7\Documents\readline-sync\lib\encrypt.js JavaScript 0 0 15 0 0 0 0 0 7 3 25
8 c:\Users\kille_zvmepd7\Documents\readline-sync\lib\read.ps1 PowerShell 0 0 0 0 98 0 0 0 12 19 129
9 c:\Users\kille_zvmepd7\Documents\readline-sync\lib\read.sh Shell Script 0 0 0 97 0 0 0 0 21 20 138
10 c:\Users\kille_zvmepd7\Documents\readline-sync\lib\read.wsh.js JavaScript 0 0 100 0 0 0 0 0 10 14 124
11 c:\Users\kille_zvmepd7\Documents\readline-sync\lib\readline-sync.js JavaScript 0 0 1078 0 0 0 0 0 139 113 1330
12 c:\Users\kille_zvmepd7\Documents\readline-sync\package.json JSON 32 0 0 0 0 0 0 0 0 1 33
13 c:\Users\kille_zvmepd7\Documents\readline-sync\tslint.json JSON 1 0 0 0 0 0 0 0 0 0 1
14 Total - 33 1387 1193 97 98 53 39 12 211 727 3850

View file

@ -0,0 +1 @@
{"file:///c%3A/Users/kille_zvmepd7/Documents/readline-sync/tslint.json":{"language":"JSON","code":1,"comment":0,"blank":0},"file:///c%3A/Users/kille_zvmepd7/Documents/readline-sync/README.md":{"language":"Markdown","code":1329,"comment":0,"blank":510},"file:///c%3A/Users/kille_zvmepd7/Documents/readline-sync/README-Deprecated.md":{"language":"Markdown","code":58,"comment":0,"blank":32},"file:///c%3A/Users/kille_zvmepd7/Documents/readline-sync/package.json":{"language":"JSON","code":32,"comment":0,"blank":1},"file:///c%3A/Users/kille_zvmepd7/Documents/readline-sync/lib/readline-sync.js":{"language":"JavaScript","code":1078,"comment":139,"blank":113},"file:///c%3A/Users/kille_zvmepd7/Documents/readline-sync/lib/read.sh":{"language":"Shell Script","code":97,"comment":21,"blank":20},"file:///c%3A/Users/kille_zvmepd7/Documents/readline-sync/lib/read.wsh.js":{"language":"JavaScript","code":100,"comment":10,"blank":14},"file:///c%3A/Users/kille_zvmepd7/Documents/readline-sync/lib/read.ps1":{"language":"PowerShell","code":98,"comment":12,"blank":19},"file:///c%3A/Users/kille_zvmepd7/Documents/readline-sync/index.d.ts":{"language":"TypeScript","code":53,"comment":22,"blank":13},"file:///c%3A/Users/kille_zvmepd7/Documents/readline-sync/lib/encrypt.js":{"language":"JavaScript","code":15,"comment":7,"blank":3},"file:///c%3A/Users/kille_zvmepd7/Documents/readline-sync/.github/workflows/npm-publish.yml":{"language":"YAML","code":39,"comment":0,"blank":1},"file:///c%3A/Users/kille_zvmepd7/Documents/readline-sync/.eslintrc.json":{"language":"JSON with Comments","code":12,"comment":0,"blank":1}}

View file

@ -0,0 +1,32 @@
# Summary
Date : 2023-03-13 15:49:54
Directory c:\\Users\\kille_zvmepd7\\Documents\\readline-sync
Total : 12 files, 2912 codes, 211 comments, 727 blanks, all 3850 lines
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
## Languages
| language | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
| Markdown | 2 | 1,387 | 0 | 542 | 1,929 |
| JavaScript | 3 | 1,193 | 156 | 130 | 1,479 |
| PowerShell | 1 | 98 | 12 | 19 | 129 |
| Shell Script | 1 | 97 | 21 | 20 | 138 |
| TypeScript | 1 | 53 | 22 | 13 | 88 |
| YAML | 1 | 39 | 0 | 1 | 40 |
| JSON | 2 | 33 | 0 | 1 | 34 |
| JSON with Comments | 1 | 12 | 0 | 1 | 13 |
## Directories
| path | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
| . | 12 | 2,912 | 211 | 727 | 3,850 |
| . (Files) | 6 | 1,485 | 22 | 557 | 2,064 |
| .github | 1 | 39 | 0 | 1 | 40 |
| .github\\workflows | 1 | 39 | 0 | 1 | 40 |
| lib | 5 | 1,388 | 189 | 169 | 1,746 |
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)

View file

@ -0,0 +1,47 @@
Date : 2023-03-13 15:49:54
Directory : c:\Users\kille_zvmepd7\Documents\readline-sync
Total : 12 files, 2912 codes, 211 comments, 727 blanks, all 3850 lines
Languages
+--------------------+------------+------------+------------+------------+------------+
| language | files | code | comment | blank | total |
+--------------------+------------+------------+------------+------------+------------+
| Markdown | 2 | 1,387 | 0 | 542 | 1,929 |
| JavaScript | 3 | 1,193 | 156 | 130 | 1,479 |
| PowerShell | 1 | 98 | 12 | 19 | 129 |
| Shell Script | 1 | 97 | 21 | 20 | 138 |
| TypeScript | 1 | 53 | 22 | 13 | 88 |
| YAML | 1 | 39 | 0 | 1 | 40 |
| JSON | 2 | 33 | 0 | 1 | 34 |
| JSON with Comments | 1 | 12 | 0 | 1 | 13 |
+--------------------+------------+------------+------------+------------+------------+
Directories
+----------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
| path | files | code | comment | blank | total |
+----------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
| . | 12 | 2,912 | 211 | 727 | 3,850 |
| . (Files) | 6 | 1,485 | 22 | 557 | 2,064 |
| .github | 1 | 39 | 0 | 1 | 40 |
| .github\workflows | 1 | 39 | 0 | 1 | 40 |
| lib | 5 | 1,388 | 189 | 169 | 1,746 |
+----------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
Files
+----------------------------------------------------------------------------------+--------------------+------------+------------+------------+------------+
| filename | language | code | comment | blank | total |
+----------------------------------------------------------------------------------+--------------------+------------+------------+------------+------------+
| c:\Users\kille_zvmepd7\Documents\readline-sync\.eslintrc.json | JSON with Comments | 12 | 0 | 1 | 13 |
| c:\Users\kille_zvmepd7\Documents\readline-sync\.github\workflows\npm-publish.yml | YAML | 39 | 0 | 1 | 40 |
| c:\Users\kille_zvmepd7\Documents\readline-sync\README-Deprecated.md | Markdown | 58 | 0 | 32 | 90 |
| c:\Users\kille_zvmepd7\Documents\readline-sync\README.md | Markdown | 1,329 | 0 | 510 | 1,839 |
| c:\Users\kille_zvmepd7\Documents\readline-sync\index.d.ts | TypeScript | 53 | 22 | 13 | 88 |
| c:\Users\kille_zvmepd7\Documents\readline-sync\lib\encrypt.js | JavaScript | 15 | 7 | 3 | 25 |
| c:\Users\kille_zvmepd7\Documents\readline-sync\lib\read.ps1 | PowerShell | 98 | 12 | 19 | 129 |
| c:\Users\kille_zvmepd7\Documents\readline-sync\lib\read.sh | Shell Script | 97 | 21 | 20 | 138 |
| c:\Users\kille_zvmepd7\Documents\readline-sync\lib\read.wsh.js | JavaScript | 100 | 10 | 14 | 124 |
| c:\Users\kille_zvmepd7\Documents\readline-sync\lib\readline-sync.js | JavaScript | 1,078 | 139 | 113 | 1,330 |
| c:\Users\kille_zvmepd7\Documents\readline-sync\package.json | JSON | 32 | 0 | 1 | 33 |
| c:\Users\kille_zvmepd7\Documents\readline-sync\tslint.json | JSON | 1 | 0 | 0 | 1 |
| Total | | 2,912 | 211 | 727 | 3,850 |
+----------------------------------------------------------------------------------+--------------------+------------+------------+------------+------------+

View file

@ -4,7 +4,7 @@ on:
types: [created] types: [created]
jobs: jobs:
Publish-NPM: Publish-NPM:
runs-on: ubuntu-latest runs-on: node1
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -22,7 +22,7 @@ jobs:
REGISTRY2: 'registry=https://registry.npmjs.org/' REGISTRY2: 'registry=https://registry.npmjs.org/'
Publish-GitHub-NPM: Publish-GitHub-NPM:
runs-on: ubuntu-latest runs-on: node1
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2

25
README-wip.md Normal file
View file

@ -0,0 +1,25 @@
# ThunderNetworkRaD's Readline-Sync
[![npm](https://img.shields.io/npm/v/@thundernetworkrad/readline-sync.svg)](https://www.npmjs.com/package/readline-sync) [![GitHub issues](https://img.shields.io/github/issues/thundernetworkrad/readline-sync.svg)](https://github.com/thundernetworkrad/readline-sync/issues) [![dependencies](https://img.shields.io/badge/dependencies-No%20dependency-brightgreen.svg)](package.json) [![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[Original Version](https://www.npmjs.com/package/readline-sync)
## Inputs
- Simple
### Simple
```js
var readlineSync = require('@thundernetworkrad/readline-sync');
var userName = readlineSync.question('Username ');
console.log('Hi ' + userName + '!');
var password = readlineSync.question('Password ', {
hideEchoBack: true // The typed text on screen is hidden by `*`.
});
console.log('You logged in as ' + userName + ' with your password *********');
```
@thundernetworkrad/readline-sync

View file

@ -1,6 +1,6 @@
# readlineSync # readlineSync
[![npm](https://img.shields.io/npm/v/readline-sync.svg)](https://www.npmjs.com/package/readline-sync) [![GitHub issues](https://img.shields.io/github/issues/anseki/readline-sync.svg)](https://github.com/anseki/readline-sync/issues) [![dependencies](https://img.shields.io/badge/dependencies-No%20dependency-brightgreen.svg)](package.json) [![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![npm](https://img.shields.io/npm/v/@thundernetworkrad/readline-sync.svg)](https://www.npmjs.com/package/readline-sync) [![GitHub issues](https://img.shields.io/github/issues/thundernetworkrad/readline-sync.svg)](https://github.com/thundernetworkrad/readline-sync/issues) [![dependencies](https://img.shields.io/badge/dependencies-No%20dependency-brightgreen.svg)](package.json) [![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
**Now, ECMAScript supports `Promise`, `await` and `async`.** **Now, ECMAScript supports `Promise`, `await` and `async`.**
@ -15,7 +15,7 @@ readlineSync tries to let your script have a conversation with the user via a co
* Simple case: * Simple case:
```js ```js
var readlineSync = require(@thundernetworkrad/); var readlineSync = require("@thundernetworkrad/readline-sync");
// Wait for user's response. // Wait for user's response.
var userName = readlineSync.question('May I have your name? '); var userName = readlineSync.question('May I have your name? ');
@ -38,7 +38,7 @@ Oh, CookieMonster loves tofu!
* Get the user's response by a single key without the Enter key: * Get the user's response by a single key without the Enter key:
```js ```js
var readlineSync = require(@thundernetworkrad/); var readlineSync = require("@thundernetworkrad/readline-sync");
if (readlineSync.keyInYN('Do you want this module?')) { if (readlineSync.keyInYN('Do you want this module?')) {
// 'Y' key was pressed. // 'Y' key was pressed.
console.log('Installing now...'); console.log('Installing now...');
@ -53,7 +53,7 @@ if (readlineSync.keyInYN('Do you want this module?')) {
* Let the user choose an item from a list: * Let the user choose an item from a list:
```js ```js
var readlineSync = require(@thundernetworkrad/), var readlineSync = require("@thundernetworkrad/readline-sync"),
animals = ['Lion', 'Elephant', 'Crocodile', 'Giraffe', 'Hippo'], animals = ['Lion', 'Elephant', 'Crocodile', 'Giraffe', 'Hippo'],
index = readlineSync.keyInSelect(animals, 'Which animal?'); index = readlineSync.keyInSelect(animals, 'Which animal?');
console.log('Ok, ' + animals[index] + ' goes to your room.'); console.log('Ok, ' + animals[index] + ' goes to your room.');
@ -75,7 +75,7 @@ Ok, Elephant goes to your room.
(Press `Z` or `X` key to change a value, and Space Bar to exit) (Press `Z` or `X` key to change a value, and Space Bar to exit)
```js ```js
var readlineSync = require(@thundernetworkrad/), var readlineSync = require("@thundernetworkrad/readline-sync"),
MAX = 60, MIN = 0, value = 30, key; MAX = 60, MIN = 0, value = 30, key;
console.log('\n\n' + (new Array(20)).join(' ') + console.log('\n\n' + (new Array(20)).join(' ') +
'[Z] <- -> [X] FIX: [SPACE]\n'); '[Z] <- -> [X] FIX: [SPACE]\n');
@ -501,7 +501,7 @@ For example:
![sample](screen_01.png) ![sample](screen_01.png)
```js ```js
var readlineSync = require(@thundernetworkrad/), var readlineSync = require("@thundernetworkrad/readline-sync"),
chalk = require('chalk'), chalk = require('chalk'),
log4js = require('log4js'), log4js = require('log4js'),
logger, user, pw, command; logger, user, pw, command;

88
index.d.ts vendored Normal file
View file

@ -0,0 +1,88 @@
// Type definitions for readline-sync 1.4
// Project: https://github.com/anseki/readline-sync
// Definitions by: Tristan Jones <https://github.com/jonestristand>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export type OptionType = string | number | RegExp | ((input: string) => boolean);
export interface BasicOptions {
prompt?: any;
hideEchoBack?: boolean | undefined;
mask?: string | undefined;
limit?: OptionType | OptionType[] | undefined;
limitMessage?: string | undefined;
defaultInput?: string | undefined;
trueValue?: OptionType | OptionType[] | undefined;
falseValue?: OptionType | OptionType[] | undefined;
caseSensitive?: boolean | undefined;
keepWhitespace?: boolean | undefined;
encoding?: string | undefined;
bufferSize?: number | undefined;
print?(display: string, encoding: string): void;
history?: boolean | undefined;
cd?: boolean | undefined;
charlist?: string | undefined;
min?: any;
max?: any;
confirmMessage?: any;
unmatchMessage?: any;
exists?: any;
isFile?: boolean | undefined;
isDirectory?: boolean | undefined;
validate?(path: string): boolean | string;
create?: boolean | undefined;
guide?: boolean | undefined;
cancel?: any;
}
// Basic Functions
export function question(query?: any, options?: BasicOptions): string;
export function prompt(options?: BasicOptions): string;
export function keyIn(query?: any, options?: BasicOptions): string;
export function setDefaultOptions(options?: BasicOptions): BasicOptions;
// Utility Functions
export function questionEMail(query?: any, options?: BasicOptions): string;
export function questionNewPassword(query?: any, options?: BasicOptions): string;
export function questionInt(query?: any, options?: BasicOptions): number;
export function questionFloat(query?: any, options?: BasicOptions): number;
export function questionPath(query?: any, options?: BasicOptions): string;
export function promptCL(commandHandler?: { [id: string]: (...args: string[]) => void } | ((command: string, ...args: string[]) => void), options?: BasicOptions): string[];
export function promptLoop(inputHandler: (value: string) => boolean, options?: BasicOptions): void;
export function promptCLLoop(commandHandler?: { [id: string]: (...args: string[]) => boolean | void } | ((command: string, ...args: string[]) => boolean | void), options?: BasicOptions): void;
export function promptSimShell(options?: BasicOptions): string;
export function keyInYN(query?: any, options?: BasicOptions): boolean | string;
export function keyInYNStrict(query?: any, options?: BasicOptions): boolean;
export function keyInPause(query?: any, options?: BasicOptions): void;
export function keyInSelect(items: string[], query?: any, options?: BasicOptions): number;
export function getRawInput(): string;
// Deprecated
/**
* @deprecated Use the bufferSize option instead: readlineSync.setDefaultOptions({bufferSize: value});
*/
export function setBufferSize(value: number): void;
/**
* @deprecated Use the encoding option instead: readlineSync.setDefaultOptions({encoding: value});
*/
export function setEncoding(value: string): void;
/**
* @deprecated Use the mask option instead: readlineSync.setDefaultOptions({mask: value});
*/
export function setMask(value: string): void;
/**
* @deprecated Use the print option instead: readlineSync.setDefaultOptions({print: value});
*/
export function setPrint(value: (display: string, encoding: string) => void): void;
/**
* @deprecated Use the prompt option instead: readlineSync.setDefaultOptions({prompt: value});
*/
export function setPrompt(value: any): void;

View file

@ -1,6 +1,6 @@
{ {
"name": "@thundernetworkrad/readline-sync", "name": "@thundernetworkrad/readline-sync",
"version": "2023.01.10", "version": "2023.03.13-1",
"title": "readlineSync", "title": "readlineSync",
"description": "Synchronous Readline for interactively running to have a conversation with the user via a console(TTY).", "description": "Synchronous Readline for interactively running to have a conversation with the user via a console(TTY).",
"keywords": [ "keywords": [
@ -19,10 +19,7 @@
"block" "block"
], ],
"main": "./lib/readline-sync.js", "main": "./lib/readline-sync.js",
"files": [ "types": "dist/index.d.ts",
"lib/*.@(js|ps1|sh)",
"README-Deprecated.md"
],
"engines": { "engines": {
"node": ">= 0.8.0" "node": ">= 0.8.0"
}, },

1
tslint.json Normal file
View file

@ -0,0 +1 @@
{ "extends": "@definitelytyped/dtslint/dt.json" }