本文整理汇总了TypeScript中builder-util.executeAppBuilder函数的典型用法代码示例。如果您正苦于以下问题:TypeScript executeAppBuilder函数的具体用法?TypeScript executeAppBuilder怎么用?TypeScript executeAppBuilder使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了executeAppBuilder函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: download
export function download(url: string, output: string, checksum?: string | null): Promise<void> {
const args = ["download", "--url", url, "--output", output]
if (checksum != null) {
args.push("--sha512", checksum)
}
return executeAppBuilder(args) as Promise<any>
}
示例2: download
download(url: string, destination: string, options: DownloadOptions): Promise<string> {
const args = ["download", "--url", url, "--output", destination]
if (options != null && options.sha512) {
args.push("--sha512", options.sha512)
}
return executeAppBuilder(args)
.then(() => destination)
}
示例3: doGetBin
function doGetBin(name: string, url: string | undefined | null, checksum: string | null | undefined): Promise<string> {
const args = ["download-artifact", "--name", name]
if (url != null) {
args.push("--url", url)
}
if (checksum != null) {
args.push("--sha512", checksum)
}
return executeAppBuilder(args)
}
示例4: executeAppBuilder
export function executeAppBuilderAsJson<T>(args: Array<string>): Promise<T> {
return executeAppBuilder(args)
.then(rawResult => {
try {
return JSON.parse(rawResult) as T
}
catch (e) {
throw new Error(`Cannot parse result: ${e.message}: "${rawResult}"`)
}
})
}
示例5: executeAppBuilder
return await cancellationToken.createPromise((resolve, reject, onCancel) => {
executeAppBuilder(args, process => {
onCancel(() => {
process.kill("SIGINT")
})
})
.then(() => {
try {
log.debug({provider: this.providerName, file: fileName, bucket: this.getBucketName()}, "uploaded")
}
finally {
resolve()
}
})
.catch(reject)
})
示例6: execWine
export function execWine(file: string, file64: string | null = null, appArgs: Array<string> = [], options: ExecFileOptions = {}): Promise<string> {
if (process.platform === "win32") {
if (options.timeout == null) {
// 2 minutes
options.timeout = 120 * 1000
}
return exec(file, appArgs, options)
}
const commandArgs = [
"wine",
"--ia32", file,
]
if (file64 != null) {
commandArgs.push("--x64", file64)
}
if (appArgs.length > 0) {
commandArgs.push("--args", JSON.stringify(appArgs))
}
return executeAppBuilder(commandArgs, undefined, options)
}