15815213711
2024-08-26 67b8b6731811983447e053d4396b3708c14dfe3c
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/// <reference types="node" />
import { Arch } from "builder-util";
import { ClientRequest } from "http";
import { HttpPublisher, PublishContext } from "electron-publish";
import { KeygenOptions } from "builder-util-runtime/out/publishOptions";
export interface KeygenError {
    title: string;
    detail: string;
    code: string;
}
export interface KeygenRelease {
    id: string;
    type: "releases";
    attributes: {
        name: string | null;
        description: string | null;
        channel: "stable" | "rc" | "beta" | "alpha" | "dev";
        status: "DRAFT" | "PUBLISHED" | "YANKED";
        tag: string;
        version: string;
        semver: {
            major: number;
            minor: number;
            patch: number;
            prerelease: string | null;
            build: string | null;
        };
        metadata: {
            [s: string]: any;
        };
        created: string;
        updated: string;
        yanked: string | null;
    };
    relationships: {
        account: {
            data: {
                type: "accounts";
                id: string;
            };
        };
        product: {
            data: {
                type: "products";
                id: string;
            };
        };
    };
}
export interface KeygenArtifact {
    id: string;
    type: "artifacts";
    attributes: {
        filename: string;
        filetype: string | null;
        filesize: number | null;
        platform: string | null;
        arch: string | null;
        signature: string | null;
        checksum: string | null;
        status: "WAITING" | "UPLOADED" | "FAILED" | "YANKED";
        metadata: {
            [s: string]: any;
        };
        created: string;
        updated: string;
    };
    relationships: {
        account: {
            data: {
                type: "accounts";
                id: string;
            };
        };
        release: {
            data: {
                type: "releases";
                id: string;
            };
        };
    };
    links: {
        redirect: string;
    };
}
export declare class KeygenPublisher extends HttpPublisher {
    readonly providerName = "keygen";
    readonly hostname = "api.keygen.sh";
    private readonly info;
    private readonly auth;
    private readonly version;
    private readonly basePath;
    constructor(context: PublishContext, info: KeygenOptions, version: string);
    protected doUpload(fileName: string, _arch: Arch, dataLength: number, requestProcessor: (request: ClientRequest, reject: (error: Error) => void) => void, _file: string): Promise<string>;
    private uploadArtifact;
    private createArtifact;
    private getOrCreateRelease;
    private getRelease;
    private createRelease;
    deleteRelease(releaseId: string): Promise<void>;
    toString(): string;
}