🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

inquirer

Package Overview
Dependencies
Maintainers
0
Versions
201
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inquirer - npm Package Compare versions

Comparing version

to
10.1.7

1

dist/cjs/index.js

@@ -37,2 +37,3 @@ "use strict";

catch (error) {
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
const promise = Promise.reject(error);

@@ -39,0 +40,0 @@ return Object.assign(promise, { ui: runner });

4

dist/cjs/types/index.d.ts

@@ -11,5 +11,5 @@ /**

export type { QuestionMap } from './types.js';
type PromptReturnType<T> = (Promise<Prettify<T>> & {
type PromptReturnType<T> = Promise<Prettify<T>> & {
ui: PromptsRunner<Prettify<T>>;
}) | never;
};
/**

@@ -16,0 +16,0 @@ * Create a new self-contained prompt module.

@@ -1,2 +0,2 @@

import { input, select, number, confirm, rawlist, expand, checkbox, password, editor } from '@inquirer/prompts';
import type { input, select, number, confirm, rawlist, expand, checkbox, password, editor } from '@inquirer/prompts';
import type { Prettify, KeyUnion, DistributiveMerge, Pick } from '@inquirer/type';

@@ -38,5 +38,5 @@ import { Observable } from 'rxjs';

[name in KeyUnion<A>]: Omit<Question<A>, 'name'>;
}> | never;
export type QuestionArray<A extends Answers> = readonly Question<A>[] | never;
export type QuestionObservable<A extends Answers> = Observable<Question<A>> | never;
}>;
export type QuestionArray<A extends Answers> = readonly Question<A>[];
export type QuestionObservable<A extends Answers> = Observable<Question<A>>;
export type StreamOptions = Prettify<Parameters<typeof input>[1] & {

@@ -43,0 +43,0 @@ skipTTYChecks?: boolean;

@@ -5,3 +5,3 @@ import { Observable } from 'rxjs';

export declare const _: {
set: (obj: object, path: string | undefined, value: unknown) => void;
set: (obj: Record<string, unknown>, path: string | undefined, value: unknown) => void;
get: (obj: object, path?: string | number | symbol, defaultValue?: unknown) => any;

@@ -62,7 +62,7 @@ };

name: import("@inquirer/type").KeyUnion<A>;
answer: any;
answer: unknown;
}>;
fetchAnswer(question: Question<A>): Observable<{
name: import("@inquirer/type").KeyUnion<A>;
answer: any;
answer: unknown;
}>;

@@ -69,0 +69,0 @@ /**

@@ -34,2 +34,3 @@ "use strict";

// @ts-expect-error implicit any on res[key]
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
(res, key) => (res !== null && res !== undefined ? res[key] : res), obj);

@@ -100,4 +101,5 @@ const result = travel(/[,[\]]+?/) || travel(/[,.[\]]+?/);

function isPromptConstructor(prompt) {
return (prompt.prototype &&
return Boolean(prompt.prototype &&
'run' in prompt.prototype &&
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
typeof prompt.prototype.run === 'function');

@@ -256,5 +258,6 @@ }

return obs.pipe((0, rxjs_1.concatMap)(this.setDefaultType), (0, rxjs_1.concatMap)(this.filterIfRunnable), (0, rxjs_1.concatMap)((question) => fetchAsyncQuestionProperty(question, 'message', this.answers)), (0, rxjs_1.concatMap)((question) => fetchAsyncQuestionProperty(question, 'default', this.answers)), (0, rxjs_1.concatMap)((question) => fetchAsyncQuestionProperty(question, 'choices', this.answers)), (0, rxjs_1.concatMap)((question) => {
if ('choices' in question) {
const { choices } = question;
if (Array.isArray(choices)) {
// @ts-expect-error question type is too loose
question.choices = question.choices.map((choice) => {
question.choices = choices.map((choice) => {
if (typeof choice === 'string' || typeof choice === 'number') {

@@ -261,0 +264,0 @@ return { name: choice, value: choice };

{
"name": "inquirer",
"version": "10.1.6",
"version": "10.1.7",
"description": "A collection of common interactive command line user interfaces.",

@@ -58,4 +58,4 @@ "author": "Simon Boudrias <admin@simonboudrias.com>",

"dependencies": {
"@inquirer/prompts": "^5.3.6",
"@inquirer/type": "^1.5.1",
"@inquirer/prompts": "^5.3.7",
"@inquirer/type": "^1.5.2",
"@types/mute-stream": "^0.0.4",

@@ -88,3 +88,3 @@ "ansi-escapes": "^4.3.2",

"typings": "./dist/cjs/types/index.d.ts",
"gitHead": "8be69de6107bed7d85a7f2bfe99353d106d9c3bf"
"gitHead": "056e26aa6497e0036864d032f9eb8d821de821e7"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet