@easbot/utils 0.3.9 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/chunk-3U5YF6EI.cjs +20 -0
- package/dist/chunks/chunk-6BCTOX3Z.mjs +2 -0
- package/dist/chunks/chunk-AUS6KQNI.cjs +5 -0
- package/dist/chunks/chunk-DELWLFU5.mjs +5 -0
- package/dist/chunks/chunk-EN7LFV4R.cjs +2 -0
- package/dist/chunks/{chunk-UZ52E7FE.mjs → chunk-EWRFKUXM.mjs} +1 -1
- package/dist/chunks/chunk-MHARKEDN.mjs +1 -0
- package/dist/chunks/{chunk-YC4AEMOP.cjs → chunk-PJIZPZPO.cjs} +1 -1
- package/dist/chunks/chunk-WW6DVU53.mjs +20 -0
- package/dist/chunks/chunk-XBAP2B6J.cjs +1 -0
- package/dist/chunks/filesystem-26SI2VQU.cjs +1 -0
- package/dist/chunks/filesystem-GHRTFLEY.mjs +1 -0
- package/dist/chunks/lock-BQX6RGCF.mjs +1 -0
- package/dist/chunks/lock-RMTHF4F6.cjs +1 -0
- package/dist/chunks/{main-ZMRSNK7G.mjs → main-GVYBF75T.mjs} +4 -4
- package/dist/chunks/{main-RIJAJS2R.cjs → main-K27GCHMT.cjs} +4 -4
- package/dist/chunks/registry-5BYC5NYM.mjs +1 -0
- package/dist/chunks/registry-Z3XETZ6O.cjs +1 -0
- package/dist/chunks/shell-52EI6MQK.cjs +1 -0
- package/dist/chunks/shell-JJRFPZC7.mjs +1 -0
- package/dist/index.cjs +47 -43
- package/dist/index.d.cts +75 -1
- package/dist/index.d.ts +75 -1
- package/dist/index.mjs +47 -43
- package/package.json +4 -3
- package/dist/chunks/chunk-6HZ7Q7NO.mjs +0 -2
- package/dist/chunks/chunk-6JM5F6FM.cjs +0 -2
- package/dist/chunks/chunk-A2TCSTSM.cjs +0 -5
- package/dist/chunks/chunk-AHO55TRS.cjs +0 -4
- package/dist/chunks/chunk-DAYGB2XR.mjs +0 -4
- package/dist/chunks/chunk-JQNKLHWT.cjs +0 -20
- package/dist/chunks/chunk-LBWRSUJC.mjs +0 -20
- package/dist/chunks/chunk-T3MZ3YS3.mjs +0 -5
- package/dist/chunks/chunk-V6YNYGNC.mjs +0 -1
- package/dist/chunks/chunk-VRQQ33YH.cjs +0 -1
- package/dist/chunks/filesystem-HQDKXRWJ.cjs +0 -1
- package/dist/chunks/filesystem-XE6UYBAE.mjs +0 -1
- package/dist/chunks/lock-EGXJVIO5.mjs +0 -1
- package/dist/chunks/lock-LMCPTUNU.cjs +0 -1
- package/dist/chunks/registry-BGNK5LJC.cjs +0 -1
- package/dist/chunks/registry-NQR4SFLJ.mjs +0 -1
- package/dist/chunks/shell-PXZK5BNW.mjs +0 -1
- package/dist/chunks/shell-RJBXISIH.cjs +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1223,6 +1223,7 @@ declare namespace Glob {
|
|
|
1223
1223
|
symlink?: boolean;
|
|
1224
1224
|
ignore?: string[];
|
|
1225
1225
|
}
|
|
1226
|
+
const DEFAULT_MAX_DEPTH = 20;
|
|
1226
1227
|
function scan(pattern: string, options?: Options): Promise<string[]>;
|
|
1227
1228
|
function scanSync(pattern: string, options?: Options): string[];
|
|
1228
1229
|
function match(pattern: string, filepath: string): boolean;
|
|
@@ -1232,6 +1233,53 @@ declare namespace Glob {
|
|
|
1232
1233
|
const DEFAULT_IGNORE_PATTERNS: string[];
|
|
1233
1234
|
}
|
|
1234
1235
|
|
|
1236
|
+
declare namespace Grep {
|
|
1237
|
+
interface RipgrepInfo {
|
|
1238
|
+
filepath: string;
|
|
1239
|
+
}
|
|
1240
|
+
interface Match {
|
|
1241
|
+
path: string;
|
|
1242
|
+
lines: string;
|
|
1243
|
+
line_number: number;
|
|
1244
|
+
absolute_offset: number;
|
|
1245
|
+
}
|
|
1246
|
+
interface FilesOptions {
|
|
1247
|
+
cwd: string;
|
|
1248
|
+
glob?: string[];
|
|
1249
|
+
hidden?: boolean;
|
|
1250
|
+
follow?: boolean;
|
|
1251
|
+
maxDepth?: number;
|
|
1252
|
+
signal?: AbortSignal;
|
|
1253
|
+
}
|
|
1254
|
+
interface TreeOptions {
|
|
1255
|
+
cwd: string;
|
|
1256
|
+
limit?: number;
|
|
1257
|
+
signal?: AbortSignal;
|
|
1258
|
+
glob?: string[];
|
|
1259
|
+
hidden?: boolean;
|
|
1260
|
+
}
|
|
1261
|
+
interface SearchOptions {
|
|
1262
|
+
cwd: string;
|
|
1263
|
+
pattern: string;
|
|
1264
|
+
glob?: string[];
|
|
1265
|
+
limit?: number;
|
|
1266
|
+
hidden?: boolean;
|
|
1267
|
+
follow?: boolean;
|
|
1268
|
+
signal?: AbortSignal;
|
|
1269
|
+
}
|
|
1270
|
+
function filepath(): Promise<string | null>;
|
|
1271
|
+
function isUsingRipgrep(): Promise<boolean>;
|
|
1272
|
+
function files(options: FilesOptions): AsyncGenerator<string>;
|
|
1273
|
+
function tree(options: TreeOptions): Promise<string>;
|
|
1274
|
+
function search(options: SearchOptions): Promise<Match[]>;
|
|
1275
|
+
function match(filepath: string, pattern: string): boolean;
|
|
1276
|
+
function filepathCached(): Promise<string | null>;
|
|
1277
|
+
const _ready: {
|
|
1278
|
+
(): Promise<string | null>;
|
|
1279
|
+
reset(): void;
|
|
1280
|
+
};
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1235
1283
|
declare namespace Keybind {
|
|
1236
1284
|
type Info = {
|
|
1237
1285
|
name: string;
|
|
@@ -1374,4 +1422,30 @@ declare namespace Log {
|
|
|
1374
1422
|
function create(tags?: Record<string, any>): Logger;
|
|
1375
1423
|
}
|
|
1376
1424
|
|
|
1377
|
-
|
|
1425
|
+
declare namespace CliSearch {
|
|
1426
|
+
interface Item<T> {
|
|
1427
|
+
value: T;
|
|
1428
|
+
label: string;
|
|
1429
|
+
hint?: string;
|
|
1430
|
+
}
|
|
1431
|
+
interface LockedSection<T> {
|
|
1432
|
+
title: string;
|
|
1433
|
+
items: Item<T>[];
|
|
1434
|
+
hiddenCount?: number;
|
|
1435
|
+
}
|
|
1436
|
+
interface MultiselectOptions<T> {
|
|
1437
|
+
message: string;
|
|
1438
|
+
items: Item<T>[];
|
|
1439
|
+
maxVisible?: number;
|
|
1440
|
+
initialSelected?: T[];
|
|
1441
|
+
required?: boolean;
|
|
1442
|
+
lockedSection?: LockedSection<T>;
|
|
1443
|
+
}
|
|
1444
|
+
const cancelSymbol: unique symbol;
|
|
1445
|
+
function approxStringWidth(plain: string): number;
|
|
1446
|
+
function visualRowsForLine(line: string, columns: number): number;
|
|
1447
|
+
function countVisualRowsForLines(lines: string[], columns: number | undefined): number;
|
|
1448
|
+
function multiselect<T>(options: MultiselectOptions<T>): Promise<T[] | typeof cancelSymbol>;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
export { $, Archive, AsyncQueue, Binary, CliSearch, type CodeSpanIndex$1 as CodeSpanIndex, Color, Context, DEFAULT_LANG, type EasServer, Encode, EventLoop, type FenceSpan$1 as FenceSpan, Fetch, type FetchResponse, Filesystem, Fn, type FormatOptions, type GitResult, Glob, Grep, Identifier, Ignore, type InlineCodeState$1 as InlineCodeState, Keybind, type Lang, Lazy, Locale, Lock, Log, MIME_TYPES, Markdown, type MarkdownConfig, type MarkdownIR, type MarkdownLinkSpan, type MarkdownParseOptions, type MarkdownStyle, type MarkdownStyleSpan, type MarkdownTableMode, type MiddlewareDefinition, NamedError, type NodeSpawnObjectArgs, type NodeSpawnOptions, type NodeSpawnResult, type NodeWhichOptions, PKG, PackageRegistry, type ParseCommandResult, type ParsedFrontmatter, type ParsedVersion, PkgShell, type ProxyOptions, type RPCMethod, type RenderLink, type RenderOptions, type RequestOptions, type RouteDefinition, type SSEHandler, SUPPORTED_LANGS, Semver, type ServerOptions, SessionTitle, Shell, Slug, type StreamHandler, type StyleMarker, type TimezoneDateParts, Token, TruncateContent, type WebSocketHandler, type WebSocketRouteDefinition, Wildcard, abortAfter, abortAfterAny, addMinutesInTimezone, buildCodeSpanIndex, chunkMarkdownIR, chunkText, chunkTextByBreakResolver, convertMarkdownTables, createInlineCodeState, createPkgShell, createRESTServer, createRPCServer, createServer, createStreamingServer, createWebSocketServer, defer, detectPlatform, escapeCommandArg, escapeCommandArgSafe, extractFrontmatter, findFenceSpanAt, findLast, fn, formatDuration, formatLocalISO, formatLocalISOCompact, formatLogTime, formatLogTimeMs, formatMarkdown, getDirectory, getFileExtension, getFilename, getFilenameTruncated, getProxyConfig, getProxyUrl, getTimezoneOffset, getTimezoneParts, git, iife, isSafeFenceBreak, isValidTimezone, joinCommandArgs, lazy, lazyAsync, loadEnv, loadTextFile, loadTextFileAsync, markdownToIR, markdownToIRWithMeta, needsShellExecution, normalizeTimezone, now, nowLocalISO, parseCommand, parseCommandWithOptions, parseFenceSpans, parseFrontmatterBlock, parseLocalISO, parseModelId, proxied, readableStreamToText, renderMarkdown, renderMarkdownWithMarkers, resolveLocaleLang, retry, scanParenAwareBreakpoints, serializeFrontmatter, shell, signal, startServer, truncateMiddle, updateSchema, whichSync, withTimeout, work };
|
package/dist/index.d.ts
CHANGED
|
@@ -1223,6 +1223,7 @@ declare namespace Glob {
|
|
|
1223
1223
|
symlink?: boolean;
|
|
1224
1224
|
ignore?: string[];
|
|
1225
1225
|
}
|
|
1226
|
+
const DEFAULT_MAX_DEPTH = 20;
|
|
1226
1227
|
function scan(pattern: string, options?: Options): Promise<string[]>;
|
|
1227
1228
|
function scanSync(pattern: string, options?: Options): string[];
|
|
1228
1229
|
function match(pattern: string, filepath: string): boolean;
|
|
@@ -1232,6 +1233,53 @@ declare namespace Glob {
|
|
|
1232
1233
|
const DEFAULT_IGNORE_PATTERNS: string[];
|
|
1233
1234
|
}
|
|
1234
1235
|
|
|
1236
|
+
declare namespace Grep {
|
|
1237
|
+
interface RipgrepInfo {
|
|
1238
|
+
filepath: string;
|
|
1239
|
+
}
|
|
1240
|
+
interface Match {
|
|
1241
|
+
path: string;
|
|
1242
|
+
lines: string;
|
|
1243
|
+
line_number: number;
|
|
1244
|
+
absolute_offset: number;
|
|
1245
|
+
}
|
|
1246
|
+
interface FilesOptions {
|
|
1247
|
+
cwd: string;
|
|
1248
|
+
glob?: string[];
|
|
1249
|
+
hidden?: boolean;
|
|
1250
|
+
follow?: boolean;
|
|
1251
|
+
maxDepth?: number;
|
|
1252
|
+
signal?: AbortSignal;
|
|
1253
|
+
}
|
|
1254
|
+
interface TreeOptions {
|
|
1255
|
+
cwd: string;
|
|
1256
|
+
limit?: number;
|
|
1257
|
+
signal?: AbortSignal;
|
|
1258
|
+
glob?: string[];
|
|
1259
|
+
hidden?: boolean;
|
|
1260
|
+
}
|
|
1261
|
+
interface SearchOptions {
|
|
1262
|
+
cwd: string;
|
|
1263
|
+
pattern: string;
|
|
1264
|
+
glob?: string[];
|
|
1265
|
+
limit?: number;
|
|
1266
|
+
hidden?: boolean;
|
|
1267
|
+
follow?: boolean;
|
|
1268
|
+
signal?: AbortSignal;
|
|
1269
|
+
}
|
|
1270
|
+
function filepath(): Promise<string | null>;
|
|
1271
|
+
function isUsingRipgrep(): Promise<boolean>;
|
|
1272
|
+
function files(options: FilesOptions): AsyncGenerator<string>;
|
|
1273
|
+
function tree(options: TreeOptions): Promise<string>;
|
|
1274
|
+
function search(options: SearchOptions): Promise<Match[]>;
|
|
1275
|
+
function match(filepath: string, pattern: string): boolean;
|
|
1276
|
+
function filepathCached(): Promise<string | null>;
|
|
1277
|
+
const _ready: {
|
|
1278
|
+
(): Promise<string | null>;
|
|
1279
|
+
reset(): void;
|
|
1280
|
+
};
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1235
1283
|
declare namespace Keybind {
|
|
1236
1284
|
type Info = {
|
|
1237
1285
|
name: string;
|
|
@@ -1374,4 +1422,30 @@ declare namespace Log {
|
|
|
1374
1422
|
function create(tags?: Record<string, any>): Logger;
|
|
1375
1423
|
}
|
|
1376
1424
|
|
|
1377
|
-
|
|
1425
|
+
declare namespace CliSearch {
|
|
1426
|
+
interface Item<T> {
|
|
1427
|
+
value: T;
|
|
1428
|
+
label: string;
|
|
1429
|
+
hint?: string;
|
|
1430
|
+
}
|
|
1431
|
+
interface LockedSection<T> {
|
|
1432
|
+
title: string;
|
|
1433
|
+
items: Item<T>[];
|
|
1434
|
+
hiddenCount?: number;
|
|
1435
|
+
}
|
|
1436
|
+
interface MultiselectOptions<T> {
|
|
1437
|
+
message: string;
|
|
1438
|
+
items: Item<T>[];
|
|
1439
|
+
maxVisible?: number;
|
|
1440
|
+
initialSelected?: T[];
|
|
1441
|
+
required?: boolean;
|
|
1442
|
+
lockedSection?: LockedSection<T>;
|
|
1443
|
+
}
|
|
1444
|
+
const cancelSymbol: unique symbol;
|
|
1445
|
+
function approxStringWidth(plain: string): number;
|
|
1446
|
+
function visualRowsForLine(line: string, columns: number): number;
|
|
1447
|
+
function countVisualRowsForLines(lines: string[], columns: number | undefined): number;
|
|
1448
|
+
function multiselect<T>(options: MultiselectOptions<T>): Promise<T[] | typeof cancelSymbol>;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
export { $, Archive, AsyncQueue, Binary, CliSearch, type CodeSpanIndex$1 as CodeSpanIndex, Color, Context, DEFAULT_LANG, type EasServer, Encode, EventLoop, type FenceSpan$1 as FenceSpan, Fetch, type FetchResponse, Filesystem, Fn, type FormatOptions, type GitResult, Glob, Grep, Identifier, Ignore, type InlineCodeState$1 as InlineCodeState, Keybind, type Lang, Lazy, Locale, Lock, Log, MIME_TYPES, Markdown, type MarkdownConfig, type MarkdownIR, type MarkdownLinkSpan, type MarkdownParseOptions, type MarkdownStyle, type MarkdownStyleSpan, type MarkdownTableMode, type MiddlewareDefinition, NamedError, type NodeSpawnObjectArgs, type NodeSpawnOptions, type NodeSpawnResult, type NodeWhichOptions, PKG, PackageRegistry, type ParseCommandResult, type ParsedFrontmatter, type ParsedVersion, PkgShell, type ProxyOptions, type RPCMethod, type RenderLink, type RenderOptions, type RequestOptions, type RouteDefinition, type SSEHandler, SUPPORTED_LANGS, Semver, type ServerOptions, SessionTitle, Shell, Slug, type StreamHandler, type StyleMarker, type TimezoneDateParts, Token, TruncateContent, type WebSocketHandler, type WebSocketRouteDefinition, Wildcard, abortAfter, abortAfterAny, addMinutesInTimezone, buildCodeSpanIndex, chunkMarkdownIR, chunkText, chunkTextByBreakResolver, convertMarkdownTables, createInlineCodeState, createPkgShell, createRESTServer, createRPCServer, createServer, createStreamingServer, createWebSocketServer, defer, detectPlatform, escapeCommandArg, escapeCommandArgSafe, extractFrontmatter, findFenceSpanAt, findLast, fn, formatDuration, formatLocalISO, formatLocalISOCompact, formatLogTime, formatLogTimeMs, formatMarkdown, getDirectory, getFileExtension, getFilename, getFilenameTruncated, getProxyConfig, getProxyUrl, getTimezoneOffset, getTimezoneParts, git, iife, isSafeFenceBreak, isValidTimezone, joinCommandArgs, lazy, lazyAsync, loadEnv, loadTextFile, loadTextFileAsync, markdownToIR, markdownToIRWithMeta, needsShellExecution, normalizeTimezone, now, nowLocalISO, parseCommand, parseCommandWithOptions, parseFenceSpans, parseFrontmatterBlock, parseLocalISO, parseModelId, proxied, readableStreamToText, renderMarkdown, renderMarkdownWithMarkers, resolveLocaleLang, retry, scanParenAwareBreakpoints, serializeFrontmatter, shell, signal, startServer, truncateMiddle, updateSchema, whichSync, withTimeout, work };
|