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.0.2 to 0.0.3

2

dist/prompt/elements/text.d.ts

@@ -27,3 +27,3 @@ /**

cursorOffset: number;
clear: any;
clear: string;
placeholder: boolean | undefined;

@@ -30,0 +30,0 @@ rendered: any;

@@ -11,6 +11,3 @@ export declare const strip: (str: string) => string;

export declare const split: (str: string) => Part[];
/**
* @param {string} msg
* @param {number} perLine
*/
export declare function lines(msg: string, perLine: number): number;
export default function (prompt: string, perLine: number): string;

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

import { erase, cursor } from "sisteransi";
export const strip = (str) => {

@@ -62,6 +63,2 @@ const pattern = [

};
/**
* @param {string} msg
* @param {number} perLine
*/
export function lines(msg, perLine) {

@@ -75,1 +72,12 @@ let lines = String(strip(msg) || '').split(/\r?\n/);

;
export default function (prompt, perLine) {
if (!perLine)
return erase.line + cursor.to(0);
let rows = 0;
const lines = prompt.split(/\r?\n/);
for (let line of lines) {
rows += 1 + Math.floor(Math.max(strip(line).length - 1, 0) / perLine);
}
return erase.lines(rows);
}
;
{
"name": "@astrojs/cli-kit",
"type": "module",
"version": "0.0.2",
"version": "0.0.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