-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(scripts/bundle): dont bundle types
- Loading branch information
Showing
6 changed files
with
66 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// Type definitions for bun-utilities | ||
// Project: https://github.com/xHyroM/bun-utilities | ||
|
||
/// <reference path="./utils/fs.d.ts" /> | ||
/// <reference path="./utils/os.d.ts" /> | ||
/// <reference path="./utils/spawn.d.ts" /> | ||
export * from './utils/fs'; | ||
export * from './utils/os'; | ||
export * from './utils/spawn'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
declare module 'bun-utilities/fs' { | ||
export interface RecrusiveOptions { | ||
recursive?: boolean; | ||
} | ||
|
||
export interface CopyDirOptions { | ||
recursive?: boolean; | ||
copyFiles?: boolean; | ||
} | ||
export interface RecrusiveOptions { | ||
recursive?: boolean; | ||
} | ||
|
||
export function rmdir(path: string, options?: RecrusiveOptions | undefined | null): string; | ||
export function copyfile(src: string, dest: string, options?: RecrusiveOptions | undefined | null): string; | ||
export function copydir(src: string, dest: string, options?: CopyDirOptions | undefined | null): string; | ||
} | ||
export interface CopyDirOptions { | ||
recursive?: boolean; | ||
copyFiles?: boolean; | ||
} | ||
|
||
export function rmdir(path: string, options?: RecrusiveOptions | undefined | null): string; | ||
export function copyfile(src: string, dest: string, options?: RecrusiveOptions | undefined | null): string; | ||
export function copydir(src: string, dest: string, options?: CopyDirOptions | undefined | null): string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
declare module 'bun-utilities/os' { | ||
export function homedir(): string | null; | ||
export function cachedir(): string | null; | ||
export function tempdir(): string; | ||
export function hostname(): string | null; | ||
export function platform(): string; | ||
export function arch(): string; | ||
export function release(): string | null; | ||
export function uptime(): number | null; | ||
export interface CpuInfo { | ||
model: string; | ||
speed: number; | ||
usage: number; | ||
ventorId: string; | ||
} | ||
export function cpus(): Array<CpuInfo>; | ||
export function totalMemory(): number; | ||
export function freeMemory(): number; | ||
export function totalSwap(): number; | ||
export function freeSwap(): number; | ||
export interface NetworkInfo { | ||
name: string; | ||
address: string; | ||
netmask?: string; | ||
family: 'IPv4' | 'IPv6'; | ||
} | ||
export function networkInterfaces(): Array<NetworkInfo>; | ||
export function homedir(): string | null; | ||
export function cachedir(): string | null; | ||
export function tempdir(): string; | ||
export function hostname(): string | null; | ||
export function platform(): string; | ||
export function arch(): string; | ||
export function release(): string | null; | ||
export function uptime(): number | null; | ||
export interface CpuInfo { | ||
model: string; | ||
speed: number; | ||
usage: number; | ||
ventorId: string; | ||
} | ||
export function cpus(): Array<CpuInfo>; | ||
export function totalMemory(): number; | ||
export function freeMemory(): number; | ||
export function totalSwap(): number; | ||
export function freeSwap(): number; | ||
export interface NetworkInfo { | ||
name: string; | ||
address: string; | ||
netmask?: string; | ||
family: 'IPv4' | 'IPv6'; | ||
} | ||
export function networkInterfaces(): Array<NetworkInfo>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
declare module 'bun-utilities/spawn' { | ||
export interface ProcessResult { | ||
stdout?: string; | ||
stderr?: string; | ||
exitCode?: number; | ||
isExecuted: boolean; | ||
} | ||
export interface Options { | ||
cwd?: string; | ||
stdin?: 'inherit' | 'piped' | null; | ||
stdout?: 'inherit' | 'piped' | null; | ||
stderr?: 'inherit' | 'piped' | null; | ||
} | ||
export function exec(commandWithArgs: Array<string>, options?: Options | undefined | null): { stdout: undefined, stderr: undefined, exitCode?: number, isExecuted: false } | { stdout: string, stderr: string, exitCode?: number, isExecuted: true }; | ||
export function spawn(command: string, args: Array<string>, options?: Options | undefined | null): { stdout: undefined, stderr: undefined, exitCode?: number, isExecuted: false } | { stdout: string, stderr: string, exitCode?: number, isExecuted: true }; | ||
export function execAndDontWait(commandWithArgs: Array<string>, options?: Options | undefined | null): ProcessResult; | ||
export function spawnAndDontWait(command: string, args: Array<string>, options?: Options | undefined | null): { isExecuted: true }; | ||
export interface ProcessResult { | ||
stdout?: string; | ||
stderr?: string; | ||
exitCode?: number; | ||
isExecuted: boolean; | ||
} | ||
export interface Options { | ||
cwd?: string; | ||
stdin?: 'inherit' | 'piped' | null; | ||
stdout?: 'inherit' | 'piped' | null; | ||
stderr?: 'inherit' | 'piped' | null; | ||
} | ||
export function exec(commandWithArgs: Array<string>, options?: Options | undefined | null): { stdout: undefined, stderr: undefined, exitCode?: number, isExecuted: false } | { stdout: string, stderr: string, exitCode?: number, isExecuted: true }; | ||
export function spawn(command: string, args: Array<string>, options?: Options | undefined | null): { stdout: undefined, stderr: undefined, exitCode?: number, isExecuted: false } | { stdout: string, stderr: string, exitCode?: number, isExecuted: true }; | ||
export function execAndDontWait(commandWithArgs: Array<string>, options?: Options | undefined | null): ProcessResult; | ||
export function spawnAndDontWait(command: string, args: Array<string>, options?: Options | undefined | null): { isExecuted: true }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters