From 1eba1d245bc9d577250cbae8ecea06cbb8b91aec Mon Sep 17 00:00:00 2001 From: Killer Boss Original <73131550+killerbossoriginal@users.noreply.github.com> Date: Tue, 10 Jan 2023 19:26:41 +0100 Subject: [PATCH] Update --- .github/workflows/npm-publish.yml | 40 +++++++++++++++++++++++++++++++ LICENSE | 21 ---------------- README.md | 10 ++++---- package.json | 15 ++++-------- 4 files changed, 50 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/npm-publish.yml delete mode 100644 LICENSE diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..a4d019e --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,40 @@ +name: Publish to NPM +on: + release: + types: [created] +jobs: + Publish-NPM: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + scope: '@thundernetworkrad' + - name: Publish package on NPM 📦 + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + REGISTRY1: 'registry.npmjs.org' + REGISTRY2: 'registry=https://registry.npmjs.org/' + + Publish-GitHub-NPM: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: '16.x' + registry-url: 'https://npm.pkg.github.com' + scope: '@thundernetworkrad' + - name: Publish package on NPM 📦 + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.GP_TOKEN }} + REGISTRY1: 'npm.pkg.github.com' + REGISTRY2: '@thundernetworkrad:registry=https://npm.pkg.github.com' \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 0d289d9..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2019 anseki - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 1650bc6..00f981f 100644 --- a/README.md +++ b/README.md @@ -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('readline-sync'); +var readlineSync = require(@thundernetworkrad/); // 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('readline-sync'); +var readlineSync = require(@thundernetworkrad/); 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('readline-sync'), +var readlineSync = require(@thundernetworkrad/), 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('readline-sync'), +var readlineSync = require(@thundernetworkrad/), 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('readline-sync'), +var readlineSync = require(@thundernetworkrad/), chalk = require('chalk'), log4js = require('log4js'), logger, user, pw, command; diff --git a/package.json b/package.json index c832e8e..476f8c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "readline-sync", - "version": "1.4.10", + "name": "@thundernetworkrad/readline-sync", + "version": "2023.01.10", "title": "readlineSync", "description": "Synchronous Readline for interactively running to have a conversation with the user via a console(TTY).", "keywords": [ @@ -26,15 +26,10 @@ "engines": { "node": ">= 0.8.0" }, - "homepage": "https://github.com/anseki/readline-sync", + "homepage": "https://github.com/ThunderNetworkRaD/readline-sync", "repository": { "type": "git", - "url": "git://github.com/anseki/readline-sync.git" + "url": "git://github.com/ThunderNetworkRaD/readline-sync.git" }, - "bugs": "https://github.com/anseki/readline-sync/issues", - "license": "MIT", - "author": { - "name": "anseki", - "url": "https://github.com/anseki" - } + "bugs": "https://github.com/ThunderNetworkRaD/readline-sync/issues" }