@easbot/utils 0.1.14 → 0.1.15
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-ZNIQRHSA.cjs → chunk-NLA2YMCP.cjs} +2 -2
- package/dist/chunks/{chunk-PQC2BFS2.cjs → chunk-QBAJWPDZ.cjs} +1 -1
- package/dist/chunks/log-AZVZ5SH5.cjs +1 -0
- package/dist/chunks/{main-BW4T3DHC.cjs → main-3BSIJH3A.cjs} +4 -4
- package/dist/index.cjs +36 -36
- package/dist/index.d.cts +36 -9
- package/dist/index.d.ts +36 -9
- package/dist/index.mjs +37 -37
- package/package.json +31 -19
- package/dist/chunks/log-CD3QO5T3.cjs +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -13,8 +13,8 @@ import { cors } from 'hono/cors';
|
|
|
13
13
|
export { cors } from 'hono/cors';
|
|
14
14
|
import { GlobOptions } from 'glob';
|
|
15
15
|
import { ChildProcess } from 'node:child_process';
|
|
16
|
-
import { EasbotShell, ShellExpression, EasbotShellPromise } from '@easbot/types';
|
|
17
16
|
export { HTTPException } from 'hono/http-exception';
|
|
17
|
+
import { ShellExpression, EasbotShellPromise, EasbotShell } from '@easbot/types';
|
|
18
18
|
export { SSEStreamingApi } from 'hono/streaming';
|
|
19
19
|
export { WebSocket as WSContext } from 'ws';
|
|
20
20
|
export { compress } from 'hono/compress';
|
|
@@ -300,12 +300,6 @@ declare namespace Fn {
|
|
|
300
300
|
|
|
301
301
|
declare function loadEnv(): void;
|
|
302
302
|
|
|
303
|
-
declare namespace Identifier {
|
|
304
|
-
function ascending(): string;
|
|
305
|
-
function descending(): string;
|
|
306
|
-
function create(descending: boolean, timestamp?: number): string;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
303
|
interface GitResult {
|
|
310
304
|
exitCode: number;
|
|
311
305
|
text(): string | Promise<string>;
|
|
@@ -721,7 +715,7 @@ declare class PkgShell {
|
|
|
721
715
|
throws(shouldThrow: boolean): EasbotShell;
|
|
722
716
|
}
|
|
723
717
|
declare function createPkgShell(options?: ShellOptions): EasbotShell;
|
|
724
|
-
declare const
|
|
718
|
+
declare const shell: EasbotShell;
|
|
725
719
|
|
|
726
720
|
interface NodeWhichOptions {
|
|
727
721
|
PATH?: string;
|
|
@@ -1119,6 +1113,39 @@ declare const $: typeof PKG.$;
|
|
|
1119
1113
|
declare const readableStreamToText: typeof PKG.readableStreamToText;
|
|
1120
1114
|
declare const whichSync: typeof PKG.whichSync;
|
|
1121
1115
|
|
|
1116
|
+
declare namespace PackageRegistry {
|
|
1117
|
+
function info(pkg: string, field: string, cwd?: string): Promise<string | null>;
|
|
1118
|
+
function isOutdated(pkg: string, cachedVersion: string, cwd?: string): Promise<boolean>;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
declare namespace Identifier {
|
|
1122
|
+
const prefixes: {
|
|
1123
|
+
readonly event: "evt";
|
|
1124
|
+
readonly session: "ses";
|
|
1125
|
+
readonly message: "msg";
|
|
1126
|
+
readonly permission: "per";
|
|
1127
|
+
readonly question: "que";
|
|
1128
|
+
readonly user: "usr";
|
|
1129
|
+
readonly part: "prt";
|
|
1130
|
+
readonly pty: "pty";
|
|
1131
|
+
readonly tool: "tool";
|
|
1132
|
+
readonly workspace: "wrk";
|
|
1133
|
+
readonly command: "cmd";
|
|
1134
|
+
readonly task: "task";
|
|
1135
|
+
readonly heartbeat: "hb";
|
|
1136
|
+
readonly subagent: "sub";
|
|
1137
|
+
readonly hook: "hok";
|
|
1138
|
+
readonly compaction: "cmp";
|
|
1139
|
+
readonly context: "ctx";
|
|
1140
|
+
};
|
|
1141
|
+
export function schema(prefix: keyof typeof prefixes): z.ZodString;
|
|
1142
|
+
export function ascending(prefix: keyof typeof prefixes, given?: string): string;
|
|
1143
|
+
export function descending(prefix: keyof typeof prefixes, given?: string): string;
|
|
1144
|
+
export function create(prefix: keyof typeof prefixes, descending: boolean, timestamp?: number): string;
|
|
1145
|
+
export function timestamp(id: string): number;
|
|
1146
|
+
export { };
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1122
1149
|
declare function abortAfter(ms: number): {
|
|
1123
1150
|
controller: AbortController;
|
|
1124
1151
|
signal: AbortSignal;
|
|
@@ -1316,4 +1343,4 @@ declare function initLog(options: {
|
|
|
1316
1343
|
level?: 'DEBUG' | 'INFO' | 'WARN' | 'ERROR';
|
|
1317
1344
|
}): Promise<void>;
|
|
1318
1345
|
|
|
1319
|
-
export { $, Archive, AsyncQueue, Binary, type CodeSpanIndex$1 as CodeSpanIndex, Color, Context, type EasServer,
|
|
1346
|
+
export { $, Archive, AsyncQueue, Binary, type CodeSpanIndex$1 as CodeSpanIndex, Color, Context, type EasServer, Encode, EventLoop, type FenceSpan$1 as FenceSpan, Filesystem, Fn, type FormatOptions, type GitResult, Glob, Identifier, type InlineCodeState$1 as InlineCodeState, Keybind, Lazy, Locale, Lock, 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 ParsedFrontmatter, PkgShell, Process, type RPCMethod, type RenderLink, type RenderOptions, type RouteDefinition, type SSEHandler, type ServerOptions, Slug, type StreamHandler, type StyleMarker, Token, TruncateContent, type WebSocketHandler, type WebSocketRouteDefinition, Wildcard, abortAfter, abortAfterAny, buildCodeSpanIndex, chunkMarkdownIR, chunkText, chunkTextByBreakResolver, convertMarkdownTables, createInlineCodeState, createPkgShell, createRESTServer, createRPCServer, createServer, createStreamingServer, createWebSocketServer, defer, extractFrontmatter, findFenceSpanAt, findLast, fn, formatDuration, formatLocalISO, formatLocalISOCompact, formatLogTime, formatMarkdown, getDirectory, getFileExtension, getFilename, getFilenameTruncated, getTimezoneOffset, git, iife, initLog, isSafeFenceBreak, lazy, lazyAsync, loadEnv, loadTextFile, loadTextFileAsync, markdownToIR, markdownToIRWithMeta, now, nowLocalISO, parseFenceSpans, parseFrontmatterBlock, parseLocalISO, parseModelId, proxied, readableStreamToText, renderMarkdown, renderMarkdownWithMarkers, retry, scanParenAwareBreakpoints, serializeFrontmatter, shell, signal, startServer, truncateMiddle, updateSchema, whichSync, withTimeout, work };
|
package/dist/index.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ import { cors } from 'hono/cors';
|
|
|
13
13
|
export { cors } from 'hono/cors';
|
|
14
14
|
import { GlobOptions } from 'glob';
|
|
15
15
|
import { ChildProcess } from 'node:child_process';
|
|
16
|
-
import { EasbotShell, ShellExpression, EasbotShellPromise } from '@easbot/types';
|
|
17
16
|
export { HTTPException } from 'hono/http-exception';
|
|
17
|
+
import { ShellExpression, EasbotShellPromise, EasbotShell } from '@easbot/types';
|
|
18
18
|
export { SSEStreamingApi } from 'hono/streaming';
|
|
19
19
|
export { WebSocket as WSContext } from 'ws';
|
|
20
20
|
export { compress } from 'hono/compress';
|
|
@@ -300,12 +300,6 @@ declare namespace Fn {
|
|
|
300
300
|
|
|
301
301
|
declare function loadEnv(): void;
|
|
302
302
|
|
|
303
|
-
declare namespace Identifier {
|
|
304
|
-
function ascending(): string;
|
|
305
|
-
function descending(): string;
|
|
306
|
-
function create(descending: boolean, timestamp?: number): string;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
303
|
interface GitResult {
|
|
310
304
|
exitCode: number;
|
|
311
305
|
text(): string | Promise<string>;
|
|
@@ -721,7 +715,7 @@ declare class PkgShell {
|
|
|
721
715
|
throws(shouldThrow: boolean): EasbotShell;
|
|
722
716
|
}
|
|
723
717
|
declare function createPkgShell(options?: ShellOptions): EasbotShell;
|
|
724
|
-
declare const
|
|
718
|
+
declare const shell: EasbotShell;
|
|
725
719
|
|
|
726
720
|
interface NodeWhichOptions {
|
|
727
721
|
PATH?: string;
|
|
@@ -1119,6 +1113,39 @@ declare const $: typeof PKG.$;
|
|
|
1119
1113
|
declare const readableStreamToText: typeof PKG.readableStreamToText;
|
|
1120
1114
|
declare const whichSync: typeof PKG.whichSync;
|
|
1121
1115
|
|
|
1116
|
+
declare namespace PackageRegistry {
|
|
1117
|
+
function info(pkg: string, field: string, cwd?: string): Promise<string | null>;
|
|
1118
|
+
function isOutdated(pkg: string, cachedVersion: string, cwd?: string): Promise<boolean>;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
declare namespace Identifier {
|
|
1122
|
+
const prefixes: {
|
|
1123
|
+
readonly event: "evt";
|
|
1124
|
+
readonly session: "ses";
|
|
1125
|
+
readonly message: "msg";
|
|
1126
|
+
readonly permission: "per";
|
|
1127
|
+
readonly question: "que";
|
|
1128
|
+
readonly user: "usr";
|
|
1129
|
+
readonly part: "prt";
|
|
1130
|
+
readonly pty: "pty";
|
|
1131
|
+
readonly tool: "tool";
|
|
1132
|
+
readonly workspace: "wrk";
|
|
1133
|
+
readonly command: "cmd";
|
|
1134
|
+
readonly task: "task";
|
|
1135
|
+
readonly heartbeat: "hb";
|
|
1136
|
+
readonly subagent: "sub";
|
|
1137
|
+
readonly hook: "hok";
|
|
1138
|
+
readonly compaction: "cmp";
|
|
1139
|
+
readonly context: "ctx";
|
|
1140
|
+
};
|
|
1141
|
+
export function schema(prefix: keyof typeof prefixes): z.ZodString;
|
|
1142
|
+
export function ascending(prefix: keyof typeof prefixes, given?: string): string;
|
|
1143
|
+
export function descending(prefix: keyof typeof prefixes, given?: string): string;
|
|
1144
|
+
export function create(prefix: keyof typeof prefixes, descending: boolean, timestamp?: number): string;
|
|
1145
|
+
export function timestamp(id: string): number;
|
|
1146
|
+
export { };
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1122
1149
|
declare function abortAfter(ms: number): {
|
|
1123
1150
|
controller: AbortController;
|
|
1124
1151
|
signal: AbortSignal;
|
|
@@ -1316,4 +1343,4 @@ declare function initLog(options: {
|
|
|
1316
1343
|
level?: 'DEBUG' | 'INFO' | 'WARN' | 'ERROR';
|
|
1317
1344
|
}): Promise<void>;
|
|
1318
1345
|
|
|
1319
|
-
export { $, Archive, AsyncQueue, Binary, type CodeSpanIndex$1 as CodeSpanIndex, Color, Context, type EasServer,
|
|
1346
|
+
export { $, Archive, AsyncQueue, Binary, type CodeSpanIndex$1 as CodeSpanIndex, Color, Context, type EasServer, Encode, EventLoop, type FenceSpan$1 as FenceSpan, Filesystem, Fn, type FormatOptions, type GitResult, Glob, Identifier, type InlineCodeState$1 as InlineCodeState, Keybind, Lazy, Locale, Lock, 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 ParsedFrontmatter, PkgShell, Process, type RPCMethod, type RenderLink, type RenderOptions, type RouteDefinition, type SSEHandler, type ServerOptions, Slug, type StreamHandler, type StyleMarker, Token, TruncateContent, type WebSocketHandler, type WebSocketRouteDefinition, Wildcard, abortAfter, abortAfterAny, buildCodeSpanIndex, chunkMarkdownIR, chunkText, chunkTextByBreakResolver, convertMarkdownTables, createInlineCodeState, createPkgShell, createRESTServer, createRPCServer, createServer, createStreamingServer, createWebSocketServer, defer, extractFrontmatter, findFenceSpanAt, findLast, fn, formatDuration, formatLocalISO, formatLocalISOCompact, formatLogTime, formatMarkdown, getDirectory, getFileExtension, getFilename, getFilenameTruncated, getTimezoneOffset, git, iife, initLog, isSafeFenceBreak, lazy, lazyAsync, loadEnv, loadTextFile, loadTextFileAsync, markdownToIR, markdownToIRWithMeta, now, nowLocalISO, parseFenceSpans, parseFrontmatterBlock, parseLocalISO, parseModelId, proxied, readableStreamToText, renderMarkdown, renderMarkdownWithMarkers, retry, scanParenAwareBreakpoints, serializeFrontmatter, shell, signal, startServer, truncateMiddle, updateSchema, whichSync, withTimeout, work };
|