1 |
|
2 | import { Arch } from "builder-util";
|
3 | import { ClientRequest } from "http";
|
4 | import { HttpPublisher, PublishContext } from "electron-publish";
|
5 | import { KeygenOptions } from "builder-util-runtime/out/publishOptions";
|
6 | export interface KeygenError {
|
7 | title: string;
|
8 | detail: string;
|
9 | code: string;
|
10 | }
|
11 | export interface KeygenRelease {
|
12 | id: string;
|
13 | type: "releases";
|
14 | attributes: {
|
15 | name: string | null;
|
16 | description: string | null;
|
17 | channel: "stable" | "rc" | "beta" | "alpha" | "dev";
|
18 | status: "DRAFT" | "PUBLISHED" | "YANKED";
|
19 | tag: string;
|
20 | version: string;
|
21 | semver: {
|
22 | major: number;
|
23 | minor: number;
|
24 | patch: number;
|
25 | prerelease: string | null;
|
26 | build: string | null;
|
27 | };
|
28 | metadata: {
|
29 | [s: string]: any;
|
30 | };
|
31 | created: string;
|
32 | updated: string;
|
33 | yanked: string | null;
|
34 | };
|
35 | relationships: {
|
36 | account: {
|
37 | data: {
|
38 | type: "accounts";
|
39 | id: string;
|
40 | };
|
41 | };
|
42 | product: {
|
43 | data: {
|
44 | type: "products";
|
45 | id: string;
|
46 | };
|
47 | };
|
48 | };
|
49 | }
|
50 | export interface KeygenArtifact {
|
51 | id: string;
|
52 | type: "artifacts";
|
53 | attributes: {
|
54 | filename: string;
|
55 | filetype: string | null;
|
56 | filesize: number | null;
|
57 | platform: string | null;
|
58 | arch: string | null;
|
59 | signature: string | null;
|
60 | checksum: string | null;
|
61 | status: "WAITING" | "UPLOADED" | "FAILED" | "YANKED";
|
62 | metadata: {
|
63 | [s: string]: any;
|
64 | };
|
65 | created: string;
|
66 | updated: string;
|
67 | };
|
68 | relationships: {
|
69 | account: {
|
70 | data: {
|
71 | type: "accounts";
|
72 | id: string;
|
73 | };
|
74 | };
|
75 | release: {
|
76 | data: {
|
77 | type: "releases";
|
78 | id: string;
|
79 | };
|
80 | };
|
81 | };
|
82 | links: {
|
83 | redirect: string;
|
84 | };
|
85 | }
|
86 | export declare class KeygenPublisher extends HttpPublisher {
|
87 | readonly providerName = "keygen";
|
88 | readonly hostname = "api.keygen.sh";
|
89 | private readonly info;
|
90 | private readonly auth;
|
91 | private readonly version;
|
92 | private readonly basePath;
|
93 | constructor(context: PublishContext, info: KeygenOptions, version: string);
|
94 | protected doUpload(fileName: string, _arch: Arch, dataLength: number, requestProcessor: (request: ClientRequest, reject: (error: Error) => void) => void, _file: string): Promise<string>;
|
95 | private uploadArtifact;
|
96 | private createArtifact;
|
97 | private getOrCreateRelease;
|
98 | private getRelease;
|
99 | private createRelease;
|
100 | deleteRelease(releaseId: string): Promise<void>;
|
101 | toString(): string;
|
102 | }
|