@cjser/inquirer__type 4.0.5-cjser.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2025 Simon Boudrias
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,6 @@
1
+
2
+
3
+ ## cjser
4
+
5
+ This package is a CommonJS-compatible build generated by cjser for projects that still need `require()` support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.
6
+ Original repository: https://github.com/SBoudrias/Inquirer.js
@@ -0,0 +1,2 @@
1
+ export * from './inquirer.ts';
2
+ export * from './utils.ts';
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./inquirer.js";
2
+ export * from "./utils.js";
@@ -0,0 +1,35 @@
1
+ import { Duplex } from 'node:stream';
2
+ /**
3
+ * `InquirerReadline` is a re-implementation of `readline.Interface` from Node.js.
4
+ * We're reimplementing it because of 3 reasons:
5
+ * 1. The `readline.Interface` API is not complete; it's missing for example `clearLine`.
6
+ * 2. The input/output streams are not generics, meaning they're inexact.
7
+ * 3. Since ReadLine isn't built-in Typescript Global NodeJS type, it'd force us to ship `@types/node` as a dependency to all users.
8
+ */
9
+ export type InquirerReadline = {
10
+ output: Duplex & {
11
+ mute: () => void;
12
+ unmute: () => void;
13
+ };
14
+ input: NodeJS.ReadableStream;
15
+ clearLine: (dir: 0 | 1 | -1) => void;
16
+ getCursorPos: () => {
17
+ rows: number;
18
+ cols: number;
19
+ };
20
+ setPrompt: (prompt: string) => void;
21
+ line: string;
22
+ write: (data: string) => void;
23
+ on: (event: string, listener: (...args: unknown[]) => void) => void;
24
+ removeListener: (event: string, listener: (...args: unknown[]) => void) => void;
25
+ pause: () => void;
26
+ resume: () => void;
27
+ close: () => void;
28
+ };
29
+ export type Context = {
30
+ input?: NodeJS.ReadableStream;
31
+ output?: NodeJS.WritableStream;
32
+ clearPromptOnDone?: boolean;
33
+ signal?: AbortSignal;
34
+ };
35
+ export type Prompt<Value, Config> = (config: Config, context?: Context) => Promise<Value>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,29 @@
1
+ type Key = string | number | symbol;
2
+ export type Prettify<T> = {
3
+ [K in keyof T]: T[K];
4
+ } & {};
5
+ export type PartialDeep<T> = T extends object ? {
6
+ [P in keyof T]?: PartialDeep<T[P]>;
7
+ } : T;
8
+ export type LiteralUnion<T extends F, F = string> = T | (F & {});
9
+ export type KeyUnion<T> = LiteralUnion<Extract<keyof T, string>>;
10
+ export type DistributiveMerge<A, B> = A extends any ? Prettify<Omit<A, keyof B> & B> : never;
11
+ export type UnionToIntersection<T> = (T extends any ? (input: T) => void : never) extends (input: infer Intersection) => void ? Intersection : never;
12
+ /**
13
+ * @hidden
14
+ */
15
+ type __Pick<O extends object, K extends keyof O> = {
16
+ [P in K]: O[P];
17
+ } & {};
18
+ /**
19
+ * @hidden
20
+ */
21
+ export type _Pick<O extends object, K extends Key> = __Pick<O, keyof O & K>;
22
+ /**
23
+ * Extract out of `O` the fields of key `K`
24
+ * @param O to extract from
25
+ * @param K to chose fields
26
+ * @returns [[Object]]
27
+ */
28
+ export type Pick<O extends object, K extends Key> = O extends unknown ? _Pick<O, K> : never;
29
+ export {};
package/dist/utils.js ADDED
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ export {};
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // packages/@cjser/inquirer__type.tmp-26-1778156814778/dist/index.js
16
+ var index_exports = {};
17
+ module.exports = __toCommonJS(index_exports);
package/package.json ADDED
@@ -0,0 +1,115 @@
1
+ {
2
+ "name": "@cjser/inquirer__type",
3
+ "version": "4.0.5-cjser.2",
4
+ "description": "Inquirer core TS types",
5
+ "keywords": [
6
+ "answer",
7
+ "answers",
8
+ "ask",
9
+ "base",
10
+ "cli",
11
+ "command",
12
+ "command-line",
13
+ "confirm",
14
+ "enquirer",
15
+ "generate",
16
+ "generator",
17
+ "hyper",
18
+ "input",
19
+ "inquire",
20
+ "inquirer",
21
+ "interface",
22
+ "iterm",
23
+ "javascript",
24
+ "menu",
25
+ "node",
26
+ "nodejs",
27
+ "prompt",
28
+ "promptly",
29
+ "prompts",
30
+ "question",
31
+ "readline",
32
+ "scaffold",
33
+ "scaffolder",
34
+ "scaffolding",
35
+ "stdin",
36
+ "stdout",
37
+ "terminal",
38
+ "tty",
39
+ "types",
40
+ "typescript",
41
+ "ui",
42
+ "yeoman",
43
+ "yo",
44
+ "zsh"
45
+ ],
46
+ "license": "MIT",
47
+ "author": "Simon Boudrias <admin@simonboudrias.com>",
48
+ "repository": {
49
+ "type": "git",
50
+ "url": "https://code.moenext.com/3rdeye/cjser.git"
51
+ },
52
+ "files": [
53
+ "dist",
54
+ "dist-cjser"
55
+ ],
56
+ "type": "module",
57
+ "sideEffects": false,
58
+ "exports": {
59
+ ".": {
60
+ "types": "./dist/index.d.ts",
61
+ "require": "./dist-cjser/index.cjs",
62
+ "default": "./dist/index.js"
63
+ },
64
+ "./package.json": "./package.json"
65
+ },
66
+ "publishConfig": {
67
+ "access": "public"
68
+ },
69
+ "scripts": {
70
+ "tsc": "tsc"
71
+ },
72
+ "devDependencies": {
73
+ "typescript": "^6.0.2"
74
+ },
75
+ "peerDependencies": {
76
+ "@types/node": ">=18"
77
+ },
78
+ "peerDependenciesMeta": {
79
+ "@types/node": {
80
+ "optional": true
81
+ }
82
+ },
83
+ "engines": {
84
+ "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0"
85
+ },
86
+ "main": "./dist-cjser/index.cjs",
87
+ "types": "./dist/index.d.ts",
88
+ "gitHead": "e68fe01d65359e083581c48c4a18cd8f97d88842",
89
+ "cjser": {
90
+ "sourceVersion": "4.0.5",
91
+ "cjserVersion": 2,
92
+ "original": {
93
+ "name": "@inquirer/type",
94
+ "version": "4.0.5",
95
+ "main": "./dist/index.js",
96
+ "exports": {
97
+ ".": {
98
+ "types": "./dist/index.d.ts",
99
+ "default": "./dist/index.js"
100
+ },
101
+ "./package.json": "./package.json"
102
+ },
103
+ "repository": {
104
+ "type": "git",
105
+ "url": "https://github.com/SBoudrias/Inquirer.js.git"
106
+ },
107
+ "files": [
108
+ "dist"
109
+ ],
110
+ "scripts": {
111
+ "tsc": "tsc"
112
+ }
113
+ }
114
+ }
115
+ }