@inrupt/generate-oidc-token
Advanced tools
Comparing version 0.0.1-featstatic-registration-430473580-27-1608295713.0 to 0.0.1-featstatic-registration-430781920-28-1608305806.0
@@ -11,4 +11,5 @@ # Changelog | ||
- `@inrupt/generate-oidc-token` can now be used with `npx` | ||
- `@inrupt/generate-oidc-token` can now be used with `npx`. | ||
- An interactive prompt helps the user provide the relevant options. | ||
The following sections document changes that have been released already: |
@@ -85,4 +85,10 @@ "use strict"; | ||
default: 3001, | ||
validate: async (input) => { | ||
if (!input || input < 0 || input >= 65536) { | ||
return `The port must be a number in the [0;65536[ range, received [${input}].`; | ||
} | ||
return true; | ||
}, | ||
}; | ||
const promptPort = async () => (await inquirer_1.default.prompt([PROMPT_PORT])).port; | ||
const promptPort = async () => parseInt((await inquirer_1.default.prompt([PROMPT_PORT])).port); | ||
exports.promptPort = promptPort; | ||
@@ -89,0 +95,0 @@ const PROMPT_CLIENT_INFO = [ |
{ | ||
"name": "@inrupt/generate-oidc-token", | ||
"version": "0.0.1-featstatic-registration-430473580-27-1608295713.0", | ||
"version": "0.0.1-featstatic-registration-430781920-28-1608305806.0", | ||
"description": "A small app to help scripts access private resources on Solid Pods", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -89,6 +89,12 @@ /** | ||
default: 3001, | ||
validate: async (input: unknown) => { | ||
if (!input || (input as number) < 0 || (input as number) >= 65536) { | ||
return `The port must be a number in the [0;65536[ range, received [${input}].`; | ||
} | ||
return true; | ||
}, | ||
}; | ||
export const promptPort = async () => | ||
(await inquirer.prompt([PROMPT_PORT])).port; | ||
parseInt((await inquirer.prompt([PROMPT_PORT])).port); | ||
@@ -95,0 +101,0 @@ const PROMPT_CLIENT_INFO = [ |
53466
649