@easbot/utils 0.1.12 → 0.1.14
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/README.en.md +55 -0
- package/README.md +12 -76
- package/dist/chunks/{chunk-JRBFY3PQ.mjs → chunk-6MVBFBWB.mjs} +5 -5
- package/dist/chunks/{chunk-PQ3EETPA.cjs → chunk-ZNIQRHSA.cjs} +5 -5
- package/dist/chunks/log-CD3QO5T3.cjs +1 -0
- package/dist/chunks/log-OSKSGVSM.mjs +1 -0
- package/dist/index.cjs +39 -35
- package/dist/index.d.cts +18 -5
- package/dist/index.d.ts +18 -5
- package/dist/index.mjs +39 -35
- package/package.json +2 -2
- package/dist/chunks/log-S3VOL35O.mjs +0 -1
- package/dist/chunks/log-YI7B3XJ6.cjs +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import z, { z as z$1 } from 'zod';
|
|
2
2
|
export { z } from 'zod';
|
|
3
|
-
import
|
|
4
|
-
import { statSync } from 'fs';
|
|
3
|
+
import { statSync } from 'node:fs';
|
|
5
4
|
import * as stream from 'stream';
|
|
6
5
|
import { Readable } from 'stream';
|
|
7
6
|
import * as _hono_node_ws from '@hono/node-ws';
|
|
8
7
|
export { createNodeWebSocket } from '@hono/node-ws';
|
|
8
|
+
import * as fs from 'fs';
|
|
9
9
|
import { Context as Context$1, Next, Hono } from 'hono';
|
|
10
10
|
export { Hono, Next } from 'hono';
|
|
11
11
|
import { ServerType } from '@hono/node-server';
|
|
12
12
|
import { cors } from 'hono/cors';
|
|
13
13
|
export { cors } from 'hono/cors';
|
|
14
|
+
import { GlobOptions } from 'glob';
|
|
14
15
|
import { ChildProcess } from 'node:child_process';
|
|
15
16
|
import { EasbotShell, ShellExpression, EasbotShellPromise } from '@easbot/types';
|
|
16
17
|
export { HTTPException } from 'hono/http-exception';
|
|
@@ -255,6 +256,9 @@ declare abstract class NamedError extends Error {
|
|
|
255
256
|
}
|
|
256
257
|
|
|
257
258
|
declare namespace Filesystem {
|
|
259
|
+
function mkdir(p: string, options?: {
|
|
260
|
+
recursive?: boolean;
|
|
261
|
+
}): Promise<void>;
|
|
258
262
|
function exists(p: string): Promise<boolean>;
|
|
259
263
|
function isDir(p: string): Promise<boolean>;
|
|
260
264
|
function stat(p: string): ReturnType<typeof statSync> | undefined;
|
|
@@ -501,7 +505,9 @@ declare function scanParenAwareBreakpoints(text: string, start: number, end: num
|
|
|
501
505
|
lastNewline: number;
|
|
502
506
|
lastWhitespace: number;
|
|
503
507
|
};
|
|
504
|
-
declare function chunkText(text: string, limit: number
|
|
508
|
+
declare function chunkText(text: string, limit: number, options?: {
|
|
509
|
+
minLength?: number;
|
|
510
|
+
}): string[];
|
|
505
511
|
declare function chunkTextByBreakResolver(text: string, limit: number, resolveBreakIndex: (window: string) => number): string[];
|
|
506
512
|
|
|
507
513
|
type InlineCodeState = {
|
|
@@ -538,7 +544,9 @@ declare namespace Markdown {
|
|
|
538
544
|
frontmatter: ParsedFrontmatter;
|
|
539
545
|
content: string;
|
|
540
546
|
};
|
|
541
|
-
function chunk(text: string, limit: number
|
|
547
|
+
function chunk(text: string, limit: number, options?: {
|
|
548
|
+
minLength?: number;
|
|
549
|
+
}): string[];
|
|
542
550
|
function buildCodeIndex(text: string, inlineState?: InlineCodeState$1): CodeSpanIndex$1;
|
|
543
551
|
function convertTables(markdown: string, tableMode: MarkdownTableMode): string;
|
|
544
552
|
}
|
|
@@ -1159,16 +1167,21 @@ declare namespace EventLoop {
|
|
|
1159
1167
|
declare function formatDuration(secs: number): string;
|
|
1160
1168
|
|
|
1161
1169
|
declare namespace Glob {
|
|
1162
|
-
interface Options {
|
|
1170
|
+
interface Options extends GlobOptions {
|
|
1163
1171
|
cwd?: string;
|
|
1164
1172
|
absolute?: boolean;
|
|
1165
1173
|
include?: 'file' | 'all';
|
|
1166
1174
|
dot?: boolean;
|
|
1167
1175
|
symlink?: boolean;
|
|
1176
|
+
ignore?: string[];
|
|
1168
1177
|
}
|
|
1169
1178
|
function scan(pattern: string, options?: Options): Promise<string[]>;
|
|
1170
1179
|
function scanSync(pattern: string, options?: Options): string[];
|
|
1171
1180
|
function match(pattern: string, filepath: string): boolean;
|
|
1181
|
+
function parseGitignore(gitignorePath: string): Promise<string[]>;
|
|
1182
|
+
function parseGitignoreContent(content: string): string[];
|
|
1183
|
+
function isIgnored(filepath: string, patterns: string[]): boolean;
|
|
1184
|
+
const DEFAULT_IGNORE_PATTERNS: string[];
|
|
1172
1185
|
}
|
|
1173
1186
|
|
|
1174
1187
|
declare namespace Keybind {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import z, { z as z$1 } from 'zod';
|
|
2
2
|
export { z } from 'zod';
|
|
3
|
-
import
|
|
4
|
-
import { statSync } from 'fs';
|
|
3
|
+
import { statSync } from 'node:fs';
|
|
5
4
|
import * as stream from 'stream';
|
|
6
5
|
import { Readable } from 'stream';
|
|
7
6
|
import * as _hono_node_ws from '@hono/node-ws';
|
|
8
7
|
export { createNodeWebSocket } from '@hono/node-ws';
|
|
8
|
+
import * as fs from 'fs';
|
|
9
9
|
import { Context as Context$1, Next, Hono } from 'hono';
|
|
10
10
|
export { Hono, Next } from 'hono';
|
|
11
11
|
import { ServerType } from '@hono/node-server';
|
|
12
12
|
import { cors } from 'hono/cors';
|
|
13
13
|
export { cors } from 'hono/cors';
|
|
14
|
+
import { GlobOptions } from 'glob';
|
|
14
15
|
import { ChildProcess } from 'node:child_process';
|
|
15
16
|
import { EasbotShell, ShellExpression, EasbotShellPromise } from '@easbot/types';
|
|
16
17
|
export { HTTPException } from 'hono/http-exception';
|
|
@@ -255,6 +256,9 @@ declare abstract class NamedError extends Error {
|
|
|
255
256
|
}
|
|
256
257
|
|
|
257
258
|
declare namespace Filesystem {
|
|
259
|
+
function mkdir(p: string, options?: {
|
|
260
|
+
recursive?: boolean;
|
|
261
|
+
}): Promise<void>;
|
|
258
262
|
function exists(p: string): Promise<boolean>;
|
|
259
263
|
function isDir(p: string): Promise<boolean>;
|
|
260
264
|
function stat(p: string): ReturnType<typeof statSync> | undefined;
|
|
@@ -501,7 +505,9 @@ declare function scanParenAwareBreakpoints(text: string, start: number, end: num
|
|
|
501
505
|
lastNewline: number;
|
|
502
506
|
lastWhitespace: number;
|
|
503
507
|
};
|
|
504
|
-
declare function chunkText(text: string, limit: number
|
|
508
|
+
declare function chunkText(text: string, limit: number, options?: {
|
|
509
|
+
minLength?: number;
|
|
510
|
+
}): string[];
|
|
505
511
|
declare function chunkTextByBreakResolver(text: string, limit: number, resolveBreakIndex: (window: string) => number): string[];
|
|
506
512
|
|
|
507
513
|
type InlineCodeState = {
|
|
@@ -538,7 +544,9 @@ declare namespace Markdown {
|
|
|
538
544
|
frontmatter: ParsedFrontmatter;
|
|
539
545
|
content: string;
|
|
540
546
|
};
|
|
541
|
-
function chunk(text: string, limit: number
|
|
547
|
+
function chunk(text: string, limit: number, options?: {
|
|
548
|
+
minLength?: number;
|
|
549
|
+
}): string[];
|
|
542
550
|
function buildCodeIndex(text: string, inlineState?: InlineCodeState$1): CodeSpanIndex$1;
|
|
543
551
|
function convertTables(markdown: string, tableMode: MarkdownTableMode): string;
|
|
544
552
|
}
|
|
@@ -1159,16 +1167,21 @@ declare namespace EventLoop {
|
|
|
1159
1167
|
declare function formatDuration(secs: number): string;
|
|
1160
1168
|
|
|
1161
1169
|
declare namespace Glob {
|
|
1162
|
-
interface Options {
|
|
1170
|
+
interface Options extends GlobOptions {
|
|
1163
1171
|
cwd?: string;
|
|
1164
1172
|
absolute?: boolean;
|
|
1165
1173
|
include?: 'file' | 'all';
|
|
1166
1174
|
dot?: boolean;
|
|
1167
1175
|
symlink?: boolean;
|
|
1176
|
+
ignore?: string[];
|
|
1168
1177
|
}
|
|
1169
1178
|
function scan(pattern: string, options?: Options): Promise<string[]>;
|
|
1170
1179
|
function scanSync(pattern: string, options?: Options): string[];
|
|
1171
1180
|
function match(pattern: string, filepath: string): boolean;
|
|
1181
|
+
function parseGitignore(gitignorePath: string): Promise<string[]>;
|
|
1182
|
+
function parseGitignoreContent(content: string): string[];
|
|
1183
|
+
function isIgnored(filepath: string, patterns: string[]): boolean;
|
|
1184
|
+
const DEFAULT_IGNORE_PATTERNS: string[];
|
|
1172
1185
|
}
|
|
1173
1186
|
|
|
1174
1187
|
declare namespace Keybind {
|