@replit/clui-input
Advanced tools
Comparing version 0.0.10 to 0.0.12
@@ -0,3 +1,5 @@ | ||
import { IAst } from './ast'; | ||
import { ICommand, IOption, ArgType, ArgsMap, SearchFn } from './types'; | ||
export interface IInputUpdates<D = any, R = any> { | ||
ast: IAst; | ||
nodeStart?: number; | ||
@@ -4,0 +6,0 @@ commands: Array<{ |
@@ -270,2 +270,3 @@ "use strict"; | ||
config.onUpdate({ | ||
ast: ast, | ||
args: (_d = args) === null || _d === void 0 ? void 0 : _d.parsed, | ||
@@ -272,0 +273,0 @@ nodeStart: nodeStart, |
@@ -14,5 +14,18 @@ "use strict"; | ||
var ctx = isWhitespace ? 'WHITESPACE' : 'KEYWORD'; | ||
if (char === '"' || char === "'") { | ||
openQuote = openQuote ? null : char; | ||
if (char === '"' && openQuote !== "'") { | ||
if (openQuote === '"') { | ||
openQuote = null; | ||
} | ||
else { | ||
openQuote = char; | ||
} | ||
} | ||
else if (char === "'" && openQuote !== '"') { | ||
if (openQuote === "'") { | ||
openQuote = null; | ||
} | ||
else { | ||
openQuote = char; | ||
} | ||
} | ||
if (!prevCtx || prevCtx === ctx) { | ||
@@ -19,0 +32,0 @@ value += char; |
{ | ||
"name": "@replit/clui-input", | ||
"version": "0.0.10", | ||
"version": "0.0.12", | ||
"description": "A utility library for building CLI style interfaces with autocomplete", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
89567
1435