-
Notifications
You must be signed in to change notification settings - Fork 12
/
mod.ts
77 lines (68 loc) · 2.23 KB
/
mod.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import "./src/utils/misc.ts"
import { flatmap, validate } from "./src/utils/misc.ts"
import host, { SupportedArchitecture, SupportedPlatform } from "./src/utils/host.ts"
import SemVer, * as semver from "./src/utils/semver.ts"
import Path from "./src/utils/Path.ts"
export * as types from "./src/types.ts"
import * as pkg from "./src/utils/pkg.ts"
import { panic, PkgxError } from "./src/utils/error.ts"
import useConfig from "./src/hooks/useConfig.ts"
import useOffLicense from "./src/hooks/useOffLicense.ts"
import useCache from "./src/hooks/useCache.ts"
import useCellar, { InstallationNotFoundError} from "./src/hooks/useCellar.ts"
import useMoustaches from "./src/hooks/useMoustaches.ts"
import usePantry, { PantryError, PantryParseError, PantryNotFoundError, PackageNotFoundError } from "./src/hooks/usePantry.ts"
import useFetch from "./src/hooks/useFetch.ts"
import useDownload, { DownloadError } from "./src/hooks/useDownload.ts"
import useShellEnv from "./src/hooks/useShellEnv.ts"
import useInventory from "./src/hooks/useInventory.ts"
import hydrate from "./src/plumbing/hydrate.ts"
import which from "./src/plumbing/which.ts"
import link from "./src/plumbing/link.ts"
import install, { ConsoleLogger } from "./src/plumbing/install.ts"
import resolve, { ResolveError } from "./src/plumbing/resolve.ts"
import useSync from "./src/hooks/useSync.ts"
import run, { RunError } from "./src/porcelain/run.ts"
import porcelain_install from "./src/porcelain/install.ts"
const utils = {
pkg, host, flatmap, validate, panic, ConsoleLogger
}
const hooks = {
useCache,
useCellar,
useConfig,
useDownload,
useFetch,
useInventory,
useMoustaches,
useOffLicense,
usePantry,
useShellEnv,
useSync,
}
const plumbing = {
hydrate,
link,
install,
resolve,
which
}
const porcelain = {
install: porcelain_install,
run
}
export {
utils, hooks, plumbing, porcelain,
semver,
PkgxError,
RunError,
ResolveError,
PantryError, PantryParseError, PantryNotFoundError, PackageNotFoundError,
InstallationNotFoundError,
DownloadError
}
/// export types
// we cannot add these to the above objects or they cannot be used as types
export { Path, SemVer }
export * from "./src/types.ts"
export type { SupportedArchitecture, SupportedPlatform }