Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/src/publish/types.ts
6446 views
1
/*
2
* types.ts
3
*
4
* Copyright (C) 2020-2022 Posit Software, PBC
5
*/
6
7
import { ProjectContext } from "../project/types.ts";
8
9
export class ApiError extends Error {
10
public constructor(
11
public readonly status: number,
12
public readonly statusText: string,
13
public readonly description: string | undefined = undefined,
14
) {
15
let message = `API Error: ${status} - ${statusText}`;
16
if (description) {
17
message = `${message} (${description})`;
18
}
19
super(message);
20
}
21
}
22
23
export type PublishDeployments = {
24
dir: string;
25
source: string;
26
records: Record<string, Array<PublishRecord>>;
27
};
28
29
export type PublishRecord = {
30
id: string;
31
url?: string;
32
code?: boolean;
33
};
34
35
export type PublishOptions = {
36
input: ProjectContext | string;
37
server?: string | null;
38
token?: string;
39
id?: string;
40
render: boolean;
41
prompt: boolean;
42
browser: boolean;
43
};
44
45