@gitpod/gitpod-protocol 0.1.5-svenefftinge-patch-1.3 → 0.1.5-tar-telemetry-settings-data.3
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/data/gitpod-schema.json +21 -2
- package/lib/accounting-protocol.d.ts +0 -1
- package/lib/accounting-protocol.d.ts.map +1 -1
- package/lib/accounting-protocol.js +10 -11
- package/lib/accounting-protocol.js.map +1 -1
- package/lib/admin-protocol.d.ts +18 -2
- package/lib/admin-protocol.d.ts.map +1 -1
- package/lib/admin-protocol.js +2 -13
- package/lib/admin-protocol.js.map +1 -1
- package/lib/analytics.d.ts +13 -1
- package/lib/analytics.d.ts.map +1 -1
- package/lib/context-url.d.ts +18 -5
- package/lib/context-url.d.ts.map +1 -1
- package/lib/context-url.js +62 -9
- package/lib/context-url.js.map +1 -1
- package/lib/context-url.spec.d.ts +2 -0
- package/lib/context-url.spec.d.ts.map +1 -1
- package/lib/context-url.spec.js +66 -48
- package/lib/context-url.spec.js.map +1 -1
- package/lib/email-protocol.js +4 -4
- package/lib/email-protocol.js.map +1 -1
- package/lib/encryption/container-module.js +4 -4
- package/lib/encryption/container-module.js.map +1 -1
- package/lib/encryption/encryption-engine.js +19 -20
- package/lib/encryption/encryption-engine.js.map +1 -1
- package/lib/encryption/encryption-engine.spec.js +29 -36
- package/lib/encryption/encryption-engine.spec.js.map +1 -1
- package/lib/encryption/encryption-service.js +29 -43
- package/lib/encryption/encryption-service.js.map +1 -1
- package/lib/encryption/key-provider.js +25 -30
- package/lib/encryption/key-provider.js.map +1 -1
- package/lib/env.d.ts +1 -2
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +20 -21
- package/lib/env.js.map +1 -1
- package/lib/gitpod-file-parser.js +25 -41
- package/lib/gitpod-file-parser.js.map +1 -1
- package/lib/gitpod-file-parser.spec.js +116 -116
- package/lib/gitpod-file-parser.spec.js.map +1 -1
- package/lib/gitpod-service.d.ts +78 -20
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +151 -295
- package/lib/gitpod-service.js.map +1 -1
- package/lib/headless-workspace-log.d.ts +1 -12
- package/lib/headless-workspace-log.d.ts.map +1 -1
- package/lib/headless-workspace-log.js +1 -7
- package/lib/headless-workspace-log.js.map +1 -1
- package/lib/ide-protocol.d.ts +105 -0
- package/lib/ide-protocol.d.ts.map +1 -0
- package/lib/ide-protocol.js +8 -0
- package/lib/ide-protocol.js.map +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/installation-admin-protocol.d.ts +27 -0
- package/lib/installation-admin-protocol.d.ts.map +1 -0
- package/lib/installation-admin-protocol.js +30 -0
- package/lib/installation-admin-protocol.js.map +1 -0
- package/lib/messaging/browser/connection.d.ts +3 -3
- package/lib/messaging/browser/connection.d.ts.map +1 -1
- package/lib/messaging/browser/connection.js +172 -35
- package/lib/messaging/browser/connection.js.map +1 -1
- package/lib/messaging/browser/window-connection.js +35 -55
- package/lib/messaging/browser/window-connection.js.map +1 -1
- package/lib/messaging/client-call-metrics.d.ts +35 -0
- package/lib/messaging/client-call-metrics.d.ts.map +1 -0
- package/lib/messaging/client-call-metrics.js +83 -0
- package/lib/messaging/client-call-metrics.js.map +1 -0
- package/lib/messaging/error.d.ts +2 -1
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +4 -2
- package/lib/messaging/error.js.map +1 -1
- package/lib/messaging/handler.d.ts +10 -0
- package/lib/messaging/handler.d.ts.map +1 -1
- package/lib/messaging/node/connection.d.ts +1 -17
- package/lib/messaging/node/connection.d.ts.map +1 -1
- package/lib/messaging/node/connection.js +23 -59
- package/lib/messaging/node/connection.js.map +1 -1
- package/lib/messaging/proxy-factory.d.ts +2 -0
- package/lib/messaging/proxy-factory.d.ts.map +1 -1
- package/lib/messaging/proxy-factory.js +74 -159
- package/lib/messaging/proxy-factory.js.map +1 -1
- package/lib/oss-allowlist.d.ts +14 -0
- package/lib/oss-allowlist.d.ts.map +1 -0
- package/lib/oss-allowlist.js +8 -0
- package/lib/oss-allowlist.js.map +1 -0
- package/lib/permission.d.ts +7 -2
- package/lib/permission.d.ts.map +1 -1
- package/lib/permission.js +34 -15
- package/lib/permission.js.map +1 -1
- package/lib/plans.d.ts +1 -1
- package/lib/plans.d.ts.map +1 -1
- package/lib/plans.js +38 -57
- package/lib/plans.js.map +1 -1
- package/lib/protocol.d.ts +52 -49
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +57 -115
- package/lib/protocol.js.map +1 -1
- package/lib/snapshot-url.d.ts +14 -0
- package/lib/snapshot-url.d.ts.map +1 -0
- package/lib/snapshot-url.js +26 -0
- package/lib/snapshot-url.js.map +1 -0
- package/lib/snapshot-url.spec.d.ts +7 -0
- package/lib/snapshot-url.spec.d.ts.map +1 -0
- package/lib/snapshot-url.spec.js +41 -0
- package/lib/snapshot-url.spec.js.map +1 -0
- package/lib/team-subscription-protocol.js +13 -13
- package/lib/team-subscription-protocol.js.map +1 -1
- package/lib/teams-projects-protocol.d.ts +59 -6
- package/lib/teams-projects-protocol.d.ts.map +1 -1
- package/lib/teams-projects-protocol.js +18 -15
- package/lib/teams-projects-protocol.js.map +1 -1
- package/lib/util/analytics.d.ts.map +1 -1
- package/lib/util/analytics.js +35 -26
- package/lib/util/analytics.js.map +1 -1
- package/lib/util/async-iterator.js +55 -133
- package/lib/util/async-iterator.js.map +1 -1
- package/lib/util/cancelable.js +17 -59
- package/lib/util/cancelable.js.map +1 -1
- package/lib/util/date-time.js +8 -8
- package/lib/util/date-time.js.map +1 -1
- package/lib/util/deferred.js +10 -12
- package/lib/util/deferred.js.map +1 -1
- package/lib/util/disposable.js +26 -39
- package/lib/util/disposable.js.map +1 -1
- package/lib/util/event.js +58 -74
- package/lib/util/event.js.map +1 -1
- package/lib/util/garbage-collected-cache.d.ts +1 -0
- package/lib/util/garbage-collected-cache.d.ts.map +1 -1
- package/lib/util/garbage-collected-cache.js +26 -46
- package/lib/util/garbage-collected-cache.js.map +1 -1
- package/lib/util/generate-workspace-id.d.ts +1 -1
- package/lib/util/generate-workspace-id.d.ts.map +1 -1
- package/lib/util/generate-workspace-id.js +29 -68
- package/lib/util/generate-workspace-id.js.map +1 -1
- package/lib/util/generate-workspace-id.spec.js +57 -78
- package/lib/util/generate-workspace-id.spec.js.map +1 -1
- package/lib/util/gitpod-cookie.d.ts +20 -0
- package/lib/util/gitpod-cookie.d.ts.map +1 -0
- package/lib/util/gitpod-cookie.js +44 -0
- package/lib/util/gitpod-cookie.js.map +1 -0
- package/lib/util/gitpod-host-url.d.ts +1 -1
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +93 -103
- package/lib/util/gitpod-host-url.js.map +1 -1
- package/lib/util/gitpod-host-url.spec.js +87 -135
- package/lib/util/gitpod-host-url.spec.js.map +1 -1
- package/lib/util/grpc.d.ts +15 -0
- package/lib/util/grpc.d.ts.map +1 -0
- package/lib/util/grpc.js +18 -0
- package/lib/util/grpc.js.map +1 -0
- package/lib/util/jaeger-client-types.d.ts +68 -0
- package/lib/util/jaeger-client-types.d.ts.map +1 -0
- package/lib/util/jaeger-client-types.js +8 -0
- package/lib/util/jaeger-client-types.js.map +1 -0
- package/lib/util/logging.d.ts +49 -33
- package/lib/util/logging.d.ts.map +1 -1
- package/lib/util/logging.js +107 -110
- package/lib/util/logging.js.map +1 -1
- package/lib/util/make-link.js +2 -2
- package/lib/util/make-link.js.map +1 -1
- package/lib/util/parse-workspace-id.d.ts +10 -0
- package/lib/util/parse-workspace-id.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.js +31 -7
- package/lib/util/parse-workspace-id.js.map +1 -1
- package/lib/util/parse-workspace-id.spec.d.ts +4 -0
- package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.spec.js +123 -84
- package/lib/util/parse-workspace-id.spec.js.map +1 -1
- package/lib/util/queue.js +16 -55
- package/lib/util/queue.js.map +1 -1
- package/lib/util/queue.spec.js +144 -288
- package/lib/util/queue.spec.js.map +1 -1
- package/lib/util/repeat.d.ts +15 -0
- package/lib/util/repeat.d.ts.map +1 -0
- package/lib/util/repeat.js +55 -0
- package/lib/util/repeat.js.map +1 -0
- package/lib/util/semaphore.js +15 -46
- package/lib/util/semaphore.js.map +1 -1
- package/lib/util/skip-if.js +6 -6
- package/lib/util/skip-if.js.map +1 -1
- package/lib/util/timeutil.js +16 -16
- package/lib/util/timeutil.js.map +1 -1
- package/lib/util/timeutil.spec.js +21 -24
- package/lib/util/timeutil.spec.js.map +1 -1
- package/lib/util/tracing.d.ts +51 -5
- package/lib/util/tracing.d.ts.map +1 -1
- package/lib/util/tracing.js +197 -62
- package/lib/util/tracing.js.map +1 -1
- package/lib/util/tracing.spec.d.ts +7 -0
- package/lib/util/tracing.spec.d.ts.map +1 -0
- package/lib/util/tracing.spec.js +121 -0
- package/lib/util/tracing.spec.js.map +1 -0
- package/lib/util/workspace-port-authentication.js +2 -2
- package/lib/util/workspace-port-authentication.js.map +1 -1
- package/lib/workspace-cluster.d.ts +14 -2
- package/lib/workspace-cluster.d.ts.map +1 -1
- package/lib/workspace-cluster.js +21 -4
- package/lib/workspace-cluster.js.map +1 -1
- package/lib/workspace-instance.d.ts +24 -2
- package/lib/workspace-instance.d.ts.map +1 -1
- package/lib/wsready.js +1 -1
- package/package.json +24 -13
- package/pkg-yarn.lock +14 -7
- package/provenance-bundle.jsonl +2 -0
- package/src/accounting-protocol.ts +1 -3
- package/src/admin-protocol.ts +25 -6
- package/src/analytics.ts +16 -1
- package/src/context-url.spec.ts +18 -4
- package/src/context-url.ts +62 -6
- package/src/email-protocol.ts +1 -1
- package/src/env.ts +10 -10
- package/src/gitpod-service.ts +99 -32
- package/src/headless-workspace-log.ts +1 -14
- package/src/ide-frontend-service.ts +1 -1
- package/src/ide-protocol.ts +119 -0
- package/src/index.ts +3 -0
- package/src/installation-admin-protocol.ts +42 -0
- package/src/messaging/browser/connection.ts +176 -10
- package/src/messaging/client-call-metrics.ts +97 -0
- package/src/messaging/error.ts +5 -2
- package/src/messaging/handler.ts +12 -0
- package/src/messaging/node/connection.ts +21 -68
- package/src/messaging/proxy-factory.ts +13 -5
- package/src/oss-allowlist.ts +15 -0
- package/src/permission.ts +22 -4
- package/src/protocol.ts +71 -54
- package/src/snapshot-url.spec.ts +25 -0
- package/src/snapshot-url.ts +27 -0
- package/src/team-subscription-protocol.ts +1 -1
- package/src/teams-projects-protocol.ts +78 -7
- package/src/util/analytics.ts +17 -1
- package/src/util/garbage-collected-cache.ts +7 -1
- package/src/util/generate-workspace-id.spec.ts +17 -0
- package/src/util/generate-workspace-id.ts +20 -2
- package/src/util/gitpod-cookie.ts +39 -0
- package/src/util/gitpod-host-url.ts +11 -11
- package/src/util/grpc.ts +15 -0
- package/src/util/jaeger-client-types.ts +102 -0
- package/src/util/logging.ts +102 -38
- package/src/util/parse-workspace-id.spec.ts +21 -1
- package/src/util/parse-workspace-id.ts +32 -6
- package/src/util/repeat.ts +45 -0
- package/src/util/tracing.spec.ts +83 -0
- package/src/util/tracing.ts +183 -17
- package/src/workspace-cluster.ts +18 -3
- package/src/workspace-instance.ts +35 -6
- package/src/wsready.ts +1 -1
- package/lib/messaging/connection-error-handler.d.ts +0 -27
- package/lib/messaging/connection-error-handler.d.ts.map +0 -1
- package/lib/messaging/connection-error-handler.js +0 -46
- package/lib/messaging/connection-error-handler.js.map +0 -1
- package/lib/util/repeater.d.ts +0 -22
- package/lib/util/repeater.d.ts.map +0 -1
- package/lib/util/repeater.js +0 -118
- package/lib/util/repeater.js.map +0 -1
- package/lib/util/safe-promise.d.ts +0 -11
- package/lib/util/safe-promise.d.ts.map +0 -1
- package/lib/util/safe-promise.js +0 -34
- package/lib/util/safe-promise.js.map +0 -1
- package/src/messaging/connection-error-handler.ts +0 -62
- package/src/util/jaeger-client.d.ts +0 -105
- package/src/util/repeater.ts +0 -49
- package/src/util/safe-promise.ts +0 -26
package/src/protocol.ts
CHANGED
|
@@ -28,8 +28,6 @@ export interface User {
|
|
|
28
28
|
|
|
29
29
|
identities: Identity[]
|
|
30
30
|
|
|
31
|
-
allowsMarketingCommunication: boolean;
|
|
32
|
-
|
|
33
31
|
/**
|
|
34
32
|
* Whether the user has been blocked to use our service, because of TOS violation for example.
|
|
35
33
|
* Optional for backwards compatibility.
|
|
@@ -106,14 +104,22 @@ export interface AdditionalUserData {
|
|
|
106
104
|
oauthClientsApproved?: { [key: string]: string }
|
|
107
105
|
// to remember GH Orgs the user installed/updated the GH App for
|
|
108
106
|
knownGitHubOrgs?: string[];
|
|
107
|
+
|
|
108
|
+
// Git clone URL pointing to the user's dotfile repo
|
|
109
|
+
dotfileRepo?: string;
|
|
109
110
|
}
|
|
110
111
|
|
|
111
112
|
export interface EmailNotificationSettings {
|
|
112
|
-
|
|
113
|
+
allowsChangelogMail?: boolean;
|
|
114
|
+
allowsDevXMail?: boolean;
|
|
115
|
+
allowsOnboardingMail?: boolean;
|
|
113
116
|
}
|
|
114
117
|
|
|
115
118
|
export type IDESettings = {
|
|
116
119
|
defaultIde?: string
|
|
120
|
+
useDesktopIde?: boolean
|
|
121
|
+
defaultDesktopIde?: string
|
|
122
|
+
useLatestVersion?: boolean
|
|
117
123
|
}
|
|
118
124
|
|
|
119
125
|
export interface UserPlatform {
|
|
@@ -135,14 +141,6 @@ export interface UserPlatform {
|
|
|
135
141
|
}
|
|
136
142
|
|
|
137
143
|
export interface UserFeatureSettings {
|
|
138
|
-
/**
|
|
139
|
-
* This field is used as marker to grant users a free trial for using private repositories,
|
|
140
|
-
* independent of any subscription or Chargebee.
|
|
141
|
-
* - it is set when the user uses their first private repo
|
|
142
|
-
* - whether the trial is expired or not is juged by the UserService
|
|
143
|
-
*/
|
|
144
|
-
privateRepoTrialStartDate?: string;
|
|
145
|
-
|
|
146
144
|
/**
|
|
147
145
|
* Permanent feature flags are added to each and every workspace instance
|
|
148
146
|
* this user starts.
|
|
@@ -157,12 +155,23 @@ export interface UserFeatureSettings {
|
|
|
157
155
|
export const WorkspaceFeatureFlags = { "full_workspace_backup": undefined, "fixed_resources": undefined };
|
|
158
156
|
export type NamedWorkspaceFeatureFlag = keyof (typeof WorkspaceFeatureFlags);
|
|
159
157
|
|
|
160
|
-
export interface
|
|
161
|
-
id?: string;
|
|
158
|
+
export interface EnvVarWithValue {
|
|
162
159
|
name: string;
|
|
163
|
-
repositoryPattern: string;
|
|
164
160
|
value: string;
|
|
165
161
|
}
|
|
162
|
+
|
|
163
|
+
export interface ProjectEnvVarWithValue extends EnvVarWithValue {
|
|
164
|
+
id: string;
|
|
165
|
+
projectId: string;
|
|
166
|
+
censored: boolean;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export type ProjectEnvVar = Omit<ProjectEnvVarWithValue, 'value'>;
|
|
170
|
+
|
|
171
|
+
export interface UserEnvVarValue extends EnvVarWithValue {
|
|
172
|
+
id?: string;
|
|
173
|
+
repositoryPattern: string; // DEPRECATED: Use ProjectEnvVar instead of repositoryPattern - https://github.com/gitpod-com/gitpod/issues/5322
|
|
174
|
+
}
|
|
166
175
|
export interface UserEnvVar extends UserEnvVarValue {
|
|
167
176
|
id: string;
|
|
168
177
|
userId: string;
|
|
@@ -171,10 +180,12 @@ export interface UserEnvVar extends UserEnvVarValue {
|
|
|
171
180
|
|
|
172
181
|
export namespace UserEnvVar {
|
|
173
182
|
|
|
183
|
+
// DEPRECATED: Use ProjectEnvVar instead of repositoryPattern - https://github.com/gitpod-com/gitpod/issues/5322
|
|
174
184
|
export function normalizeRepoPattern(pattern: string) {
|
|
175
185
|
return pattern.toLocaleLowerCase();
|
|
176
186
|
}
|
|
177
187
|
|
|
188
|
+
// DEPRECATED: Use ProjectEnvVar instead of repositoryPattern - https://github.com/gitpod-com/gitpod/issues/5322
|
|
178
189
|
export function score(value: UserEnvVarValue): number {
|
|
179
190
|
// We use a score to enforce precedence:
|
|
180
191
|
// value/value = 0
|
|
@@ -197,6 +208,7 @@ export namespace UserEnvVar {
|
|
|
197
208
|
return score;
|
|
198
209
|
}
|
|
199
210
|
|
|
211
|
+
// DEPRECATED: Use ProjectEnvVar instead of repositoryPattern - https://github.com/gitpod-com/gitpod/issues/5322
|
|
200
212
|
export function filter<T extends UserEnvVarValue>(vars: T[], owner: string, repo: string): T[] {
|
|
201
213
|
let result = vars.filter(e => {
|
|
202
214
|
const [ownerPattern, repoPattern] = splitRepositoryPattern(e.repositoryPattern);
|
|
@@ -244,10 +256,11 @@ export namespace UserEnvVar {
|
|
|
244
256
|
return result;
|
|
245
257
|
}
|
|
246
258
|
|
|
259
|
+
// DEPRECATED: Use ProjectEnvVar instead of repositoryPattern - https://github.com/gitpod-com/gitpod/issues/5322
|
|
247
260
|
export function splitRepositoryPattern(repositoryPattern: string): string[] {
|
|
248
261
|
const patterns = repositoryPattern.split('/');
|
|
249
|
-
const repoPattern = patterns.
|
|
250
|
-
const ownerPattern = patterns
|
|
262
|
+
const repoPattern = patterns.slice(1).join('/')
|
|
263
|
+
const ownerPattern = patterns[0];
|
|
251
264
|
return [ownerPattern, repoPattern];
|
|
252
265
|
}
|
|
253
266
|
}
|
|
@@ -378,11 +391,16 @@ export interface PendingGithubEvent {
|
|
|
378
391
|
export interface Snapshot {
|
|
379
392
|
id: string;
|
|
380
393
|
creationTime: string;
|
|
394
|
+
availableTime?: string;
|
|
381
395
|
originalWorkspaceId: string;
|
|
382
396
|
bucketId: string;
|
|
383
397
|
layoutData?: string;
|
|
398
|
+
state: SnapshotState;
|
|
399
|
+
message?: string;
|
|
384
400
|
}
|
|
385
401
|
|
|
402
|
+
export type SnapshotState = 'pending' | 'available' | 'error';
|
|
403
|
+
|
|
386
404
|
export interface LayoutData {
|
|
387
405
|
workspaceId: string;
|
|
388
406
|
lastUpdatedTime: string;
|
|
@@ -559,16 +577,20 @@ export interface WorkspaceConfig {
|
|
|
559
577
|
github?: GithubAppConfig;
|
|
560
578
|
vscode?: VSCodeConfig;
|
|
561
579
|
|
|
580
|
+
/** deprecated. Enabled by default **/
|
|
581
|
+
experimentalNetwork?: boolean;
|
|
582
|
+
|
|
562
583
|
/**
|
|
563
584
|
* Where the config object originates from.
|
|
564
585
|
*
|
|
565
586
|
* repo - from the repository
|
|
587
|
+
* project-db - from the "Project" stored in the database
|
|
566
588
|
* definitly-gp - from github.com/gitpod-io/definitely-gp
|
|
567
589
|
* derived - computed based on analyzing the repository
|
|
568
590
|
* additional-content - config comes from additional content, usually provided through the project's configuration
|
|
569
591
|
* default - our static catch-all default config
|
|
570
592
|
*/
|
|
571
|
-
_origin?: 'repo' | 'definitely-gp' | 'derived' | 'additional-content' | 'default';
|
|
593
|
+
_origin?: 'repo' | 'project-db' | 'definitely-gp' | 'derived' | 'additional-content' | 'default';
|
|
572
594
|
|
|
573
595
|
/**
|
|
574
596
|
* Set of automatically infered feature flags. That's not something the user can set, but
|
|
@@ -585,7 +607,7 @@ export interface GithubAppPrebuildConfig {
|
|
|
585
607
|
branches?: boolean
|
|
586
608
|
pullRequests?: boolean
|
|
587
609
|
pullRequestsFromForks?: boolean
|
|
588
|
-
addCheck?: boolean
|
|
610
|
+
addCheck?: boolean | 'prevent-merge-on-error'
|
|
589
611
|
addBadge?: boolean
|
|
590
612
|
addLabel?: boolean | string
|
|
591
613
|
addComment?: boolean
|
|
@@ -681,6 +703,8 @@ export interface PortConfig {
|
|
|
681
703
|
port: number;
|
|
682
704
|
onOpen?: PortOnOpen;
|
|
683
705
|
visibility?: PortVisibility;
|
|
706
|
+
description?: string;
|
|
707
|
+
name?: string;
|
|
684
708
|
}
|
|
685
709
|
export namespace PortConfig {
|
|
686
710
|
export function is(config: any): config is PortConfig {
|
|
@@ -704,7 +728,7 @@ export interface TaskConfig {
|
|
|
704
728
|
init?: string;
|
|
705
729
|
prebuild?: string;
|
|
706
730
|
command?: string;
|
|
707
|
-
env?: { [env: string]:
|
|
731
|
+
env?: { [env: string]: any };
|
|
708
732
|
openIn?: 'bottom' | 'main' | 'left' | 'right';
|
|
709
733
|
openMode?: 'split-top' | 'split-left' | 'split-right' | 'split-bottom' | 'tab-before' | 'tab-after';
|
|
710
734
|
}
|
|
@@ -768,6 +792,7 @@ export namespace ExternalImageConfigFile {
|
|
|
768
792
|
|
|
769
793
|
export interface WorkspaceContext {
|
|
770
794
|
title: string;
|
|
795
|
+
/** This contains the URL portion of the contextURL (which might contain other modifiers as well). It's optional because it's not set for older workspaces. */
|
|
771
796
|
normalizedContextURL?: string;
|
|
772
797
|
forceCreateNewWorkspace?: boolean;
|
|
773
798
|
forceImageBuild?: boolean;
|
|
@@ -867,8 +892,20 @@ export namespace PrebuiltWorkspaceContext {
|
|
|
867
892
|
}
|
|
868
893
|
}
|
|
869
894
|
|
|
895
|
+
export interface WithReferrerContext extends WorkspaceContext {
|
|
896
|
+
referrer: string
|
|
897
|
+
referrerIde?: string
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
export namespace WithReferrerContext {
|
|
901
|
+
export function is(context: any): context is WithReferrerContext {
|
|
902
|
+
return context
|
|
903
|
+
&& 'referrer' in context;
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
|
|
870
907
|
export interface WithEnvvarsContext extends WorkspaceContext {
|
|
871
|
-
envvars:
|
|
908
|
+
envvars: EnvVarWithValue[];
|
|
872
909
|
}
|
|
873
910
|
|
|
874
911
|
export namespace WithEnvvarsContext {
|
|
@@ -913,7 +950,7 @@ export interface Commit {
|
|
|
913
950
|
refType?: RefType
|
|
914
951
|
}
|
|
915
952
|
|
|
916
|
-
export interface AdditionalContentContext {
|
|
953
|
+
export interface AdditionalContentContext extends WorkspaceContext {
|
|
917
954
|
|
|
918
955
|
/**
|
|
919
956
|
* utf-8 encoded contents that will be copied on top of the workspace's filesystem
|
|
@@ -1007,6 +1044,19 @@ export interface Repository {
|
|
|
1007
1044
|
parent: Repository
|
|
1008
1045
|
}
|
|
1009
1046
|
}
|
|
1047
|
+
export interface Branch {
|
|
1048
|
+
name: string;
|
|
1049
|
+
commit: CommitInfo;
|
|
1050
|
+
htmlUrl: string;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
export interface CommitInfo {
|
|
1054
|
+
author: string;
|
|
1055
|
+
sha: string;
|
|
1056
|
+
commitMessage: string;
|
|
1057
|
+
authorAvatarUrl?: string;
|
|
1058
|
+
authorDate?: string;
|
|
1059
|
+
}
|
|
1010
1060
|
|
|
1011
1061
|
export namespace Repository {
|
|
1012
1062
|
export function fullRepoName(repo: Repository): string {
|
|
@@ -1153,39 +1203,6 @@ export namespace AuthProviderEntry {
|
|
|
1153
1203
|
}
|
|
1154
1204
|
}
|
|
1155
1205
|
|
|
1156
|
-
export interface Branding {
|
|
1157
|
-
readonly name: string;
|
|
1158
|
-
readonly favicon?: string;
|
|
1159
|
-
/** Either including domain OR absolute path (interpreted relative to host URL) */
|
|
1160
|
-
readonly logo: string;
|
|
1161
|
-
readonly startupLogo: string;
|
|
1162
|
-
readonly showProductivityTips: boolean;
|
|
1163
|
-
readonly redirectUrlIfNotAuthenticated?: string;
|
|
1164
|
-
readonly redirectUrlAfterLogout?: string;
|
|
1165
|
-
readonly homepage: string;
|
|
1166
|
-
readonly ide?: {
|
|
1167
|
-
readonly logo: string;
|
|
1168
|
-
readonly showReleaseNotes: boolean;
|
|
1169
|
-
readonly helpMenu: Branding.Link[];
|
|
1170
|
-
}
|
|
1171
|
-
readonly links: {
|
|
1172
|
-
readonly header: Branding.Link[];
|
|
1173
|
-
readonly footer: Branding.Link[];
|
|
1174
|
-
readonly social: Branding.SocialLink[];
|
|
1175
|
-
readonly legal: Branding.Link[];
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1178
|
-
export namespace Branding {
|
|
1179
|
-
export interface Link {
|
|
1180
|
-
readonly name: string;
|
|
1181
|
-
readonly url: string;
|
|
1182
|
-
}
|
|
1183
|
-
export interface SocialLink {
|
|
1184
|
-
readonly type: string;
|
|
1185
|
-
readonly url: string;
|
|
1186
|
-
}
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
1206
|
export interface Configuration {
|
|
1190
1207
|
readonly daysBeforeGarbageCollection: number;
|
|
1191
1208
|
readonly garbageCollectionStartDate: number;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 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
|
+
import { suite, test } from "mocha-typescript"
|
|
8
|
+
import * as chai from "chai"
|
|
9
|
+
import { SnapshotUrl } from ".";
|
|
10
|
+
|
|
11
|
+
const expect = chai.expect
|
|
12
|
+
|
|
13
|
+
@suite class TestSnapshotUrlParser {
|
|
14
|
+
|
|
15
|
+
@test public testPositive() {
|
|
16
|
+
const actual = SnapshotUrl.parse("workspaces/c362d434-6faa-4ce0-9ad4-91b4a87c4abe/3f0556f7-4afa-11e9-98d5-52f8983b9279.tar@gitpod-prodcopy-user-e1e28f18-0354-4a5d-b6b4-8879a2ff73fd");
|
|
17
|
+
|
|
18
|
+
expect(actual).to.deep.equal(<SnapshotUrl>{
|
|
19
|
+
bucketId: "gitpod-prodcopy-user-e1e28f18-0354-4a5d-b6b4-8879a2ff73fd",
|
|
20
|
+
filename: "3f0556f7-4afa-11e9-98d5-52f8983b9279.tar",
|
|
21
|
+
fullPath: "workspaces/c362d434-6faa-4ce0-9ad4-91b4a87c4abe/3f0556f7-4afa-11e9-98d5-52f8983b9279.tar",
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
module.exports = new TestSnapshotUrlParser() // Only to circumvent no usage warning :-/
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 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
|
+
export interface SnapshotUrl {
|
|
8
|
+
bucketId: string;
|
|
9
|
+
fullPath: string;
|
|
10
|
+
filename: string;
|
|
11
|
+
}
|
|
12
|
+
export namespace SnapshotUrl {
|
|
13
|
+
export function parse(url: string): SnapshotUrl {
|
|
14
|
+
const parts = url.split("@");
|
|
15
|
+
if (parts.length !== 2) {
|
|
16
|
+
throw new Error(`cannot parse snapshot URL: ${url}`);
|
|
17
|
+
}
|
|
18
|
+
const [fullPath, bucketId] = parts;
|
|
19
|
+
|
|
20
|
+
const pathParts = fullPath.split("/");
|
|
21
|
+
if (pathParts.length < 1) {
|
|
22
|
+
throw new Error(`cannot parse snapshot URL: ${url}`);
|
|
23
|
+
}
|
|
24
|
+
const filename = pathParts[pathParts.length - 1];
|
|
25
|
+
return { bucketId, fullPath, filename };
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -5,17 +5,31 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { PrebuiltWorkspaceState } from "./protocol";
|
|
8
|
-
import uuidv4
|
|
8
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
9
|
+
import { DeepPartial } from "./util/deep-partial";
|
|
10
|
+
|
|
11
|
+
export interface ProjectConfig {
|
|
12
|
+
'.gitpod.yml': string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ProjectSettings {
|
|
16
|
+
useIncrementalPrebuilds?: boolean;
|
|
17
|
+
}
|
|
9
18
|
|
|
10
19
|
export interface Project {
|
|
11
20
|
id: string;
|
|
12
21
|
name: string;
|
|
22
|
+
slug?: string;
|
|
13
23
|
cloneUrl: string;
|
|
14
|
-
teamId
|
|
24
|
+
teamId?: string;
|
|
25
|
+
userId?: string;
|
|
15
26
|
appInstallationId: string;
|
|
27
|
+
config?: ProjectConfig;
|
|
28
|
+
settings?: ProjectSettings;
|
|
16
29
|
creationTime: string;
|
|
17
30
|
/** This is a flag that triggers the HARD DELETION of this entity */
|
|
18
31
|
deleted?: boolean;
|
|
32
|
+
markedDeleted?: boolean;
|
|
19
33
|
}
|
|
20
34
|
|
|
21
35
|
export namespace Project {
|
|
@@ -26,21 +40,77 @@ export namespace Project {
|
|
|
26
40
|
creationTime: new Date().toISOString()
|
|
27
41
|
};
|
|
28
42
|
}
|
|
43
|
+
|
|
44
|
+
export interface Overview {
|
|
45
|
+
branches: BranchDetails[];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export namespace Overview {
|
|
49
|
+
export function is(data?: any): data is Project.Overview {
|
|
50
|
+
return Array.isArray(data?.branches);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface BranchDetails {
|
|
55
|
+
name: string;
|
|
56
|
+
url: string;
|
|
57
|
+
isDefault: boolean;
|
|
58
|
+
|
|
59
|
+
// Latest commit
|
|
60
|
+
changeTitle: string;
|
|
61
|
+
changeDate?: string;
|
|
62
|
+
changeAuthor?: string;
|
|
63
|
+
changeAuthorAvatar?: string;
|
|
64
|
+
changePR?: string;
|
|
65
|
+
changeUrl?: string;
|
|
66
|
+
changeHash: string;
|
|
67
|
+
}
|
|
29
68
|
}
|
|
30
69
|
|
|
31
|
-
export
|
|
32
|
-
|
|
70
|
+
export type PartialProject = DeepPartial<Project> & Pick<Project, 'id'>;
|
|
71
|
+
|
|
72
|
+
export interface PrebuildWithStatus {
|
|
73
|
+
info: PrebuildInfo;
|
|
74
|
+
status: PrebuiltWorkspaceState;
|
|
75
|
+
error?: string;
|
|
33
76
|
}
|
|
34
77
|
|
|
35
78
|
export interface PrebuildInfo {
|
|
36
79
|
id: string;
|
|
37
|
-
|
|
38
|
-
|
|
80
|
+
buildWorkspaceId: string;
|
|
81
|
+
basedOnPrebuildId?: string;
|
|
82
|
+
|
|
83
|
+
teamId?: string;
|
|
84
|
+
userId?: string;
|
|
85
|
+
|
|
86
|
+
projectId: string;
|
|
87
|
+
projectName: string;
|
|
88
|
+
|
|
39
89
|
cloneUrl: string;
|
|
40
90
|
branch: string;
|
|
91
|
+
|
|
41
92
|
startedAt: string;
|
|
42
93
|
startedBy: string;
|
|
43
|
-
|
|
94
|
+
startedByAvatar?: string;
|
|
95
|
+
|
|
96
|
+
changeTitle: string;
|
|
97
|
+
changeDate: string;
|
|
98
|
+
changeAuthor: string;
|
|
99
|
+
changeAuthorAvatar?: string;
|
|
100
|
+
changePR?: string;
|
|
101
|
+
changeUrl?: string;
|
|
102
|
+
changeHash: string;
|
|
103
|
+
}
|
|
104
|
+
export namespace PrebuildInfo {
|
|
105
|
+
export function is(data?: any): data is PrebuildInfo {
|
|
106
|
+
return typeof data === "object" && ["id", "buildWorkspaceId", "projectId", "branch"].every(p => p in data);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface StartPrebuildResult {
|
|
111
|
+
prebuildId: string;
|
|
112
|
+
wsid: string;
|
|
113
|
+
done: boolean;
|
|
44
114
|
}
|
|
45
115
|
|
|
46
116
|
export interface Team {
|
|
@@ -48,6 +118,7 @@ export interface Team {
|
|
|
48
118
|
name: string;
|
|
49
119
|
slug: string;
|
|
50
120
|
creationTime: string;
|
|
121
|
+
markedDeleted?: boolean;
|
|
51
122
|
/** This is a flag that triggers the HARD DELETION of this entity */
|
|
52
123
|
deleted?: boolean;
|
|
53
124
|
}
|
package/src/util/analytics.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import Analytics = require("analytics-node");
|
|
8
|
-
import { IAnalyticsWriter, IdentifyMessage, TrackMessage } from "../analytics";
|
|
8
|
+
import { IAnalyticsWriter, IdentifyMessage, TrackMessage, PageMessage } from "../analytics";
|
|
9
9
|
import { log } from './logging';
|
|
10
10
|
|
|
11
11
|
|
|
@@ -52,6 +52,18 @@ class SegmentAnalyticsWriter implements IAnalyticsWriter {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
page(msg: PageMessage) {
|
|
56
|
+
try{
|
|
57
|
+
this.analytics.page(msg, (err: Error) => {
|
|
58
|
+
if (err) {
|
|
59
|
+
log.warn("analytics.page failed", err);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
} catch (err) {
|
|
63
|
+
log.warn("analytics.page failed", err);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
55
67
|
}
|
|
56
68
|
|
|
57
69
|
class LogAnalyticsWriter implements IAnalyticsWriter {
|
|
@@ -62,10 +74,14 @@ class LogAnalyticsWriter implements IAnalyticsWriter {
|
|
|
62
74
|
track(msg: TrackMessage): void {
|
|
63
75
|
log.debug("analytics track", msg);
|
|
64
76
|
}
|
|
77
|
+
page(msg: PageMessage): void {
|
|
78
|
+
log.debug("analytics page", msg);
|
|
79
|
+
}
|
|
65
80
|
|
|
66
81
|
}
|
|
67
82
|
|
|
68
83
|
class NoAnalyticsWriter implements IAnalyticsWriter {
|
|
69
84
|
identify(msg: IdentifyMessage): void {}
|
|
70
85
|
track(msg: TrackMessage): void {}
|
|
86
|
+
page(msg: PageMessage): void {}
|
|
71
87
|
}
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* See License-AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import { repeat } from "./repeat";
|
|
8
|
+
|
|
7
9
|
|
|
8
10
|
interface CacheEntry<T> {
|
|
9
11
|
key: string;
|
|
@@ -41,8 +43,12 @@ export class GarbageCollectedCache<T> {
|
|
|
41
43
|
return entry.value;
|
|
42
44
|
}
|
|
43
45
|
|
|
46
|
+
public delete(key: string) {
|
|
47
|
+
this.store.delete(key);
|
|
48
|
+
}
|
|
49
|
+
|
|
44
50
|
protected regularlyCollectGarbage() {
|
|
45
|
-
|
|
51
|
+
repeat(() => this.collectGarbage(), this.gcIntervalSeconds * 1000);
|
|
46
52
|
}
|
|
47
53
|
|
|
48
54
|
protected collectGarbage() {
|
|
@@ -27,5 +27,22 @@ const expect = chai.expect
|
|
|
27
27
|
expect(longestName.length <= 36, `"${longestName}" is longer than 36 chars (${longestName.length})`).to.be.true;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
@test public async testCustomName() {
|
|
31
|
+
const data = [
|
|
32
|
+
['foo','bar','foo-bar-'],
|
|
33
|
+
['f','bar','.{2,16}-bar-'],
|
|
34
|
+
['gitpod-io','gitpod','gitpodio-gitpod-'],
|
|
35
|
+
['this is rather long and has some "§$"% special chars','also here pretty long and needs abbreviation','thisisratherlon-alsohere-'],
|
|
36
|
+
['breatheco-de', 'python-flask-api-tutorial', 'breathecode-pythonflaska-'],
|
|
37
|
+
['UPPER', "CaSe", "upper-case-"]
|
|
38
|
+
]
|
|
39
|
+
for (const d of data) {
|
|
40
|
+
const id = await generateWorkspaceID(d[0], d[1]);
|
|
41
|
+
expect(id).match(new RegExp("^"+d[2]));
|
|
42
|
+
expect(new GitpodHostUrl().withWorkspacePrefix(id, "eu").workspaceId).to.equal(id);
|
|
43
|
+
expect(id.length <= 36, `"${id}" is longer than 36 chars (${id.length})`).to.be.true;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
30
47
|
}
|
|
31
48
|
module.exports = new TestGenerateWorkspaceId()
|
|
@@ -5,8 +5,26 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import randomNumber = require("random-number-csprng");
|
|
7
7
|
|
|
8
|
-
export async function generateWorkspaceID(): Promise<string> {
|
|
9
|
-
|
|
8
|
+
export async function generateWorkspaceID(firstSegment?: string, secondSegment?: string): Promise<string> {
|
|
9
|
+
const firstSeg = clean(firstSegment) || await random(colors);
|
|
10
|
+
const secSeg = clean(secondSegment, Math.min(15, 23 - firstSeg.length)) || await random(animals);
|
|
11
|
+
return firstSeg+'-'+secSeg+'-'+(await random(characters, 11));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function clean(segment: string | undefined, maxChars: number = 15) {
|
|
15
|
+
if (!segment) {
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
segment = segment.toLowerCase();
|
|
19
|
+
let result = '';
|
|
20
|
+
for (let i =0; i < segment.length; i++) {
|
|
21
|
+
if (characters.indexOf(segment[i]) !== -1) {
|
|
22
|
+
result += segment[i];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (result.length >= 2) {
|
|
26
|
+
return result.substring(0, maxChars);
|
|
27
|
+
}
|
|
10
28
|
}
|
|
11
29
|
|
|
12
30
|
async function random(array: string[], length: number = 1): Promise<string> {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 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
|
+
import * as cookie from 'cookie';
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* This cookie indicates whether the connected client is a Gitpod user (= "has logged in within the last year") or not.
|
|
11
|
+
* This is used by "gitpod.io" and "www.gitpod.io" to display different content/buttons.
|
|
12
|
+
*/
|
|
13
|
+
export const NAME = "gitpod-user";
|
|
14
|
+
export const VALUE = "true";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @param domain The domain the Gitpod installation is installed onto
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
export function options(domain: string): cookie.CookieSerializeOptions {
|
|
21
|
+
// Reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies
|
|
22
|
+
return {
|
|
23
|
+
path: "/", // make sure we send the cookie to all sub-pages
|
|
24
|
+
httpOnly: false,
|
|
25
|
+
secure: false,
|
|
26
|
+
maxAge: 60 * 60 * 24 * 365, // 1 year
|
|
27
|
+
sameSite: "lax", // default: true. "Lax" needed to ensure we see cookies from users that neavigate to gitpod.io from external sites
|
|
28
|
+
domain: `.${domain}`, // explicilty include subdomains to not only cover "gitpod.io", but also "www.gitpod.io" or workspaces
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export function generateCookie(domain: string): string {
|
|
33
|
+
return cookie.serialize(NAME, VALUE, options(domain));
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export function isPresent(cookies: string): boolean {
|
|
37
|
+
// needs to match the old (gitpod-user=loggedIn) and new (gitpod-user=true) values to ensure a smooth transition during rollout.
|
|
38
|
+
return !!cookies.match(`${NAME}=`);
|
|
39
|
+
};
|
|
@@ -12,13 +12,13 @@ export interface UrlChange {
|
|
|
12
12
|
}
|
|
13
13
|
export type UrlUpdate = UrlChange | Partial<URL>;
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const baseWorkspaceIDRegex = "(([a-f][0-9a-f]{7}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|([0-9a-z]{2,16}-[0-9a-z]{2,16}-[0-9a-z]{8,11}))";
|
|
16
16
|
|
|
17
17
|
// this pattern matches v4 UUIDs as well as the new generated workspace ids (e.g. pink-panda-ns35kd21)
|
|
18
|
-
const workspaceIDRegex = RegExp(`^${
|
|
18
|
+
const workspaceIDRegex = RegExp(`^${baseWorkspaceIDRegex}$`);
|
|
19
19
|
|
|
20
20
|
// this pattern matches URL prefixes of workspaces
|
|
21
|
-
const workspaceUrlPrefixRegex = RegExp(`^([0-9]{4,6}-)?${
|
|
21
|
+
const workspaceUrlPrefixRegex = RegExp(`^([0-9]{4,6}-)?${baseWorkspaceIDRegex}\\.`);
|
|
22
22
|
|
|
23
23
|
export class GitpodHostUrl {
|
|
24
24
|
readonly url: URL;
|
|
@@ -85,27 +85,27 @@ export class GitpodHostUrl {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
asDashboard(): GitpodHostUrl {
|
|
88
|
-
return this.with(url => ({ pathname: '/
|
|
88
|
+
return this.with(url => ({ pathname: '/' }));
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
asLogin(): GitpodHostUrl {
|
|
92
|
-
return this.with(url => ({ pathname: '/login
|
|
92
|
+
return this.with(url => ({ pathname: '/login' }));
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
asUpgradeSubscription(): GitpodHostUrl {
|
|
96
|
-
return this.with(url => ({ pathname: '/plans
|
|
96
|
+
return this.with(url => ({ pathname: '/plans' }));
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
asAccessControl(): GitpodHostUrl {
|
|
100
|
-
return this.with(url => ({ pathname: '/
|
|
100
|
+
return this.with(url => ({ pathname: '/integrations' }));
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
asSettings(): GitpodHostUrl {
|
|
104
|
-
return this.with(url => ({ pathname: '/settings
|
|
104
|
+
return this.with(url => ({ pathname: '/settings' }));
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
|
|
108
|
-
return this.with(url => ({ pathname: '/
|
|
107
|
+
asPreferences(): GitpodHostUrl {
|
|
108
|
+
return this.with(url => ({ pathname: '/preferences' }));
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
asStart(workspaceId = this.workspaceId): GitpodHostUrl {
|
|
@@ -150,7 +150,7 @@ export class GitpodHostUrl {
|
|
|
150
150
|
return undefined;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
get blobServe(): boolean
|
|
153
|
+
get blobServe(): boolean {
|
|
154
154
|
const hostSegments = this.url.host.split(".");
|
|
155
155
|
if (hostSegments[0] === 'blobserve') {
|
|
156
156
|
return true;
|