From 65547f1cfc01b2d6ae946c820cc949b916483c5c Mon Sep 17 00:00:00 2001 From: Killer Boss Original <73131550+killerbossoriginal@users.noreply.github.com> Date: Mon, 13 Mar 2023 16:07:14 +0100 Subject: [PATCH] 2023.03.13-1 --- .VSCodeCounter/2023-03-13_15-49-54/details.md | 27 +++++++++++ .../2023-03-13_15-49-54/diff-details.md | 15 ++++++ .VSCodeCounter/2023-03-13_15-49-54/diff.csv | 2 + .VSCodeCounter/2023-03-13_15-49-54/diff.md | 19 ++++++++ .VSCodeCounter/2023-03-13_15-49-54/diff.txt | 22 +++++++++ .../2023-03-13_15-49-54/results.csv | 14 ++++++ .../2023-03-13_15-49-54/results.json | 1 + .VSCodeCounter/2023-03-13_15-49-54/results.md | 32 +++++++++++++ .../2023-03-13_15-49-54/results.txt | 47 +++++++++++++++++++ .github/workflows/npm-publish.yml | 4 +- README-wip.md | 25 ++++++++++ README.md | 12 ++--- package.json | 2 +- 13 files changed, 213 insertions(+), 9 deletions(-) create mode 100644 .VSCodeCounter/2023-03-13_15-49-54/details.md create mode 100644 .VSCodeCounter/2023-03-13_15-49-54/diff-details.md create mode 100644 .VSCodeCounter/2023-03-13_15-49-54/diff.csv create mode 100644 .VSCodeCounter/2023-03-13_15-49-54/diff.md create mode 100644 .VSCodeCounter/2023-03-13_15-49-54/diff.txt create mode 100644 .VSCodeCounter/2023-03-13_15-49-54/results.csv create mode 100644 .VSCodeCounter/2023-03-13_15-49-54/results.json create mode 100644 .VSCodeCounter/2023-03-13_15-49-54/results.md create mode 100644 .VSCodeCounter/2023-03-13_15-49-54/results.txt create mode 100644 README-wip.md diff --git a/.VSCodeCounter/2023-03-13_15-49-54/details.md b/.VSCodeCounter/2023-03-13_15-49-54/details.md new file mode 100644 index 0000000..7b8da95 --- /dev/null +++ b/.VSCodeCounter/2023-03-13_15-49-54/details.md @@ -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) \ No newline at end of file diff --git a/.VSCodeCounter/2023-03-13_15-49-54/diff-details.md b/.VSCodeCounter/2023-03-13_15-49-54/diff-details.md new file mode 100644 index 0000000..052e4f6 --- /dev/null +++ b/.VSCodeCounter/2023-03-13_15-49-54/diff-details.md @@ -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 \ No newline at end of file diff --git a/.VSCodeCounter/2023-03-13_15-49-54/diff.csv b/.VSCodeCounter/2023-03-13_15-49-54/diff.csv new file mode 100644 index 0000000..b7d8d75 --- /dev/null +++ b/.VSCodeCounter/2023-03-13_15-49-54/diff.csv @@ -0,0 +1,2 @@ +"filename", "language", "", "comment", "blank", "total" +"Total", "-", , 0, 0, 0 \ No newline at end of file diff --git a/.VSCodeCounter/2023-03-13_15-49-54/diff.md b/.VSCodeCounter/2023-03-13_15-49-54/diff.md new file mode 100644 index 0000000..772c378 --- /dev/null +++ b/.VSCodeCounter/2023-03-13_15-49-54/diff.md @@ -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) \ No newline at end of file diff --git a/.VSCodeCounter/2023-03-13_15-49-54/diff.txt b/.VSCodeCounter/2023-03-13_15-49-54/diff.txt new file mode 100644 index 0000000..7e6df0b --- /dev/null +++ b/.VSCodeCounter/2023-03-13_15-49-54/diff.txt @@ -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 | ++----------+----------+------------+------------+------------+------------+ \ No newline at end of file diff --git a/.VSCodeCounter/2023-03-13_15-49-54/results.csv b/.VSCodeCounter/2023-03-13_15-49-54/results.csv new file mode 100644 index 0000000..74399fd --- /dev/null +++ b/.VSCodeCounter/2023-03-13_15-49-54/results.csv @@ -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 \ No newline at end of file diff --git a/.VSCodeCounter/2023-03-13_15-49-54/results.json b/.VSCodeCounter/2023-03-13_15-49-54/results.json new file mode 100644 index 0000000..b2c67ab --- /dev/null +++ b/.VSCodeCounter/2023-03-13_15-49-54/results.json @@ -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}} \ No newline at end of file diff --git a/.VSCodeCounter/2023-03-13_15-49-54/results.md b/.VSCodeCounter/2023-03-13_15-49-54/results.md new file mode 100644 index 0000000..8c923b0 --- /dev/null +++ b/.VSCodeCounter/2023-03-13_15-49-54/results.md @@ -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) \ No newline at end of file diff --git a/.VSCodeCounter/2023-03-13_15-49-54/results.txt b/.VSCodeCounter/2023-03-13_15-49-54/results.txt new file mode 100644 index 0000000..ad7aa00 --- /dev/null +++ b/.VSCodeCounter/2023-03-13_15-49-54/results.txt @@ -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 | ++----------------------------------------------------------------------------------+--------------------+------------+------------+------------+------------+ \ No newline at end of file diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index a4d019e..0b79547 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -4,7 +4,7 @@ on: types: [created] jobs: Publish-NPM: - runs-on: ubuntu-latest + runs-on: node1 steps: - name: Checkout uses: actions/checkout@v2 @@ -22,7 +22,7 @@ jobs: REGISTRY2: 'registry=https://registry.npmjs.org/' Publish-GitHub-NPM: - runs-on: ubuntu-latest + runs-on: node1 steps: - name: Checkout uses: actions/checkout@v2 diff --git a/README-wip.md b/README-wip.md new file mode 100644 index 0000000..0d1196c --- /dev/null +++ b/README-wip.md @@ -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 \ No newline at end of file diff --git a/README.md b/README.md index 00f981f..88395eb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 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`.** @@ -15,7 +15,7 @@ readlineSync tries to let your script have a conversation with the user via a co * Simple case: ```js -var readlineSync = require(@thundernetworkrad/); +var readlineSync = require("@thundernetworkrad/readline-sync"); // Wait for user's response. 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: ```js -var readlineSync = require(@thundernetworkrad/); +var readlineSync = require("@thundernetworkrad/readline-sync"); if (readlineSync.keyInYN('Do you want this module?')) { // 'Y' key was pressed. 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: ```js -var readlineSync = require(@thundernetworkrad/), +var readlineSync = require("@thundernetworkrad/readline-sync"), animals = ['Lion', 'Elephant', 'Crocodile', 'Giraffe', 'Hippo'], index = readlineSync.keyInSelect(animals, 'Which animal?'); 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) ```js -var readlineSync = require(@thundernetworkrad/), +var readlineSync = require("@thundernetworkrad/readline-sync"), MAX = 60, MIN = 0, value = 30, key; console.log('\n\n' + (new Array(20)).join(' ') + '[Z] <- -> [X] FIX: [SPACE]\n'); @@ -501,7 +501,7 @@ For example: ![sample](screen_01.png) ```js -var readlineSync = require(@thundernetworkrad/), +var readlineSync = require("@thundernetworkrad/readline-sync"), chalk = require('chalk'), log4js = require('log4js'), logger, user, pw, command; diff --git a/package.json b/package.json index 0880e6c..cc49541 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@thundernetworkrad/readline-sync", - "version": "2023.01.30", + "version": "2023.03.13-1", "title": "readlineSync", "description": "Synchronous Readline for interactively running to have a conversation with the user via a console(TTY).", "keywords": [