-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
index.ts
58 lines (55 loc) · 1.48 KB
/
index.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
export { CancellationToken, CancellationError } from "./CancellationToken"
export {
HttpError,
createHttpError,
HttpExecutor,
DownloadOptions,
DigestTransform,
RequestHeaders,
safeGetHeader,
configureRequestOptions,
configureRequestOptionsFromUrl,
safeStringifyJson,
parseJson,
configureRequestUrl,
} from "./httpExecutor"
export {
BintrayOptions,
CustomPublishOptions,
GenericServerOptions,
GithubOptions,
KeygenOptions,
SnapStoreOptions,
PublishConfiguration,
S3Options,
SpacesOptions,
BaseS3Options,
getS3LikeProviderBaseUrl,
githubUrl,
PublishProvider,
AllPublishOptions,
} from "./publishOptions"
export { UpdateInfo, UpdateFileInfo, WindowsUpdateInfo, BlockMapDataHolder, PackageFileInfo, ReleaseNoteInfo } from "./updateInfo"
export { parseDn } from "./rfc2253Parser"
export { UUID } from "./uuid"
export { ProgressCallbackTransform, ProgressInfo } from "./ProgressCallbackTransform"
export { parseXml, XElement } from "./xml"
export { BlockMap } from "./blockMapApi"
// nsis
export const CURRENT_APP_INSTALLER_FILE_NAME = "installer.exe"
// nsis-web
export const CURRENT_APP_PACKAGE_FILE_NAME = "package.7z"
export function asArray<T>(v: null | undefined | T | Array<T>): Array<T> {
if (v == null) {
return []
} else if (Array.isArray(v)) {
return v
} else {
return [v]
}
}
export function newError(message: string, code: string) {
const error = new Error(message)
;(error as NodeJS.ErrnoException).code = code
return error
}