Deployed the page to Github Pages.
This commit is contained in:
parent
1d79754e93
commit
2c89899458
62797 changed files with 6551425 additions and 15279 deletions
22
node_modules/@inquirer/confirm/LICENSE
generated
vendored
Normal file
22
node_modules/@inquirer/confirm/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
Copyright (c) 2023 Simon Boudrias
|
||||
|
||||
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.
|
92
node_modules/@inquirer/confirm/README.md
generated
vendored
Normal file
92
node_modules/@inquirer/confirm/README.md
generated
vendored
Normal file
|
@ -0,0 +1,92 @@
|
|||
# `@inquirer/confirm`
|
||||
|
||||
Simple interactive command line prompt to gather boolean input from users.
|
||||
|
||||

|
||||
|
||||
# Installation
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>npm</th>
|
||||
<th>yarn</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
```sh
|
||||
npm install @inquirer/prompts
|
||||
```
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
```sh
|
||||
yarn add @inquirer/prompts
|
||||
```
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colSpan="2" align="center">Or</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
```sh
|
||||
npm install @inquirer/confirm
|
||||
```
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
```sh
|
||||
yarn add @inquirer/confirm
|
||||
```
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
# Usage
|
||||
|
||||
```js
|
||||
import { confirm } from '@inquirer/prompts';
|
||||
// Or
|
||||
// import confirm from '@inquirer/confirm';
|
||||
|
||||
const answer = await confirm({ message: 'Continue?' });
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
| ----------- | ----------------------- | -------- | ------------------------------------------------------- |
|
||||
| message | `string` | yes | The question to ask |
|
||||
| default | `boolean` | no | Default answer (true or false) |
|
||||
| transformer | `(boolean) => string` | no | Transform the prompt printed message to a custom string |
|
||||
| theme | [See Theming](#Theming) | no | Customize look of the prompt. |
|
||||
|
||||
## Theming
|
||||
|
||||
You can theme a prompt by passing a `theme` object option. The theme object only need to includes the keys you wish to modify, we'll fallback on the defaults for the rest.
|
||||
|
||||
```ts
|
||||
type Theme = {
|
||||
prefix: string;
|
||||
spinner: {
|
||||
interval: number;
|
||||
frames: string[];
|
||||
};
|
||||
style: {
|
||||
answer: (text: string) => string;
|
||||
message: (text: string) => string;
|
||||
defaultAnswer: (text: string) => string;
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
# License
|
||||
|
||||
Copyright (c) 2023 Simon Boudrias (twitter: [@vaxilart](https://twitter.com/Vaxilart))<br/>
|
||||
Licensed under the MIT license.
|
35
node_modules/@inquirer/confirm/dist/cjs/index.js
generated
vendored
Normal file
35
node_modules/@inquirer/confirm/dist/cjs/index.js
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core_1 = require("@inquirer/core");
|
||||
exports.default = (0, core_1.createPrompt)((config, done) => {
|
||||
const { transformer = (answer) => (answer ? 'yes' : 'no') } = config;
|
||||
const [status, setStatus] = (0, core_1.useState)('pending');
|
||||
const [value, setValue] = (0, core_1.useState)('');
|
||||
const theme = (0, core_1.makeTheme)(config.theme);
|
||||
const prefix = (0, core_1.usePrefix)({ theme });
|
||||
(0, core_1.useKeypress)((key, rl) => {
|
||||
if ((0, core_1.isEnterKey)(key)) {
|
||||
let answer = config.default !== false;
|
||||
if (/^(y|yes)/i.test(value))
|
||||
answer = true;
|
||||
else if (/^(n|no)/i.test(value))
|
||||
answer = false;
|
||||
setValue(transformer(answer));
|
||||
setStatus('done');
|
||||
done(answer);
|
||||
}
|
||||
else {
|
||||
setValue(rl.line);
|
||||
}
|
||||
});
|
||||
let formattedValue = value;
|
||||
let defaultValue = '';
|
||||
if (status === 'done') {
|
||||
formattedValue = theme.style.answer(value);
|
||||
}
|
||||
else {
|
||||
defaultValue = ` ${theme.style.defaultAnswer(config.default === false ? 'y/N' : 'Y/n')}`;
|
||||
}
|
||||
const message = theme.style.message(config.message);
|
||||
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
||||
});
|
10
node_modules/@inquirer/confirm/dist/cjs/types/index.d.ts
generated
vendored
Normal file
10
node_modules/@inquirer/confirm/dist/cjs/types/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
import { type Theme } from '@inquirer/core';
|
||||
import type { PartialDeep } from '@inquirer/type';
|
||||
type ConfirmConfig = {
|
||||
message: string;
|
||||
default?: boolean;
|
||||
transformer?: (value: boolean) => string;
|
||||
theme?: PartialDeep<Theme>;
|
||||
};
|
||||
declare const _default: import("@inquirer/type").Prompt<boolean, ConfirmConfig>;
|
||||
export default _default;
|
33
node_modules/@inquirer/confirm/dist/esm/index.mjs
generated
vendored
Normal file
33
node_modules/@inquirer/confirm/dist/esm/index.mjs
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
import { createPrompt, useState, useKeypress, isEnterKey, usePrefix, makeTheme, } from '@inquirer/core';
|
||||
export default createPrompt((config, done) => {
|
||||
const { transformer = (answer) => (answer ? 'yes' : 'no') } = config;
|
||||
const [status, setStatus] = useState('pending');
|
||||
const [value, setValue] = useState('');
|
||||
const theme = makeTheme(config.theme);
|
||||
const prefix = usePrefix({ theme });
|
||||
useKeypress((key, rl) => {
|
||||
if (isEnterKey(key)) {
|
||||
let answer = config.default !== false;
|
||||
if (/^(y|yes)/i.test(value))
|
||||
answer = true;
|
||||
else if (/^(n|no)/i.test(value))
|
||||
answer = false;
|
||||
setValue(transformer(answer));
|
||||
setStatus('done');
|
||||
done(answer);
|
||||
}
|
||||
else {
|
||||
setValue(rl.line);
|
||||
}
|
||||
});
|
||||
let formattedValue = value;
|
||||
let defaultValue = '';
|
||||
if (status === 'done') {
|
||||
formattedValue = theme.style.answer(value);
|
||||
}
|
||||
else {
|
||||
defaultValue = ` ${theme.style.defaultAnswer(config.default === false ? 'y/N' : 'Y/n')}`;
|
||||
}
|
||||
const message = theme.style.message(config.message);
|
||||
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
||||
});
|
10
node_modules/@inquirer/confirm/dist/esm/types/index.d.mts
generated
vendored
Normal file
10
node_modules/@inquirer/confirm/dist/esm/types/index.d.mts
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
import { type Theme } from '@inquirer/core';
|
||||
import type { PartialDeep } from '@inquirer/type';
|
||||
type ConfirmConfig = {
|
||||
message: string;
|
||||
default?: boolean;
|
||||
transformer?: (value: boolean) => string;
|
||||
theme?: PartialDeep<Theme>;
|
||||
};
|
||||
declare const _default: import("@inquirer/type").Prompt<boolean, ConfirmConfig>;
|
||||
export default _default;
|
10
node_modules/@inquirer/confirm/dist/types/index.d.ts
generated
vendored
Normal file
10
node_modules/@inquirer/confirm/dist/types/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
import { type Theme } from '@inquirer/core';
|
||||
import type { PartialDeep } from '@inquirer/type';
|
||||
type ConfirmConfig = {
|
||||
message: string;
|
||||
default?: boolean;
|
||||
transformer?: (value: boolean) => string;
|
||||
theme?: PartialDeep<Theme>;
|
||||
};
|
||||
declare const _default: import("@inquirer/type").Prompt<boolean, ConfirmConfig>;
|
||||
export default _default;
|
89
node_modules/@inquirer/confirm/package.json
generated
vendored
Normal file
89
node_modules/@inquirer/confirm/package.json
generated
vendored
Normal file
|
@ -0,0 +1,89 @@
|
|||
{
|
||||
"name": "@inquirer/confirm",
|
||||
"version": "3.2.0",
|
||||
"description": "Inquirer confirm prompt",
|
||||
"main": "./dist/cjs/index.js",
|
||||
"typings": "./dist/cjs/types/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/SBoudrias/Inquirer.js.git"
|
||||
},
|
||||
"keywords": [
|
||||
"answer",
|
||||
"answers",
|
||||
"ask",
|
||||
"base",
|
||||
"cli",
|
||||
"command",
|
||||
"command-line",
|
||||
"confirm",
|
||||
"enquirer",
|
||||
"generate",
|
||||
"generator",
|
||||
"hyper",
|
||||
"input",
|
||||
"inquire",
|
||||
"inquirer",
|
||||
"interface",
|
||||
"iterm",
|
||||
"javascript",
|
||||
"menu",
|
||||
"node",
|
||||
"nodejs",
|
||||
"prompt",
|
||||
"promptly",
|
||||
"prompts",
|
||||
"question",
|
||||
"readline",
|
||||
"scaffold",
|
||||
"scaffolder",
|
||||
"scaffolding",
|
||||
"stdin",
|
||||
"stdout",
|
||||
"terminal",
|
||||
"tty",
|
||||
"ui",
|
||||
"yeoman",
|
||||
"yo",
|
||||
"zsh"
|
||||
],
|
||||
"author": "Simon Boudrias <admin@simonboudrias.com>",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/SBoudrias/Inquirer.js/blob/main/packages/confirm/README.md",
|
||||
"dependencies": {
|
||||
"@inquirer/core": "^9.1.0",
|
||||
"@inquirer/type": "^1.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@inquirer/testing": "^2.1.32"
|
||||
},
|
||||
"scripts": {
|
||||
"tsc": "yarn run tsc:esm && yarn run tsc:cjs",
|
||||
"tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json",
|
||||
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs",
|
||||
"attw": "attw --pack"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/esm/types/index.d.mts",
|
||||
"default": "./dist/esm/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/cjs/types/index.d.ts",
|
||||
"default": "./dist/cjs/index.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sideEffects": false,
|
||||
"gitHead": "0c039599ef88fe9eb804fe083ee386ec906a856f"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue