@gitpod/gitpod-protocol 0.1.5-mp-pat-server-impl.0 → 0.1.5-mp-server-move-admin-endpoints-to-admin-srv.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/admin-protocol.d.ts +4 -1
- package/lib/admin-protocol.d.ts.map +1 -1
- package/lib/admin-protocol.js.map +1 -1
- package/lib/context-url.d.ts +0 -1
- package/lib/context-url.d.ts.map +1 -1
- package/lib/context-url.js +0 -2
- package/lib/context-url.js.map +1 -1
- package/lib/context-url.spec.d.ts +0 -2
- package/lib/context-url.spec.d.ts.map +1 -1
- package/lib/context-url.spec.js +0 -28
- package/lib/context-url.spec.js.map +1 -1
- package/lib/gitpod-service.d.ts +0 -4
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js.map +1 -1
- package/lib/messaging/browser/connection.d.ts +1 -2
- package/lib/messaging/browser/connection.d.ts.map +1 -1
- package/lib/messaging/browser/connection.js +3 -3
- package/lib/messaging/browser/connection.js.map +1 -1
- package/lib/messaging/error.d.ts +1 -0
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +2 -0
- package/lib/messaging/error.js.map +1 -1
- package/lib/protocol.d.ts +1 -12
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +1 -5
- package/lib/protocol.js.map +1 -1
- package/lib/teams-projects-protocol.d.ts +0 -1
- package/lib/teams-projects-protocol.d.ts.map +1 -1
- package/lib/teams-projects-protocol.js.map +1 -1
- package/lib/workspace-class.d.ts +1 -1
- package/lib/workspace-class.d.ts.map +1 -1
- package/lib/wsready.d.ts +6 -0
- package/lib/wsready.d.ts.map +1 -1
- package/lib/wsready.js +1 -1
- package/package.json +1 -1
- package/pkg-yarn.lock +1 -1
- package/provenance-bundle.jsonl +1 -1
- package/src/admin-protocol.ts +6 -1
- package/src/context-url.spec.ts +0 -18
- package/src/context-url.ts +0 -2
- package/src/gitpod-service.ts +0 -6
- package/src/messaging/browser/connection.ts +3 -4
- package/src/messaging/error.ts +3 -0
- package/src/protocol.ts +2 -18
- package/src/teams-projects-protocol.ts +0 -1
- package/src/workspace-class.ts +1 -1
- package/src/wsready.ts +8 -1
package/src/context-url.spec.ts
CHANGED
|
@@ -41,24 +41,6 @@ export class ContextUrlTest {
|
|
|
41
41
|
expect(actual?.pathname).to.equal("/gitpod-io/gitpod-test-repo.git");
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
@test public parseContextUrl_withPrebuild() {
|
|
45
|
-
const actual = ContextURL.getNormalizedURL({
|
|
46
|
-
contextURL: "prebuild/https://github.com/gitpod-io/gitpod-test-repo",
|
|
47
|
-
context: {},
|
|
48
|
-
} as WsContextUrl);
|
|
49
|
-
expect(actual?.host).to.equal("github.com");
|
|
50
|
-
expect(actual?.pathname).to.equal("/gitpod-io/gitpod-test-repo");
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
@test public parseContextUrl_withPrebuild_withoutSchema() {
|
|
54
|
-
const actual = ContextURL.getNormalizedURL({
|
|
55
|
-
contextURL: "prebuild/github.com/gitpod-io/gitpod-test-repo",
|
|
56
|
-
context: {},
|
|
57
|
-
} as WsContextUrl);
|
|
58
|
-
expect(actual?.host).to.equal("github.com");
|
|
59
|
-
expect(actual?.pathname).to.equal("/gitpod-io/gitpod-test-repo");
|
|
60
|
-
}
|
|
61
|
-
|
|
62
44
|
@test public parseContextUrl_badUrl() {
|
|
63
45
|
const actual = ContextURL.getNormalizedURL({ contextURL: "[Object object]", context: {} } as WsContextUrl);
|
|
64
46
|
expect(actual).to.be.undefined;
|
package/src/context-url.ts
CHANGED
|
@@ -15,7 +15,6 @@ import { Workspace } from ".";
|
|
|
15
15
|
* TODO(gpl) See if we can get this into `server` code to remove the burden from clients
|
|
16
16
|
*/
|
|
17
17
|
export namespace ContextURL {
|
|
18
|
-
export const INCREMENTAL_PREBUILD_PREFIX = "incremental-prebuild";
|
|
19
18
|
export const PREBUILD_PREFIX = "prebuild";
|
|
20
19
|
export const IMAGEBUILD_PREFIX = "imagebuild";
|
|
21
20
|
export const SNAPSHOT_PREFIX = "snapshot";
|
|
@@ -91,7 +90,6 @@ export namespace ContextURL {
|
|
|
91
90
|
const firstSegment = segments[0];
|
|
92
91
|
if (
|
|
93
92
|
firstSegment === PREBUILD_PREFIX ||
|
|
94
|
-
firstSegment === INCREMENTAL_PREBUILD_PREFIX ||
|
|
95
93
|
firstSegment === IMAGEBUILD_PREFIX ||
|
|
96
94
|
firstSegment === SNAPSHOT_PREFIX ||
|
|
97
95
|
firstSegment.startsWith(REFERRER_PREFIX)
|
package/src/gitpod-service.ts
CHANGED
|
@@ -58,7 +58,6 @@ import {
|
|
|
58
58
|
} from "./team-subscription-protocol";
|
|
59
59
|
import { RemotePageMessage, RemoteTrackMessage, RemoteIdentifyMessage } from "./analytics";
|
|
60
60
|
import { IDEServer } from "./ide-protocol";
|
|
61
|
-
import { InstallationAdminSettings, TelemetryData } from "./installation-admin-protocol";
|
|
62
61
|
import { ListUsageRequest, ListUsageResponse, CostCenterJSON } from "./usage";
|
|
63
62
|
import { SupportedWorkspaceClass } from "./workspace-class";
|
|
64
63
|
import { BillingMode } from "./billing-mode";
|
|
@@ -175,11 +174,6 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
|
|
|
175
174
|
resetGenericInvite(inviteId: string): Promise<TeamMembershipInvite>;
|
|
176
175
|
deleteTeam(teamId: string): Promise<void>;
|
|
177
176
|
|
|
178
|
-
// Admin Settings
|
|
179
|
-
adminGetSettings(): Promise<InstallationAdminSettings>;
|
|
180
|
-
adminUpdateSettings(settings: InstallationAdminSettings): Promise<void>;
|
|
181
|
-
adminGetTelemetryData(): Promise<TelemetryData>;
|
|
182
|
-
|
|
183
177
|
// Projects
|
|
184
178
|
getProviderRepositoriesForUser(params: GetProviderRepositoriesParams): Promise<ProviderRepository[]>;
|
|
185
179
|
createProject(params: CreateProjectParams): Promise<Project>;
|
|
@@ -16,7 +16,6 @@ import ReconnectingWebSocket, { Event } from "reconnecting-websocket";
|
|
|
16
16
|
export interface WebSocketOptions {
|
|
17
17
|
onerror?: (event: Event) => void;
|
|
18
18
|
onListening?: (socket: ReconnectingWebSocket) => void;
|
|
19
|
-
subProtocol?: string;
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
export class WebSocketConnectionProvider {
|
|
@@ -63,7 +62,7 @@ export class WebSocketConnectionProvider {
|
|
|
63
62
|
*/
|
|
64
63
|
listen(handler: ConnectionHandler, eventHandler: ConnectionEventHandler, options?: WebSocketOptions): WebSocket {
|
|
65
64
|
const url = handler.path;
|
|
66
|
-
const webSocket = this.createWebSocket(url
|
|
65
|
+
const webSocket = this.createWebSocket(url);
|
|
67
66
|
|
|
68
67
|
const logger = this.createLogger();
|
|
69
68
|
if (options && options.onerror) {
|
|
@@ -87,8 +86,8 @@ export class WebSocketConnectionProvider {
|
|
|
87
86
|
/**
|
|
88
87
|
* Creates a web socket for the given url
|
|
89
88
|
*/
|
|
90
|
-
createWebSocket(url: string
|
|
91
|
-
return new ReconnectingWebSocket(url,
|
|
89
|
+
createWebSocket(url: string): WebSocket {
|
|
90
|
+
return new ReconnectingWebSocket(url, undefined, {
|
|
92
91
|
maxReconnectionDelay: 10000,
|
|
93
92
|
minReconnectionDelay: 1000,
|
|
94
93
|
reconnectionDelayGrowFactor: 1.3,
|
package/src/messaging/error.ts
CHANGED
|
@@ -35,6 +35,9 @@ export namespace ErrorCodes {
|
|
|
35
35
|
// 430 Repository not whitelisted (custom status code)
|
|
36
36
|
export const REPOSITORY_NOT_WHITELISTED = 430;
|
|
37
37
|
|
|
38
|
+
// 440 Prebuilds now always require a project (custom status code)
|
|
39
|
+
export const PROJECT_REQUIRED = 440;
|
|
40
|
+
|
|
38
41
|
// 450 Payment error
|
|
39
42
|
export const PAYMENT_ERROR = 450;
|
|
40
43
|
|
package/src/protocol.ts
CHANGED
|
@@ -293,17 +293,13 @@ export type BillingTier = "paid" | "free";
|
|
|
293
293
|
*/
|
|
294
294
|
export const WorkspaceFeatureFlags = {
|
|
295
295
|
full_workspace_backup: undefined,
|
|
296
|
-
persistent_volume_claim: undefined,
|
|
297
296
|
workspace_class_limiting: undefined,
|
|
298
297
|
workspace_connection_limiting: undefined,
|
|
299
298
|
workspace_psi: undefined,
|
|
300
299
|
};
|
|
301
300
|
export type NamedWorkspaceFeatureFlag = keyof typeof WorkspaceFeatureFlags;
|
|
302
301
|
export namespace NamedWorkspaceFeatureFlag {
|
|
303
|
-
export const WORKSPACE_PERSISTED_FEATTURE_FLAGS: NamedWorkspaceFeatureFlag[] = [
|
|
304
|
-
"full_workspace_backup",
|
|
305
|
-
"persistent_volume_claim",
|
|
306
|
-
];
|
|
302
|
+
export const WORKSPACE_PERSISTED_FEATTURE_FLAGS: NamedWorkspaceFeatureFlag[] = ["full_workspace_backup"];
|
|
307
303
|
export function isWorkspacePersisted(ff: NamedWorkspaceFeatureFlag): boolean {
|
|
308
304
|
return WORKSPACE_PERSISTED_FEATTURE_FLAGS.includes(ff);
|
|
309
305
|
}
|
|
@@ -651,18 +647,6 @@ export interface Snapshot {
|
|
|
651
647
|
message?: string;
|
|
652
648
|
}
|
|
653
649
|
|
|
654
|
-
export interface VolumeSnapshot {
|
|
655
|
-
id: string;
|
|
656
|
-
workspaceId: string;
|
|
657
|
-
creationTime: string;
|
|
658
|
-
volumeHandle: string;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
export interface VolumeSnapshotWithWSType {
|
|
662
|
-
vs: VolumeSnapshot;
|
|
663
|
-
wsType: WorkspaceType;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
650
|
export type SnapshotState = "pending" | "available" | "error";
|
|
667
651
|
|
|
668
652
|
export interface Workspace {
|
|
@@ -1127,7 +1111,7 @@ export interface WithCommitHistory {
|
|
|
1127
1111
|
|
|
1128
1112
|
export interface StartPrebuildContext extends WorkspaceContext, WithCommitHistory {
|
|
1129
1113
|
actual: WorkspaceContext;
|
|
1130
|
-
project
|
|
1114
|
+
project: Project;
|
|
1131
1115
|
branch?: string;
|
|
1132
1116
|
}
|
|
1133
1117
|
|
|
@@ -15,7 +15,6 @@ export interface ProjectConfig {
|
|
|
15
15
|
|
|
16
16
|
export interface ProjectSettings {
|
|
17
17
|
useIncrementalPrebuilds?: boolean;
|
|
18
|
-
usePersistentVolumeClaim?: boolean;
|
|
19
18
|
keepOutdatedPrebuildsRunning?: boolean;
|
|
20
19
|
// whether new workspaces can start on older prebuilds and incrementally update
|
|
21
20
|
allowUsingPreviousPrebuilds?: boolean;
|
package/src/workspace-class.ts
CHANGED
package/src/wsready.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* See License-AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
// generated using github.com/32leaves/bel on 2022-
|
|
7
|
+
// generated using github.com/32leaves/bel on 2022-11-25 13:39:08.995865257 +0000 UTC m=+0.015035221
|
|
8
8
|
// DO NOT MODIFY
|
|
9
9
|
|
|
10
10
|
export enum WorkspaceInitSource {
|
|
@@ -14,4 +14,11 @@ export enum WorkspaceInitSource {
|
|
|
14
14
|
}
|
|
15
15
|
export interface WorkspaceReadyMessage {
|
|
16
16
|
source: WorkspaceInitSource;
|
|
17
|
+
metrics: InitializerMetric[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface InitializerMetric {
|
|
21
|
+
type: string;
|
|
22
|
+
duration: number;
|
|
23
|
+
size: number;
|
|
17
24
|
}
|