Skip to content

Commit d9d13bd

Browse files
authored
Add restart dialog (#32)
1 parent 31ca1f1 commit d9d13bd

File tree

9 files changed

+3606
-25
lines changed

9 files changed

+3606
-25
lines changed

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@
163163
"webpack-cli": "^4.7.2"
164164
},
165165
"dependencies": {
166-
"@bufbuild/connect-web": "^0.2.1",
166+
"@bufbuild/connect-node": "^0.7.0",
167167
"@gitpod/gitpod-protocol": "main",
168168
"@gitpod/local-app-api-grpcweb": "main",
169-
"@gitpod/public-api": "main",
169+
"@gitpod/public-api": "^0.1.5-main.6530",
170170
"@improbable-eng/grpc-web-node-http-transport": "^0.14.0",
171171
"analytics-node": "^6.2.0",
172172
"configcat-node": "^8.0.0",
@@ -178,6 +178,9 @@
178178
"ssh2": "^1.10.0",
179179
"tmp": "^0.2.1",
180180
"uuid": "8.1.0",
181-
"yazl": "^2.5.1"
181+
"yazl": "^2.5.1",
182+
"@grpc/grpc-js": "^1.8.8",
183+
"long":"^5.2.1",
184+
"protobufjs": "^7.2.2"
182185
}
183186
}
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
/**
2+
* Copyright (c) 2023 Gitpod GmbH. All rights reserved.
3+
* Licensed under the GNU Affero General Public License (AGPL).
4+
* See License.AGPL.txt in the project root for license information.
5+
*/
6+
7+
/* eslint-disable */
8+
import _m0 from "protobufjs/minimal.js";
9+
10+
export const protobufPackage = "gitpod.experimental.v1";
11+
12+
export interface Pagination {
13+
/**
14+
* Page size is the maximum number of results to retrieve per page.
15+
* Defaults to 25. Maximum 100.
16+
*/
17+
pageSize: number;
18+
/**
19+
* Page is the page number of results to retrieve.
20+
* The first page starts at 1.
21+
* Defaults to 1.
22+
*/
23+
page: number;
24+
}
25+
26+
function createBasePagination(): Pagination {
27+
return { pageSize: 0, page: 0 };
28+
}
29+
30+
export const Pagination = {
31+
encode(message: Pagination, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
32+
if (message.pageSize !== 0) {
33+
writer.uint32(8).int32(message.pageSize);
34+
}
35+
if (message.page !== 0) {
36+
writer.uint32(16).int32(message.page);
37+
}
38+
return writer;
39+
},
40+
41+
decode(input: _m0.Reader | Uint8Array, length?: number): Pagination {
42+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
43+
let end = length === undefined ? reader.len : reader.pos + length;
44+
const message = createBasePagination();
45+
while (reader.pos < end) {
46+
const tag = reader.uint32();
47+
switch (tag >>> 3) {
48+
case 1:
49+
message.pageSize = reader.int32();
50+
break;
51+
case 2:
52+
message.page = reader.int32();
53+
break;
54+
default:
55+
reader.skipType(tag & 7);
56+
break;
57+
}
58+
}
59+
return message;
60+
},
61+
62+
fromJSON(object: any): Pagination {
63+
return {
64+
pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
65+
page: isSet(object.page) ? Number(object.page) : 0,
66+
};
67+
},
68+
69+
toJSON(message: Pagination): unknown {
70+
const obj: any = {};
71+
message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
72+
message.page !== undefined && (obj.page = Math.round(message.page));
73+
return obj;
74+
},
75+
76+
fromPartial<I extends Exact<DeepPartial<Pagination>, I>>(object: I): Pagination {
77+
const message = createBasePagination();
78+
message.pageSize = object.pageSize ?? 0;
79+
message.page = object.page ?? 0;
80+
return message;
81+
},
82+
};
83+
84+
export interface DataLoaderOptions {
85+
cache?: boolean;
86+
}
87+
88+
export interface DataLoaders {
89+
rpcDataLoaderOptions?: DataLoaderOptions;
90+
getDataLoader<T>(identifier: string, constructorFn: () => T): T;
91+
}
92+
93+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
94+
95+
export type DeepPartial<T> = T extends Builtin ? T
96+
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
97+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
98+
: Partial<T>;
99+
100+
type KeysOfUnion<T> = T extends T ? keyof T : never;
101+
export type Exact<P, I extends P> = P extends Builtin ? P
102+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
103+
104+
function isSet(value: any): boolean {
105+
return value !== null && value !== undefined;
106+
}

0 commit comments

Comments
 (0)