@easbot/utils 0.2.49 → 0.3.0
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-LDBNML7W.cjs +5 -0
- package/dist/chunks/chunk-NRZ5OCPV.mjs +5 -0
- package/dist/chunks/registry-Q2IYSJIO.mjs +1 -0
- package/dist/chunks/registry-ZKEZ2CUZ.cjs +1 -0
- package/dist/index.cjs +43 -43
- package/dist/index.d.cts +35 -8
- package/dist/index.d.ts +35 -8
- package/dist/index.mjs +45 -45
- package/package.json +2 -2
- package/dist/chunks/chunk-7XA3MNEJ.mjs +0 -1
- package/dist/chunks/chunk-PYCQUF3V.cjs +0 -1
- package/dist/chunks/chunk-WN6DTIOU.mjs +0 -5
- package/dist/chunks/chunk-WWPI6PC4.cjs +0 -5
- package/dist/chunks/log-K3P7BT54.mjs +0 -1
- package/dist/chunks/log-OJU7I2TN.cjs +0 -1
- package/dist/chunks/registry-LIPZA2EC.cjs +0 -1
- package/dist/chunks/registry-O74JPNLS.mjs +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1316,12 +1316,39 @@ declare namespace Wildcard {
|
|
|
1316
1316
|
}, patterns: Record<string, unknown>): unknown;
|
|
1317
1317
|
}
|
|
1318
1318
|
|
|
1319
|
-
declare
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
}
|
|
1319
|
+
declare namespace Log {
|
|
1320
|
+
const Level: z.ZodEnum<{
|
|
1321
|
+
DEBUG: "DEBUG";
|
|
1322
|
+
INFO: "INFO";
|
|
1323
|
+
WARN: "WARN";
|
|
1324
|
+
ERROR: "ERROR";
|
|
1325
|
+
}>;
|
|
1326
|
+
type Level = z.infer<typeof Level>;
|
|
1327
|
+
function getLevel(): Level;
|
|
1328
|
+
type Logger = {
|
|
1329
|
+
debug(message?: any, extra?: Record<string, any>): void;
|
|
1330
|
+
info(message?: any, extra?: Record<string, any>): void;
|
|
1331
|
+
error(message?: any, extra?: Record<string, any>): void;
|
|
1332
|
+
warn(message?: any, extra?: Record<string, any>): void;
|
|
1333
|
+
tag(key: string, value: string): Logger;
|
|
1334
|
+
clone(): Logger;
|
|
1335
|
+
time(message: string, extra?: Record<string, any>): {
|
|
1336
|
+
stop(): void;
|
|
1337
|
+
[Symbol.dispose](): void;
|
|
1338
|
+
};
|
|
1339
|
+
};
|
|
1340
|
+
const Default: Logger;
|
|
1341
|
+
interface Options {
|
|
1342
|
+
print: boolean;
|
|
1343
|
+
logDir: string;
|
|
1344
|
+
logFile?: string;
|
|
1345
|
+
dev?: boolean;
|
|
1346
|
+
level?: Level;
|
|
1347
|
+
}
|
|
1348
|
+
function file(): string;
|
|
1349
|
+
function init(options: Options): Promise<void>;
|
|
1350
|
+
function close(): Promise<void>;
|
|
1351
|
+
function create(tags?: Record<string, any>): Logger;
|
|
1352
|
+
}
|
|
1326
1353
|
|
|
1327
|
-
export { $, Archive, AsyncQueue, Binary, type CodeSpanIndex$1 as CodeSpanIndex, Color, Context, type EasServer, Encode, EventLoop, type FenceSpan$1 as FenceSpan, Fetch, type FetchResponse, Filesystem, Fn, type FormatOptions, type GitResult, Glob, Identifier, Ignore, type InlineCodeState$1 as InlineCodeState, Keybind, Lazy, Locale, Lock, 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, 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, formatMarkdown, getDirectory, getFileExtension, getFilename, getFilenameTruncated, getProxyConfig, getProxyUrl, getTimezoneOffset, getTimezoneParts, git, iife,
|
|
1354
|
+
export { $, Archive, AsyncQueue, Binary, type CodeSpanIndex$1 as CodeSpanIndex, Color, Context, type EasServer, Encode, EventLoop, type FenceSpan$1 as FenceSpan, Fetch, type FetchResponse, Filesystem, Fn, type FormatOptions, type GitResult, Glob, Identifier, Ignore, type InlineCodeState$1 as InlineCodeState, Keybind, 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, 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, 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, retry, scanParenAwareBreakpoints, serializeFrontmatter, shell, signal, startServer, truncateMiddle, updateSchema, whichSync, withTimeout, work };
|
package/dist/index.d.ts
CHANGED
|
@@ -1316,12 +1316,39 @@ declare namespace Wildcard {
|
|
|
1316
1316
|
}, patterns: Record<string, unknown>): unknown;
|
|
1317
1317
|
}
|
|
1318
1318
|
|
|
1319
|
-
declare
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
}
|
|
1319
|
+
declare namespace Log {
|
|
1320
|
+
const Level: z.ZodEnum<{
|
|
1321
|
+
DEBUG: "DEBUG";
|
|
1322
|
+
INFO: "INFO";
|
|
1323
|
+
WARN: "WARN";
|
|
1324
|
+
ERROR: "ERROR";
|
|
1325
|
+
}>;
|
|
1326
|
+
type Level = z.infer<typeof Level>;
|
|
1327
|
+
function getLevel(): Level;
|
|
1328
|
+
type Logger = {
|
|
1329
|
+
debug(message?: any, extra?: Record<string, any>): void;
|
|
1330
|
+
info(message?: any, extra?: Record<string, any>): void;
|
|
1331
|
+
error(message?: any, extra?: Record<string, any>): void;
|
|
1332
|
+
warn(message?: any, extra?: Record<string, any>): void;
|
|
1333
|
+
tag(key: string, value: string): Logger;
|
|
1334
|
+
clone(): Logger;
|
|
1335
|
+
time(message: string, extra?: Record<string, any>): {
|
|
1336
|
+
stop(): void;
|
|
1337
|
+
[Symbol.dispose](): void;
|
|
1338
|
+
};
|
|
1339
|
+
};
|
|
1340
|
+
const Default: Logger;
|
|
1341
|
+
interface Options {
|
|
1342
|
+
print: boolean;
|
|
1343
|
+
logDir: string;
|
|
1344
|
+
logFile?: string;
|
|
1345
|
+
dev?: boolean;
|
|
1346
|
+
level?: Level;
|
|
1347
|
+
}
|
|
1348
|
+
function file(): string;
|
|
1349
|
+
function init(options: Options): Promise<void>;
|
|
1350
|
+
function close(): Promise<void>;
|
|
1351
|
+
function create(tags?: Record<string, any>): Logger;
|
|
1352
|
+
}
|
|
1326
1353
|
|
|
1327
|
-
export { $, Archive, AsyncQueue, Binary, type CodeSpanIndex$1 as CodeSpanIndex, Color, Context, type EasServer, Encode, EventLoop, type FenceSpan$1 as FenceSpan, Fetch, type FetchResponse, Filesystem, Fn, type FormatOptions, type GitResult, Glob, Identifier, Ignore, type InlineCodeState$1 as InlineCodeState, Keybind, Lazy, Locale, Lock, 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, 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, formatMarkdown, getDirectory, getFileExtension, getFilename, getFilenameTruncated, getProxyConfig, getProxyUrl, getTimezoneOffset, getTimezoneParts, git, iife,
|
|
1354
|
+
export { $, Archive, AsyncQueue, Binary, type CodeSpanIndex$1 as CodeSpanIndex, Color, Context, type EasServer, Encode, EventLoop, type FenceSpan$1 as FenceSpan, Fetch, type FetchResponse, Filesystem, Fn, type FormatOptions, type GitResult, Glob, Identifier, Ignore, type InlineCodeState$1 as InlineCodeState, Keybind, 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, 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, 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, retry, scanParenAwareBreakpoints, serializeFrontmatter, shell, signal, startServer, truncateMiddle, updateSchema, whichSync, withTimeout, work };
|