Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@astrojs/cli-kit

Package Overview
Dependencies
Maintainers
4
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@astrojs/cli-kit - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

10

dist/messages/index.js

@@ -41,6 +41,6 @@ import readline from 'node:readline';

const _messages = Array.isArray(messages) ? messages : [messages];
const eyes = useAscii ? ['•', '•', 'o', 'o', '•', 'O', '^', '•'] : ['●', '●', '●', '●', '●', '○', '○', '•'];
const mouths = useAscii ? ['•', 'O', '*', 'o', 'o', '•', '-'] : ['•', '○', '■', '▪', '▫', '▬', '▭', '-', '○'];
const walls = useAscii ? ['—', '|'] : ['─', '│'];
const corners = useAscii ? ['+', '+', '+', '+'] : ['╭', '╮', '╰', '╯'];
const eyes = useAscii() ? ['•', '•', 'o', 'o', '•', 'O', '^', '•'] : ['●', '●', '●', '●', '●', '○', '○', '•'];
const mouths = useAscii() ? ['•', 'O', '*', 'o', 'o', '•', '-'] : ['•', '○', '■', '▪', '▫', '▬', '▭', '-', '○'];
const walls = useAscii() ? ['—', '|'] : ['─', '│'];
const corners = useAscii() ? ['+', '+', '+', '+'] : ['╭', '╮', '╰', '╯'];
const face = (msg, { mouth = mouths[0], eye = eyes[0] } = {}) => {

@@ -74,3 +74,3 @@ const [h, v] = walls;

await sleep(100);
const text = '\n' + face(_message.join(' '), { mouth: useAscii ? 'u' : '◡', eye: useAscii ? '^' : '◠' });
const text = '\n' + face(_message.join(' '), { mouth: useAscii() ? 'u' : '◡', eye: useAscii() ? '^' : '◠' });
logUpdate(text);

@@ -77,0 +77,0 @@ if (!cancelled)

@@ -135,3 +135,3 @@ import Prompt from './prompt.js';

else {
this.outputText.push(this.choices.map((choice, i) => i === this.cursor ? `${prefix} ${color.green(useAscii ? '>' : '●')} ${this.highlight(choice.label)} ${choice.hint ? color.dim(choice.hint) : ''}` : color.dim(`${prefix} ${useAscii ? '—' : '○'} ${choice.label} `)).join('\n'));
this.outputText.push(this.choices.map((choice, i) => i === this.cursor ? `${prefix} ${color.green(useAscii() ? '>' : '●')} ${this.highlight(choice.label)} ${choice.hint ? color.dim(choice.hint) : ''}` : color.dim(`${prefix} ${useAscii() ? '—' : '○'} ${choice.label} `)).join('\n'));
}

@@ -138,0 +138,0 @@ this.outputText = this.outputText.join('');

@@ -198,3 +198,3 @@ import Prompt from './prompt.js';

if (this.error) {
this.outputError += ` ${color.redBright((useAscii ? '> ' : '▶ ') + this.errorMsg)}`;
this.outputError += ` ${color.redBright((useAscii() ? '> ' : '▶ ') + this.errorMsg)}`;
}

@@ -201,0 +201,0 @@ this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore + cursor.move(this.cursorOffset, 0));

/// <reference types="node" />
export declare let useAscii: boolean;
export declare function forceUnicode(): void;
export declare const useAscii: () => boolean;
export declare const hookExit: () => () => NodeJS.Process;

@@ -4,0 +5,0 @@ export declare const sleep: (ms: number) => Promise<unknown>;

@@ -6,3 +6,7 @@ import color from 'chalk';

import { strip } from '../prompt/util/clear.js';
export let useAscii = platform() === 'win32';
const unicode = { enabled: platform() !== 'win32' };
export function forceUnicode() {
unicode.enabled = true;
}
export const useAscii = () => !unicode.enabled;
export const hookExit = () => {

@@ -9,0 +13,0 @@ const onExit = (code) => {

{
"name": "@astrojs/cli-kit",
"type": "module",
"version": "0.1.2",
"version": "0.1.3",
"license": "MIT",

@@ -6,0 +6,0 @@ "types": "./dist/index.d.ts",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc