functype-os 0.4.1 → 0.60.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/ConfigResolver-DZ1820lj.d.ts +27 -0
- package/dist/Env-DAqDxz-w.d.ts +17 -0
- package/dist/Fs-DOShlUR7.d.ts +44 -0
- package/dist/PathExpander-DTM74lhP.d.ts +21 -0
- package/dist/Platform-CDBRIHxS.d.ts +40 -0
- package/dist/Process-CogfDqGc.d.ts +22 -0
- package/dist/config/ConfigResolver.d.ts +2 -27
- package/dist/config/index.d.ts +1 -1
- package/dist/env/Env.d.ts +2 -17
- package/dist/env/index.d.ts +1 -1
- package/dist/errors/errors.d.ts +2 -40
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors-BPpbT6Dy.d.ts +40 -0
- package/dist/fs/Fs.d.ts +2 -44
- package/dist/fs/index.d.ts +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1 -1
- package/dist/path/PathExpander.d.ts +2 -21
- package/dist/path/index.d.ts +1 -1
- package/dist/platform/Platform.d.ts +2 -40
- package/dist/platform/index.d.ts +1 -1
- package/dist/process/Process.d.ts +2 -22
- package/dist/process/index.d.ts +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { t as ConfigError } from "./errors-BPpbT6Dy.js";
|
|
2
|
+
import { Either, List, Option, TaskResult } from "functype";
|
|
3
|
+
|
|
4
|
+
//#region src/config/ConfigResolver.d.ts
|
|
5
|
+
declare const ConfigResolver: {
|
|
6
|
+
resolve: (options: {
|
|
7
|
+
readonly candidates: readonly string[];
|
|
8
|
+
}) => TaskResult<Option<string>>;
|
|
9
|
+
resolveRequired: (options: {
|
|
10
|
+
readonly candidates: readonly string[];
|
|
11
|
+
}) => TaskResult<string>;
|
|
12
|
+
resolveAll: (options: {
|
|
13
|
+
readonly candidates: readonly string[];
|
|
14
|
+
}) => TaskResult<List<string>>;
|
|
15
|
+
resolveSync: (options: {
|
|
16
|
+
readonly candidates: readonly string[];
|
|
17
|
+
}) => Option<string>;
|
|
18
|
+
resolveRequiredSync: (options: {
|
|
19
|
+
readonly candidates: readonly string[];
|
|
20
|
+
}) => Either<ConfigError, string>;
|
|
21
|
+
resolveAllSync: (options: {
|
|
22
|
+
readonly candidates: readonly string[];
|
|
23
|
+
}) => List<string>;
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { ConfigResolver as t };
|
|
27
|
+
//# sourceMappingURL=ConfigResolver-DZ1820lj.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { n as EnvError } from "./errors-BPpbT6Dy.js";
|
|
2
|
+
import { Either, List, Option } from "functype";
|
|
3
|
+
|
|
4
|
+
//#region src/env/Env.d.ts
|
|
5
|
+
declare const EnvConstructor: (name: string) => Option<string>;
|
|
6
|
+
declare const EnvCompanion: {
|
|
7
|
+
get: (name: string) => Option<string>;
|
|
8
|
+
getRequired: (name: string) => Either<EnvError, string>;
|
|
9
|
+
getOrDefault: (name: string, defaultValue: string) => string;
|
|
10
|
+
has: (name: string) => boolean;
|
|
11
|
+
entries: () => List<readonly [string, string]>;
|
|
12
|
+
parse: <T>(name: string, parser: (value: string) => T) => Either<EnvError, T>;
|
|
13
|
+
};
|
|
14
|
+
declare const Env: typeof EnvConstructor & typeof EnvCompanion;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Env as t };
|
|
17
|
+
//# sourceMappingURL=Env-DAqDxz-w.d.ts.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { r as FsError } from "./errors-BPpbT6Dy.js";
|
|
2
|
+
import { Either, List, Option, TaskResult } from "functype";
|
|
3
|
+
|
|
4
|
+
//#region src/fs/Fs.d.ts
|
|
5
|
+
type FileInfo = {
|
|
6
|
+
readonly size: number;
|
|
7
|
+
readonly isFile: boolean;
|
|
8
|
+
readonly isDirectory: boolean;
|
|
9
|
+
readonly isSymbolicLink: boolean;
|
|
10
|
+
readonly createdAt: Date;
|
|
11
|
+
readonly modifiedAt: Date;
|
|
12
|
+
readonly accessedAt: Date;
|
|
13
|
+
readonly permissions: number;
|
|
14
|
+
};
|
|
15
|
+
declare const Fs: {
|
|
16
|
+
exists: (p: string) => TaskResult<boolean>;
|
|
17
|
+
readFile: (p: string, encoding?: BufferEncoding) => TaskResult<string>;
|
|
18
|
+
readFileOpt: (p: string, encoding?: BufferEncoding) => TaskResult<Option<string>>;
|
|
19
|
+
stat: (p: string) => TaskResult<FileInfo>;
|
|
20
|
+
copyFile: (src: string, dest: string) => TaskResult<void>;
|
|
21
|
+
rename: (oldPath: string, newPath: string) => TaskResult<void>;
|
|
22
|
+
readdir: (p: string) => TaskResult<List<string>>;
|
|
23
|
+
glob: (dir: string, pattern: string) => TaskResult<List<string>>;
|
|
24
|
+
writeFile: (p: string, data: string, encoding?: BufferEncoding) => TaskResult<void>;
|
|
25
|
+
mkdir: (p: string, options?: {
|
|
26
|
+
recursive?: boolean;
|
|
27
|
+
}) => TaskResult<void>;
|
|
28
|
+
existsSync: (p: string) => boolean;
|
|
29
|
+
readFileSync: (p: string, encoding?: BufferEncoding) => Either<FsError, string>;
|
|
30
|
+
readFileOptSync: (p: string, encoding?: BufferEncoding) => Either<FsError, Option<string>>;
|
|
31
|
+
statSync: (p: string) => Either<FsError, FileInfo>;
|
|
32
|
+
copyFileSync: (src: string, dest: string) => Either<FsError, void>;
|
|
33
|
+
renameSync: (oldPath: string, newPath: string) => Either<FsError, void>;
|
|
34
|
+
readdirSync: (p: string) => Either<FsError, List<string>>;
|
|
35
|
+
writeFileSync: (p: string, data: string, encoding?: BufferEncoding) => Either<FsError, void>;
|
|
36
|
+
mkdirSync: (p: string, options?: {
|
|
37
|
+
recursive?: boolean;
|
|
38
|
+
}) => Either<FsError, void>;
|
|
39
|
+
unlink: (p: string) => TaskResult<void>;
|
|
40
|
+
unlinkSync: (p: string) => Either<FsError, void>;
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
export { Fs as n, FileInfo as t };
|
|
44
|
+
//# sourceMappingURL=Fs-DOShlUR7.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { a as PathError } from "./errors-BPpbT6Dy.js";
|
|
2
|
+
import { Either } from "functype";
|
|
3
|
+
|
|
4
|
+
//#region src/path/PathExpander.d.ts
|
|
5
|
+
declare const expandTilde: (p: string) => string;
|
|
6
|
+
declare const expandVars: (p: string) => Either<PathError, string>;
|
|
7
|
+
declare const expandPath: (p: string) => Either<PathError, string>;
|
|
8
|
+
declare const Path: {
|
|
9
|
+
expand: (p: string) => Either<PathError, string>;
|
|
10
|
+
expandTilde: (p: string) => string;
|
|
11
|
+
expandVars: (p: string) => Either<PathError, string>;
|
|
12
|
+
join: (...segments: string[]) => string;
|
|
13
|
+
resolve: (...segments: string[]) => string;
|
|
14
|
+
dirname: (p: string) => string;
|
|
15
|
+
basename: (p: string, suffix?: string) => string;
|
|
16
|
+
extname: (p: string) => string;
|
|
17
|
+
isAbsolute: (p: string) => boolean;
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { expandVars as i, expandPath as n, expandTilde as r, Path as t };
|
|
21
|
+
//# sourceMappingURL=PathExpander-DTM74lhP.d.ts.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { List, Option } from "functype";
|
|
2
|
+
|
|
3
|
+
//#region src/platform/Platform.d.ts
|
|
4
|
+
type UserInfo = {
|
|
5
|
+
readonly username: string;
|
|
6
|
+
readonly uid: number;
|
|
7
|
+
readonly gid: number;
|
|
8
|
+
readonly shell: string | null;
|
|
9
|
+
readonly homedir: string;
|
|
10
|
+
};
|
|
11
|
+
type CloudProvider = "onedrive" | "gdrive" | "dropbox" | "icloud";
|
|
12
|
+
type CloudStorageDir = {
|
|
13
|
+
readonly provider: CloudProvider;
|
|
14
|
+
readonly path: string;
|
|
15
|
+
readonly label: string;
|
|
16
|
+
};
|
|
17
|
+
declare const Platform: {
|
|
18
|
+
os: () => "darwin" | "linux" | "win32" | string;
|
|
19
|
+
arch: () => string;
|
|
20
|
+
homeDir: () => string;
|
|
21
|
+
tmpDir: () => string;
|
|
22
|
+
hostname: () => string;
|
|
23
|
+
eol: () => string;
|
|
24
|
+
pathSep: () => string;
|
|
25
|
+
isWindows: () => boolean;
|
|
26
|
+
isMac: () => boolean;
|
|
27
|
+
isLinux: () => boolean;
|
|
28
|
+
userInfo: () => Option<UserInfo>;
|
|
29
|
+
isDocker: () => boolean;
|
|
30
|
+
isKubernetes: () => boolean;
|
|
31
|
+
isWSL: () => boolean;
|
|
32
|
+
isCI: () => boolean;
|
|
33
|
+
isContainer: () => boolean;
|
|
34
|
+
windowsHomeDir: () => Option<string>;
|
|
35
|
+
homeDirs: () => List<string>;
|
|
36
|
+
cloudStorageDirs: (home?: string) => List<CloudStorageDir>;
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
export { UserInfo as i, CloudStorageDir as n, Platform as r, CloudProvider as t };
|
|
40
|
+
//# sourceMappingURL=Platform-CDBRIHxS.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { o as ProcessError } from "./errors-BPpbT6Dy.js";
|
|
2
|
+
import { Either, TaskResult } from "functype";
|
|
3
|
+
|
|
4
|
+
//#region src/process/Process.d.ts
|
|
5
|
+
type ExecResult = {
|
|
6
|
+
readonly stdout: string;
|
|
7
|
+
readonly stderr: string;
|
|
8
|
+
readonly exitCode: number;
|
|
9
|
+
};
|
|
10
|
+
declare const Process: {
|
|
11
|
+
exec: (command: string, options?: {
|
|
12
|
+
timeout?: number;
|
|
13
|
+
cwd?: string;
|
|
14
|
+
}) => TaskResult<ExecResult>;
|
|
15
|
+
execSync: (command: string, options?: {
|
|
16
|
+
timeout?: number;
|
|
17
|
+
cwd?: string;
|
|
18
|
+
}) => Either<ProcessError, ExecResult>;
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Process as n, ExecResult as t };
|
|
22
|
+
//# sourceMappingURL=Process-CogfDqGc.d.ts.map
|
|
@@ -1,27 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region src/config/ConfigResolver.d.ts
|
|
5
|
-
declare const ConfigResolver: {
|
|
6
|
-
resolve: (options: {
|
|
7
|
-
readonly candidates: readonly string[];
|
|
8
|
-
}) => TaskResult<Option<string>>;
|
|
9
|
-
resolveRequired: (options: {
|
|
10
|
-
readonly candidates: readonly string[];
|
|
11
|
-
}) => TaskResult<string>;
|
|
12
|
-
resolveAll: (options: {
|
|
13
|
-
readonly candidates: readonly string[];
|
|
14
|
-
}) => TaskResult<List<string>>;
|
|
15
|
-
resolveSync: (options: {
|
|
16
|
-
readonly candidates: readonly string[];
|
|
17
|
-
}) => Option<string>;
|
|
18
|
-
resolveRequiredSync: (options: {
|
|
19
|
-
readonly candidates: readonly string[];
|
|
20
|
-
}) => Either<ConfigError, string>;
|
|
21
|
-
resolveAllSync: (options: {
|
|
22
|
-
readonly candidates: readonly string[];
|
|
23
|
-
}) => List<string>;
|
|
24
|
-
};
|
|
25
|
-
//#endregion
|
|
26
|
-
export { ConfigResolver };
|
|
27
|
-
//# sourceMappingURL=ConfigResolver.d.ts.map
|
|
1
|
+
import { t as ConfigResolver } from "../ConfigResolver-DZ1820lj.js";
|
|
2
|
+
export { ConfigResolver };
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ConfigResolver } from "
|
|
1
|
+
import { t as ConfigResolver } from "../ConfigResolver-DZ1820lj.js";
|
|
2
2
|
export { ConfigResolver };
|
package/dist/env/Env.d.ts
CHANGED
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region src/env/Env.d.ts
|
|
5
|
-
declare const EnvConstructor: (name: string) => Option<string>;
|
|
6
|
-
declare const EnvCompanion: {
|
|
7
|
-
get: (name: string) => Option<string>;
|
|
8
|
-
getRequired: (name: string) => Either<EnvError, string>;
|
|
9
|
-
getOrDefault: (name: string, defaultValue: string) => string;
|
|
10
|
-
has: (name: string) => boolean;
|
|
11
|
-
entries: () => List<readonly [string, string]>;
|
|
12
|
-
parse: <T>(name: string, parser: (value: string) => T) => Either<EnvError, T>;
|
|
13
|
-
};
|
|
14
|
-
declare const Env: typeof EnvConstructor & typeof EnvCompanion;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { Env };
|
|
17
|
-
//# sourceMappingURL=Env.d.ts.map
|
|
1
|
+
import { t as Env } from "../Env-DAqDxz-w.js";
|
|
2
|
+
export { Env };
|
package/dist/env/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Env } from "
|
|
1
|
+
import { t as Env } from "../Env-DAqDxz-w.js";
|
|
2
2
|
export { Env };
|
package/dist/errors/errors.d.ts
CHANGED
|
@@ -1,40 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
readonly _tag: "EnvError";
|
|
4
|
-
readonly variable: string;
|
|
5
|
-
readonly message: string;
|
|
6
|
-
};
|
|
7
|
-
type PathError = {
|
|
8
|
-
readonly _tag: "PathError";
|
|
9
|
-
readonly path: string;
|
|
10
|
-
readonly reason: "unresolved_variable" | "invalid_path";
|
|
11
|
-
readonly message: string;
|
|
12
|
-
};
|
|
13
|
-
type FsError = {
|
|
14
|
-
readonly _tag: "FsError";
|
|
15
|
-
readonly path: string;
|
|
16
|
-
readonly operation: string;
|
|
17
|
-
readonly cause: Error;
|
|
18
|
-
readonly message: string;
|
|
19
|
-
};
|
|
20
|
-
type ConfigError = {
|
|
21
|
-
readonly _tag: "ConfigError";
|
|
22
|
-
readonly candidates: readonly string[];
|
|
23
|
-
readonly message: string;
|
|
24
|
-
};
|
|
25
|
-
type ProcessError = {
|
|
26
|
-
readonly _tag: "ProcessError";
|
|
27
|
-
readonly command: string;
|
|
28
|
-
readonly exitCode: number | null;
|
|
29
|
-
readonly stderr: string;
|
|
30
|
-
readonly message: string;
|
|
31
|
-
};
|
|
32
|
-
type OsError = EnvError | PathError | FsError | ConfigError | ProcessError;
|
|
33
|
-
declare const EnvError: (variable: string, message?: string) => EnvError;
|
|
34
|
-
declare const PathError: (path: string, reason: PathError["reason"], message?: string) => PathError;
|
|
35
|
-
declare const FsError: (path: string, operation: string, cause: Error) => FsError;
|
|
36
|
-
declare const ConfigError: (candidates: readonly string[], message?: string) => ConfigError;
|
|
37
|
-
declare const ProcessError: (command: string, exitCode: number | null, stderr: string, message?: string) => ProcessError;
|
|
38
|
-
//#endregion
|
|
39
|
-
export { ConfigError, EnvError, FsError, OsError, PathError, ProcessError };
|
|
40
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
1
|
+
import { a as PathError, i as OsError, n as EnvError, o as ProcessError, r as FsError, t as ConfigError } from "../errors-BPpbT6Dy.js";
|
|
2
|
+
export { ConfigError, EnvError, FsError, OsError, PathError, ProcessError };
|
package/dist/errors/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as PathError, i as OsError, n as EnvError, o as ProcessError, r as FsError, t as ConfigError } from "../errors-BPpbT6Dy.js";
|
|
2
2
|
export { ConfigError, EnvError, FsError, type OsError, PathError, ProcessError };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//#region src/errors/errors.d.ts
|
|
2
|
+
type EnvError = {
|
|
3
|
+
readonly _tag: "EnvError";
|
|
4
|
+
readonly variable: string;
|
|
5
|
+
readonly message: string;
|
|
6
|
+
};
|
|
7
|
+
type PathError = {
|
|
8
|
+
readonly _tag: "PathError";
|
|
9
|
+
readonly path: string;
|
|
10
|
+
readonly reason: "unresolved_variable" | "invalid_path";
|
|
11
|
+
readonly message: string;
|
|
12
|
+
};
|
|
13
|
+
type FsError = {
|
|
14
|
+
readonly _tag: "FsError";
|
|
15
|
+
readonly path: string;
|
|
16
|
+
readonly operation: string;
|
|
17
|
+
readonly cause: Error;
|
|
18
|
+
readonly message: string;
|
|
19
|
+
};
|
|
20
|
+
type ConfigError = {
|
|
21
|
+
readonly _tag: "ConfigError";
|
|
22
|
+
readonly candidates: readonly string[];
|
|
23
|
+
readonly message: string;
|
|
24
|
+
};
|
|
25
|
+
type ProcessError = {
|
|
26
|
+
readonly _tag: "ProcessError";
|
|
27
|
+
readonly command: string;
|
|
28
|
+
readonly exitCode: number | null;
|
|
29
|
+
readonly stderr: string;
|
|
30
|
+
readonly message: string;
|
|
31
|
+
};
|
|
32
|
+
type OsError = EnvError | PathError | FsError | ConfigError | ProcessError;
|
|
33
|
+
declare const EnvError: (variable: string, message?: string) => EnvError;
|
|
34
|
+
declare const PathError: (path: string, reason: PathError["reason"], message?: string) => PathError;
|
|
35
|
+
declare const FsError: (path: string, operation: string, cause: Error) => FsError;
|
|
36
|
+
declare const ConfigError: (candidates: readonly string[], message?: string) => ConfigError;
|
|
37
|
+
declare const ProcessError: (command: string, exitCode: number | null, stderr: string, message?: string) => ProcessError;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { PathError as a, OsError as i, EnvError as n, ProcessError as o, FsError as r, ConfigError as t };
|
|
40
|
+
//# sourceMappingURL=errors-BPpbT6Dy.d.ts.map
|
package/dist/fs/Fs.d.ts
CHANGED
|
@@ -1,44 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region src/fs/Fs.d.ts
|
|
5
|
-
type FileInfo = {
|
|
6
|
-
readonly size: number;
|
|
7
|
-
readonly isFile: boolean;
|
|
8
|
-
readonly isDirectory: boolean;
|
|
9
|
-
readonly isSymbolicLink: boolean;
|
|
10
|
-
readonly createdAt: Date;
|
|
11
|
-
readonly modifiedAt: Date;
|
|
12
|
-
readonly accessedAt: Date;
|
|
13
|
-
readonly permissions: number;
|
|
14
|
-
};
|
|
15
|
-
declare const Fs: {
|
|
16
|
-
exists: (p: string) => TaskResult<boolean>;
|
|
17
|
-
readFile: (p: string, encoding?: BufferEncoding) => TaskResult<string>;
|
|
18
|
-
readFileOpt: (p: string, encoding?: BufferEncoding) => TaskResult<Option<string>>;
|
|
19
|
-
stat: (p: string) => TaskResult<FileInfo>;
|
|
20
|
-
copyFile: (src: string, dest: string) => TaskResult<void>;
|
|
21
|
-
rename: (oldPath: string, newPath: string) => TaskResult<void>;
|
|
22
|
-
readdir: (p: string) => TaskResult<List<string>>;
|
|
23
|
-
glob: (dir: string, pattern: string) => TaskResult<List<string>>;
|
|
24
|
-
writeFile: (p: string, data: string, encoding?: BufferEncoding) => TaskResult<void>;
|
|
25
|
-
mkdir: (p: string, options?: {
|
|
26
|
-
recursive?: boolean;
|
|
27
|
-
}) => TaskResult<void>;
|
|
28
|
-
existsSync: (p: string) => boolean;
|
|
29
|
-
readFileSync: (p: string, encoding?: BufferEncoding) => Either<FsError, string>;
|
|
30
|
-
readFileOptSync: (p: string, encoding?: BufferEncoding) => Either<FsError, Option<string>>;
|
|
31
|
-
statSync: (p: string) => Either<FsError, FileInfo>;
|
|
32
|
-
copyFileSync: (src: string, dest: string) => Either<FsError, void>;
|
|
33
|
-
renameSync: (oldPath: string, newPath: string) => Either<FsError, void>;
|
|
34
|
-
readdirSync: (p: string) => Either<FsError, List<string>>;
|
|
35
|
-
writeFileSync: (p: string, data: string, encoding?: BufferEncoding) => Either<FsError, void>;
|
|
36
|
-
mkdirSync: (p: string, options?: {
|
|
37
|
-
recursive?: boolean;
|
|
38
|
-
}) => Either<FsError, void>;
|
|
39
|
-
unlink: (p: string) => TaskResult<void>;
|
|
40
|
-
unlinkSync: (p: string) => Either<FsError, void>;
|
|
41
|
-
};
|
|
42
|
-
//#endregion
|
|
43
|
-
export { FileInfo, Fs };
|
|
44
|
-
//# sourceMappingURL=Fs.d.ts.map
|
|
1
|
+
import { n as Fs, t as FileInfo } from "../Fs-DOShlUR7.js";
|
|
2
|
+
export { FileInfo, Fs };
|
package/dist/fs/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as Fs, t as FileInfo } from "../Fs-DOShlUR7.js";
|
|
2
2
|
export { type FileInfo, Fs };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ConfigResolver } from "./
|
|
3
|
-
import { Env } from "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { a as PathError, i as OsError, n as EnvError, o as ProcessError, r as FsError, t as ConfigError } from "./errors-BPpbT6Dy.js";
|
|
2
|
+
import { t as ConfigResolver } from "./ConfigResolver-DZ1820lj.js";
|
|
3
|
+
import { t as Env } from "./Env-DAqDxz-w.js";
|
|
4
|
+
import { n as Fs, t as FileInfo } from "./Fs-DOShlUR7.js";
|
|
5
|
+
import { i as expandVars, n as expandPath, r as expandTilde, t as Path } from "./PathExpander-DTM74lhP.js";
|
|
6
|
+
import { i as UserInfo, n as CloudStorageDir, r as Platform, t as CloudProvider } from "./Platform-CDBRIHxS.js";
|
|
7
|
+
import { n as Process, t as ExecResult } from "./Process-CogfDqGc.js";
|
|
8
8
|
export { type CloudProvider, type CloudStorageDir, ConfigError, ConfigResolver, Env, EnvError, type ExecResult, type FileInfo, Fs, FsError, type OsError, Path, PathError, Platform, Process, ProcessError, type UserInfo, expandPath, expandTilde, expandVars };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ConfigError as e,EnvError as t,FsError as n,PathError as r,ProcessError as i}from"./errors/errors.js";import{Fs as a}from"./fs/Fs.js";import{Path as o,expandPath as s,expandTilde as c,expandVars as l}from"./path/PathExpander.js";import{ConfigResolver as u}from"./config/ConfigResolver.js";import"./config/index.js";import{Env as d}from"./env/Env.js";import"./env/index.js";import"./fs/index.js";import"./path/index.js";import{Platform as f}from"./platform/Platform.js";import"./platform/index.js";import{Process as p}from"./process/Process.js";import"./process/index.js";export{e as ConfigError,u as ConfigResolver,d as Env,t as EnvError,a as Fs,n as FsError,o as Path,r as PathError,f as Platform,p as Process,i as ProcessError,s as expandPath,c as expandTilde,l as expandVars};
|
|
1
|
+
import{ConfigError as e,EnvError as t,FsError as n,PathError as r,ProcessError as i}from"./errors/errors.js";import{Fs as a}from"./fs/Fs.js";import{Path as o,expandPath as s,expandTilde as c,expandVars as l}from"./path/PathExpander.js";import{ConfigResolver as u}from"./config/ConfigResolver.js";import"./config/index.js";import{Env as d}from"./env/Env.js";import"./env/index.js";import"./errors/index.js";import"./fs/index.js";import"./path/index.js";import{Platform as f}from"./platform/Platform.js";import"./platform/index.js";import{Process as p}from"./process/Process.js";import"./process/index.js";export{e as ConfigError,u as ConfigResolver,d as Env,t as EnvError,a as Fs,n as FsError,o as Path,r as PathError,f as Platform,p as Process,i as ProcessError,s as expandPath,c as expandTilde,l as expandVars};
|
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region src/path/PathExpander.d.ts
|
|
5
|
-
declare const expandTilde: (p: string) => string;
|
|
6
|
-
declare const expandVars: (p: string) => Either<PathError, string>;
|
|
7
|
-
declare const expandPath: (p: string) => Either<PathError, string>;
|
|
8
|
-
declare const Path: {
|
|
9
|
-
expand: (p: string) => Either<PathError, string>;
|
|
10
|
-
expandTilde: (p: string) => string;
|
|
11
|
-
expandVars: (p: string) => Either<PathError, string>;
|
|
12
|
-
join: (...segments: string[]) => string;
|
|
13
|
-
resolve: (...segments: string[]) => string;
|
|
14
|
-
dirname: (p: string) => string;
|
|
15
|
-
basename: (p: string, suffix?: string) => string;
|
|
16
|
-
extname: (p: string) => string;
|
|
17
|
-
isAbsolute: (p: string) => boolean;
|
|
18
|
-
};
|
|
19
|
-
//#endregion
|
|
20
|
-
export { Path, expandPath, expandTilde, expandVars };
|
|
21
|
-
//# sourceMappingURL=PathExpander.d.ts.map
|
|
1
|
+
import { i as expandVars, n as expandPath, r as expandTilde, t as Path } from "../PathExpander-DTM74lhP.js";
|
|
2
|
+
export { Path, expandPath, expandTilde, expandVars };
|
package/dist/path/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as expandVars, n as expandPath, r as expandTilde, t as Path } from "../PathExpander-DTM74lhP.js";
|
|
2
2
|
export { Path, expandPath, expandTilde, expandVars };
|
|
@@ -1,40 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/platform/Platform.d.ts
|
|
4
|
-
type UserInfo = {
|
|
5
|
-
readonly username: string;
|
|
6
|
-
readonly uid: number;
|
|
7
|
-
readonly gid: number;
|
|
8
|
-
readonly shell: string | null;
|
|
9
|
-
readonly homedir: string;
|
|
10
|
-
};
|
|
11
|
-
type CloudProvider = "onedrive" | "gdrive" | "dropbox" | "icloud";
|
|
12
|
-
type CloudStorageDir = {
|
|
13
|
-
readonly provider: CloudProvider;
|
|
14
|
-
readonly path: string;
|
|
15
|
-
readonly label: string;
|
|
16
|
-
};
|
|
17
|
-
declare const Platform: {
|
|
18
|
-
os: () => "darwin" | "linux" | "win32" | string;
|
|
19
|
-
arch: () => string;
|
|
20
|
-
homeDir: () => string;
|
|
21
|
-
tmpDir: () => string;
|
|
22
|
-
hostname: () => string;
|
|
23
|
-
eol: () => string;
|
|
24
|
-
pathSep: () => string;
|
|
25
|
-
isWindows: () => boolean;
|
|
26
|
-
isMac: () => boolean;
|
|
27
|
-
isLinux: () => boolean;
|
|
28
|
-
userInfo: () => Option<UserInfo>;
|
|
29
|
-
isDocker: () => boolean;
|
|
30
|
-
isKubernetes: () => boolean;
|
|
31
|
-
isWSL: () => boolean;
|
|
32
|
-
isCI: () => boolean;
|
|
33
|
-
isContainer: () => boolean;
|
|
34
|
-
windowsHomeDir: () => Option<string>;
|
|
35
|
-
homeDirs: () => List<string>;
|
|
36
|
-
cloudStorageDirs: (home?: string) => List<CloudStorageDir>;
|
|
37
|
-
};
|
|
38
|
-
//#endregion
|
|
39
|
-
export { CloudProvider, CloudStorageDir, Platform, UserInfo };
|
|
40
|
-
//# sourceMappingURL=Platform.d.ts.map
|
|
1
|
+
import { i as UserInfo, n as CloudStorageDir, r as Platform, t as CloudProvider } from "../Platform-CDBRIHxS.js";
|
|
2
|
+
export { CloudProvider, CloudStorageDir, Platform, UserInfo };
|
package/dist/platform/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as UserInfo, n as CloudStorageDir, r as Platform, t as CloudProvider } from "../Platform-CDBRIHxS.js";
|
|
2
2
|
export { type CloudProvider, type CloudStorageDir, Platform, type UserInfo };
|
|
@@ -1,22 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region src/process/Process.d.ts
|
|
5
|
-
type ExecResult = {
|
|
6
|
-
readonly stdout: string;
|
|
7
|
-
readonly stderr: string;
|
|
8
|
-
readonly exitCode: number;
|
|
9
|
-
};
|
|
10
|
-
declare const Process: {
|
|
11
|
-
exec: (command: string, options?: {
|
|
12
|
-
timeout?: number;
|
|
13
|
-
cwd?: string;
|
|
14
|
-
}) => TaskResult<ExecResult>;
|
|
15
|
-
execSync: (command: string, options?: {
|
|
16
|
-
timeout?: number;
|
|
17
|
-
cwd?: string;
|
|
18
|
-
}) => Either<ProcessError, ExecResult>;
|
|
19
|
-
};
|
|
20
|
-
//#endregion
|
|
21
|
-
export { ExecResult, Process };
|
|
22
|
-
//# sourceMappingURL=Process.d.ts.map
|
|
1
|
+
import { n as Process, t as ExecResult } from "../Process-CogfDqGc.js";
|
|
2
|
+
export { ExecResult, Process };
|
package/dist/process/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as Process, t as ExecResult } from "../Process-CogfDqGc.js";
|
|
2
2
|
export { type ExecResult, Process };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "functype-os",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.60.0",
|
|
4
4
|
"description": "Functional OS utilities using functype data structures — env vars, path expansion, file ops, platform detection",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"functype",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"prepublishOnly": "pnpm validate"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"functype": ">=0.
|
|
36
|
+
"functype": ">=0.54.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/node": "^24.12.
|
|
39
|
+
"@types/node": "^24.12.2",
|
|
40
40
|
"eslint-config-prettier": "^10.1.8",
|
|
41
|
-
"functype": "^0.
|
|
42
|
-
"ts-builds": "^2.
|
|
43
|
-
"tsdown": "^0.
|
|
44
|
-
"vitest": "^4.1.
|
|
41
|
+
"functype": "^0.60.0",
|
|
42
|
+
"ts-builds": "^2.7.0",
|
|
43
|
+
"tsdown": "^0.21.9",
|
|
44
|
+
"vitest": "^4.1.4"
|
|
45
45
|
},
|
|
46
46
|
"type": "module",
|
|
47
47
|
"main": "./dist/index.js",
|