@sayknow-cli/utils 0.4.2 → 0.4.3
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/types/abortable.d.ts +27 -0
- package/dist/types/async.d.ts +6 -0
- package/dist/types/broken-pipe.d.ts +27 -0
- package/dist/types/cli.d.ts +126 -0
- package/dist/types/color.d.ts +82 -0
- package/dist/types/dirs.d.ts +165 -0
- package/dist/types/env.d.ts +68 -0
- package/dist/types/fetch-retry.d.ts +80 -0
- package/dist/types/format.d.ts +37 -0
- package/dist/types/frontmatter.d.ts +25 -0
- package/dist/types/fs-error.d.ts +31 -0
- package/dist/types/glob.d.ts +28 -0
- package/dist/types/hook-fetch.d.ts +16 -0
- package/dist/types/index.d.ts +31 -0
- package/dist/types/json.d.ts +4 -0
- package/dist/types/logger.d.ts +66 -0
- package/dist/types/mermaid-ascii.d.ts +11 -0
- package/dist/types/mime.d.ts +29 -0
- package/dist/types/peek-file.d.ts +9 -0
- package/dist/types/postmortem.d.ts +29 -0
- package/dist/types/procmgr.d.ts +35 -0
- package/dist/types/prompt.d.ts +18 -0
- package/dist/types/ptree.d.ts +108 -0
- package/dist/types/ring.d.ts +93 -0
- package/dist/types/safe-stderr.d.ts +1 -0
- package/dist/types/sanitize-text.d.ts +14 -0
- package/dist/types/snowflake.d.ts +25 -0
- package/dist/types/spawn-env.d.ts +4 -0
- package/dist/types/stream.d.ts +68 -0
- package/dist/types/tab-spacing.d.ts +12 -0
- package/dist/types/temp.d.ts +14 -0
- package/dist/types/type-guards.d.ts +3 -0
- package/dist/types/which.d.ts +39 -0
- package/package.json +7 -6
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class TempDir {
|
|
2
|
+
#private;
|
|
3
|
+
private constructor();
|
|
4
|
+
static createSync(prefix?: string): TempDir;
|
|
5
|
+
static create(prefix?: string): Promise<TempDir>;
|
|
6
|
+
path(): string;
|
|
7
|
+
absolute(): string;
|
|
8
|
+
remove(): Promise<void>;
|
|
9
|
+
removeSync(): void;
|
|
10
|
+
toString(): string;
|
|
11
|
+
join(...paths: string[]): string;
|
|
12
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
13
|
+
[Symbol.dispose](): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cache policy for which lookups.
|
|
3
|
+
*/
|
|
4
|
+
export declare const enum WhichCachePolicy {
|
|
5
|
+
/**
|
|
6
|
+
* Use cached result if available.
|
|
7
|
+
*/
|
|
8
|
+
Cached = 0,
|
|
9
|
+
/**
|
|
10
|
+
* Bypass cache and perform a new lookup.
|
|
11
|
+
*/
|
|
12
|
+
Bypass = 1,
|
|
13
|
+
/**
|
|
14
|
+
* Always update cache.
|
|
15
|
+
*/
|
|
16
|
+
Fresh = 2,
|
|
17
|
+
/**
|
|
18
|
+
* Read-only, serves from cache if present, but doesn't write.
|
|
19
|
+
*/
|
|
20
|
+
ReadOnly = 3
|
|
21
|
+
}
|
|
22
|
+
export interface WhichOptions extends Bun.WhichOptions {
|
|
23
|
+
/**
|
|
24
|
+
* Cache policy for the lookup.
|
|
25
|
+
* Defaults to `WhichCachePolicy.Fresh`.
|
|
26
|
+
*/
|
|
27
|
+
cache?: WhichCachePolicy;
|
|
28
|
+
}
|
|
29
|
+
declare function darwinWhich(command: string, _options?: Bun.WhichOptions): string | null;
|
|
30
|
+
export declare const whichFresh: typeof darwinWhich;
|
|
31
|
+
/**
|
|
32
|
+
* Locate binary on PATH (with flexible caching).
|
|
33
|
+
*
|
|
34
|
+
* @param command - Binary name to resolve
|
|
35
|
+
* @param options - Bun.WhichOptions plus `cache` control
|
|
36
|
+
* @returns Filesystem path if found, else null
|
|
37
|
+
*/
|
|
38
|
+
export declare function $which(command: string, options?: WhichOptions): string | null;
|
|
39
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@sayknow-cli/utils",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.3",
|
|
5
5
|
"description": "Shared utilities for pi packages",
|
|
6
6
|
"homepage": "https://sayknow-cli.com",
|
|
7
7
|
"author": "jaybeyond",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"streams"
|
|
22
22
|
],
|
|
23
23
|
"main": "./src/index.ts",
|
|
24
|
-
"types": "./
|
|
24
|
+
"types": "./dist/types/index.d.ts",
|
|
25
25
|
"scripts": {
|
|
26
26
|
"check": "biome check . && bun run check:types",
|
|
27
27
|
"check:types": "tsc -p tsconfig.json --noEmit",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"fmt": "biome format --write ."
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@sayknow-cli/natives": "0.4.
|
|
34
|
+
"@sayknow-cli/natives": "0.4.3",
|
|
35
35
|
"beautiful-mermaid": "^1.1.3",
|
|
36
36
|
"handlebars": "^4.7.9",
|
|
37
37
|
"winston": "^3.19.0",
|
|
@@ -44,15 +44,16 @@
|
|
|
44
44
|
"bun": ">=1.3.14"
|
|
45
45
|
},
|
|
46
46
|
"files": [
|
|
47
|
-
"src"
|
|
47
|
+
"src",
|
|
48
|
+
"dist/types"
|
|
48
49
|
],
|
|
49
50
|
"exports": {
|
|
50
51
|
".": {
|
|
51
|
-
"types": "./
|
|
52
|
+
"types": "./dist/types/index.d.ts",
|
|
52
53
|
"import": "./src/index.ts"
|
|
53
54
|
},
|
|
54
55
|
"./*": {
|
|
55
|
-
"types": "./
|
|
56
|
+
"types": "./dist/types/*.d.ts",
|
|
56
57
|
"import": "./src/*.ts"
|
|
57
58
|
},
|
|
58
59
|
"./*.js": "./src/*.ts"
|