@astrojs/cli-kit
Advanced tools
Comparing version 0.2.5 to 0.3.0
@@ -1,3 +0,3 @@ | ||
/// <reference types="node" /> | ||
declare type Message = string | Promise<string>; | ||
/// <reference types="node" resolution-mode="require"/> | ||
type Message = string | Promise<string>; | ||
export declare const say: (msg?: Message | Message[], { clear, hat, stdin, stdout }?: { | ||
@@ -4,0 +4,0 @@ clear?: boolean | undefined; |
@@ -39,2 +39,2 @@ /** | ||
} | ||
import Prompt from "./prompt.js"; | ||
import Prompt from './prompt.js'; |
@@ -37,2 +37,2 @@ /** | ||
} | ||
import Prompt from "./prompt.js"; | ||
import Prompt from './prompt.js'; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="node" /> | ||
/// <reference types="node" resolution-mode="require"/> | ||
/** | ||
@@ -19,2 +19,2 @@ * Base prompt skeleton | ||
} | ||
import EventEmitter from "node:events"; | ||
import EventEmitter from 'node:events'; |
@@ -6,2 +6,3 @@ import readline from 'node:readline'; | ||
import color from 'chalk'; | ||
import { strip } from '../util/clear.js'; | ||
/** | ||
@@ -8,0 +9,0 @@ * Base prompt skeleton |
@@ -28,2 +28,2 @@ export default class SelectPrompt extends Prompt { | ||
} | ||
import Prompt from "./prompt.js"; | ||
import Prompt from './prompt.js'; |
@@ -54,2 +54,2 @@ /** | ||
} | ||
import Prompt from "./prompt.js"; | ||
import Prompt from './prompt.js'; |
@@ -1,2 +0,1 @@ | ||
/** @type {import('../../types').default} */ | ||
export default function prompt<T extends Readonly<import("../../types").Prompt> | readonly import("../../types").Prompt[]>(questions?: T, { onSubmit, onCancel, stdin, stdout }?: import("../../types").PromptOptions | undefined): Promise<import("../../types").Answers<T>>; | ||
export default function prompt<T extends Readonly<import("../../types.js").Prompt> | readonly import("../../types.js").Prompt[]>(questions: T, opts?: import("../../types.js").PromptOptions | undefined): Promise<import("../../types.js").Answers<T>>; |
@@ -21,3 +21,3 @@ import * as el from "./elements/index.js"; | ||
}; | ||
/** @type {import('../../types').default} */ | ||
/** @type {import('../../types.js').default} */ | ||
export default async function prompt(questions = [], { onSubmit = noop, onCancel = () => process.exit(0), stdin = process.stdin, stdout = process.stdout } = {}) { | ||
@@ -24,0 +24,0 @@ const answers = {}; |
import type { Key } from "node:readline"; | ||
export declare const action: (key: Key, isSelect: boolean) => false | "end" | "abort" | "left" | "right" | "reset" | "submit" | "next" | "exit" | "up" | "first" | "last" | "down" | "delete" | "deleteForward" | "nextPage" | "prevPage" | "home" | undefined; | ||
export declare const action: (key: Key, isSelect: boolean) => false | "first" | "abort" | "last" | "reset" | "down" | "up" | "submit" | "delete" | "deleteForward" | "exit" | "next" | "nextPage" | "prevPage" | "home" | "end" | "right" | "left" | undefined; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="node" /> | ||
/// <reference types="node" resolution-mode="require"/> | ||
export declare function spinner({ start, end, while: update, }: { | ||
@@ -3,0 +3,0 @@ start: string; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="node" /> | ||
/// <reference types="node" resolution-mode="require"/> | ||
export declare function forceUnicode(): void; | ||
@@ -3,0 +3,0 @@ export declare const useAscii: () => boolean; |
{ | ||
"name": "@astrojs/cli-kit", | ||
"type": "module", | ||
"version": "0.2.5", | ||
"version": "0.3.0", | ||
"license": "MIT", | ||
@@ -10,8 +10,8 @@ "types": "./dist/index.d.ts", | ||
".": { | ||
"default": "./dist/index.js", | ||
"types": "./dist/index.d.ts" | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"./utils": { | ||
"default": "./dist/utils/index.js", | ||
"types": "./dist/utils/index.d.ts" | ||
"types": "./dist/utils/index.d.ts", | ||
"default": "./dist/utils/index.js" | ||
} | ||
@@ -36,7 +36,6 @@ }, | ||
"@types/node": "^18.7.16", | ||
"typescript": "^4.8.3" | ||
"typescript": "^5.2.2" | ||
}, | ||
"volta": { | ||
"node": "18.9.0", | ||
"npm": "8.19.1" | ||
"engines": { | ||
"node": ">=18.14.1" | ||
}, | ||
@@ -43,0 +42,0 @@ "scripts": { |
@@ -1,1 +0,1 @@ | ||
export * from './dist/utils/index' | ||
export * from './dist/utils/index.d.js'; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53819