@gitpod/gitpod-protocol 0.1.5-pd-add-grpc-sec.1 → 0.1.5-pd-workspacekit.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.
Files changed (248) hide show
  1. package/lib/accounting-protocol.d.ts +1 -1
  2. package/lib/accounting-protocol.js +1 -1
  3. package/lib/admin-protocol.d.ts +1 -1
  4. package/lib/admin-protocol.js +1 -1
  5. package/lib/analytics.d.ts +1 -1
  6. package/lib/analytics.js +1 -1
  7. package/lib/attribution.d.ts +1 -1
  8. package/lib/attribution.js +1 -1
  9. package/lib/auth.d.ts +1 -1
  10. package/lib/auth.js +1 -1
  11. package/lib/billing-mode.d.ts +1 -1
  12. package/lib/billing-mode.js +1 -1
  13. package/lib/blocked-repositories-protocol.d.ts +1 -1
  14. package/lib/blocked-repositories-protocol.js +1 -1
  15. package/lib/context-url.d.ts +1 -1
  16. package/lib/context-url.js +1 -1
  17. package/lib/context-url.spec.d.ts +1 -1
  18. package/lib/context-url.spec.js +1 -1
  19. package/lib/encryption/container-module.d.ts +1 -1
  20. package/lib/encryption/container-module.js +1 -1
  21. package/lib/encryption/encryption-engine.d.ts +1 -1
  22. package/lib/encryption/encryption-engine.js +1 -1
  23. package/lib/encryption/encryption-engine.spec.d.ts +1 -1
  24. package/lib/encryption/encryption-engine.spec.js +1 -1
  25. package/lib/encryption/encryption-service.d.ts +1 -1
  26. package/lib/encryption/encryption-service.js +1 -1
  27. package/lib/encryption/key-provider.d.ts +1 -1
  28. package/lib/encryption/key-provider.js +1 -1
  29. package/lib/env.d.ts +1 -1
  30. package/lib/env.d.ts.map +1 -1
  31. package/lib/env.js +1 -1
  32. package/lib/env.js.map +1 -1
  33. package/lib/experiments/always-default.d.ts +1 -1
  34. package/lib/experiments/configcat-server.d.ts +1 -1
  35. package/lib/experiments/configcat-server.js +1 -1
  36. package/lib/experiments/configcat.d.ts +1 -1
  37. package/lib/experiments/configcat.js +1 -1
  38. package/lib/experiments/types.d.ts +1 -1
  39. package/lib/experiments/types.js +1 -1
  40. package/lib/gitpod-file-parser.d.ts +1 -1
  41. package/lib/gitpod-file-parser.js +1 -1
  42. package/lib/gitpod-file-parser.spec.d.ts +1 -1
  43. package/lib/gitpod-file-parser.spec.js +1 -1
  44. package/lib/gitpod-service.d.ts +7 -4
  45. package/lib/gitpod-service.d.ts.map +1 -1
  46. package/lib/gitpod-service.js +1 -1
  47. package/lib/gitpod-service.js.map +1 -1
  48. package/lib/headless-workspace-log.d.ts +1 -1
  49. package/lib/headless-workspace-log.js +1 -1
  50. package/lib/ide-frontend-service.d.ts +1 -1
  51. package/lib/ide-frontend-service.js +1 -1
  52. package/lib/ide-protocol.d.ts +6 -1
  53. package/lib/ide-protocol.d.ts.map +1 -1
  54. package/lib/ide-protocol.js +11 -1
  55. package/lib/ide-protocol.js.map +1 -1
  56. package/lib/index.d.ts +1 -1
  57. package/lib/index.js +1 -1
  58. package/lib/installation-admin-protocol.d.ts +1 -1
  59. package/lib/installation-admin-protocol.js +1 -1
  60. package/lib/license-protocol.d.ts +1 -1
  61. package/lib/license-protocol.js +1 -1
  62. package/lib/messaging/browser/window-connection.d.ts +1 -1
  63. package/lib/messaging/browser/window-connection.js +1 -1
  64. package/lib/messaging/client-call-metrics.d.ts +1 -1
  65. package/lib/messaging/client-call-metrics.js +1 -1
  66. package/lib/messaging/error.d.ts +1 -1
  67. package/lib/messaging/error.js +1 -1
  68. package/lib/oss-allowlist.d.ts +1 -1
  69. package/lib/oss-allowlist.js +1 -1
  70. package/lib/payment-protocol.d.ts +1 -1
  71. package/lib/payment-protocol.js +1 -1
  72. package/lib/permission.d.ts +1 -1
  73. package/lib/permission.js +1 -1
  74. package/lib/plans.d.ts +1 -1
  75. package/lib/plans.js +1 -1
  76. package/lib/protocol.d.ts +3 -3
  77. package/lib/protocol.d.ts.map +1 -1
  78. package/lib/protocol.js +1 -1
  79. package/lib/protocol.spec.d.ts +1 -1
  80. package/lib/protocol.spec.js +1 -1
  81. package/lib/snapshot-url.d.ts +1 -1
  82. package/lib/snapshot-url.js +1 -1
  83. package/lib/snapshot-url.spec.d.ts +1 -1
  84. package/lib/snapshot-url.spec.js +1 -1
  85. package/lib/team-subscription-protocol.d.ts +1 -1
  86. package/lib/team-subscription-protocol.js +1 -1
  87. package/lib/teams-projects-protocol.d.ts +1 -1
  88. package/lib/teams-projects-protocol.js +1 -1
  89. package/lib/typings/globals.d.ts +1 -1
  90. package/lib/typings/globals.js +1 -1
  91. package/lib/usage.d.ts +1 -1
  92. package/lib/usage.js +1 -1
  93. package/lib/util/analytics.d.ts +1 -1
  94. package/lib/util/analytics.js +1 -1
  95. package/lib/util/async-iterator.d.ts +1 -1
  96. package/lib/util/async-iterator.js +1 -1
  97. package/lib/util/cancelable.d.ts +1 -1
  98. package/lib/util/cancelable.js +1 -1
  99. package/lib/util/date-time.d.ts +1 -1
  100. package/lib/util/date-time.js +1 -1
  101. package/lib/util/debug-app.d.ts +1 -1
  102. package/lib/util/debug-app.js +1 -1
  103. package/lib/util/deep-partial.d.ts +1 -1
  104. package/lib/util/deep-partial.js +1 -1
  105. package/lib/util/deferred.d.ts +1 -1
  106. package/lib/util/deferred.js +1 -1
  107. package/lib/util/garbage-collected-cache.d.ts +1 -1
  108. package/lib/util/garbage-collected-cache.js +1 -1
  109. package/lib/util/generate-workspace-id.d.ts +1 -1
  110. package/lib/util/generate-workspace-id.js +1 -1
  111. package/lib/util/generate-workspace-id.spec.d.ts +1 -1
  112. package/lib/util/generate-workspace-id.spec.js +1 -1
  113. package/lib/util/gitpod-cookie.d.ts +1 -1
  114. package/lib/util/gitpod-cookie.js +1 -1
  115. package/lib/util/gitpod-host-url.d.ts +12 -1
  116. package/lib/util/gitpod-host-url.d.ts.map +1 -1
  117. package/lib/util/gitpod-host-url.js +29 -2
  118. package/lib/util/gitpod-host-url.js.map +1 -1
  119. package/lib/util/gitpod-host-url.spec.d.ts +1 -1
  120. package/lib/util/gitpod-host-url.spec.js +1 -1
  121. package/lib/util/grpc.d.ts +1 -1
  122. package/lib/util/grpc.js +1 -1
  123. package/lib/util/jaeger-client-types.d.ts +1 -1
  124. package/lib/util/jaeger-client-types.js +1 -1
  125. package/lib/util/logging.d.ts +1 -1
  126. package/lib/util/logging.js +1 -1
  127. package/lib/util/logging.spec.d.ts +1 -1
  128. package/lib/util/logging.spec.js +1 -1
  129. package/lib/util/make-link.d.ts +1 -1
  130. package/lib/util/make-link.js +1 -1
  131. package/lib/util/nice-grpc.d.ts +1 -1
  132. package/lib/util/nice-grpc.js +1 -1
  133. package/lib/util/parse-workspace-id.d.ts +1 -1
  134. package/lib/util/parse-workspace-id.js +1 -1
  135. package/lib/util/parse-workspace-id.spec.d.ts +1 -1
  136. package/lib/util/parse-workspace-id.spec.js +1 -1
  137. package/lib/util/queue.d.ts +1 -1
  138. package/lib/util/queue.js +1 -1
  139. package/lib/util/queue.spec.d.ts +1 -1
  140. package/lib/util/queue.spec.js +1 -1
  141. package/lib/util/repeat.d.ts +1 -1
  142. package/lib/util/repeat.js +1 -1
  143. package/lib/util/semaphore.d.ts +1 -1
  144. package/lib/util/semaphore.js +1 -1
  145. package/lib/util/skip-if.d.ts +1 -1
  146. package/lib/util/skip-if.js +1 -1
  147. package/lib/util/timeutil.d.ts +1 -1
  148. package/lib/util/timeutil.js +1 -1
  149. package/lib/util/timeutil.spec.d.ts +1 -1
  150. package/lib/util/timeutil.spec.js +1 -1
  151. package/lib/util/tracing.d.ts +1 -1
  152. package/lib/util/tracing.js +1 -1
  153. package/lib/util/tracing.spec.d.ts +1 -1
  154. package/lib/util/tracing.spec.js +1 -1
  155. package/lib/util/workspace-port-authentication.d.ts +1 -1
  156. package/lib/util/workspace-port-authentication.js +1 -1
  157. package/lib/webhook-event.d.ts +1 -1
  158. package/lib/webhook-event.js +1 -1
  159. package/lib/workspace-class.d.ts +1 -1
  160. package/lib/workspace-class.js +1 -1
  161. package/lib/workspace-cluster.d.ts +1 -1
  162. package/lib/workspace-cluster.js +1 -1
  163. package/lib/workspace-instance.d.ts +1 -1
  164. package/lib/workspace-instance.js +1 -1
  165. package/lib/wsready.d.ts +1 -1
  166. package/lib/wsready.js +1 -1
  167. package/package.json +1 -1
  168. package/pkg-yarn.lock +1 -1
  169. package/provenance-bundle.jsonl +1 -1
  170. package/src/accounting-protocol.ts +1 -1
  171. package/src/admin-protocol.ts +1 -1
  172. package/src/analytics.ts +1 -1
  173. package/src/attribution.ts +1 -1
  174. package/src/auth.ts +1 -1
  175. package/src/billing-mode.ts +1 -1
  176. package/src/blocked-repositories-protocol.ts +1 -1
  177. package/src/context-url.spec.ts +1 -1
  178. package/src/context-url.ts +1 -1
  179. package/src/encryption/container-module.ts +1 -1
  180. package/src/encryption/encryption-engine.spec.ts +1 -1
  181. package/src/encryption/encryption-engine.ts +1 -1
  182. package/src/encryption/encryption-service.ts +1 -1
  183. package/src/encryption/key-provider.ts +1 -1
  184. package/src/env.ts +2 -3
  185. package/src/experiments/always-default.ts +1 -1
  186. package/src/experiments/configcat-server.ts +1 -1
  187. package/src/experiments/configcat.ts +1 -1
  188. package/src/experiments/types.ts +1 -1
  189. package/src/gitpod-file-parser.spec.ts +1 -1
  190. package/src/gitpod-file-parser.ts +1 -1
  191. package/src/gitpod-service.ts +9 -3
  192. package/src/headless-workspace-log.ts +1 -1
  193. package/src/ide-frontend-service.ts +1 -1
  194. package/src/ide-protocol.ts +9 -1
  195. package/src/index.ts +1 -1
  196. package/src/installation-admin-protocol.ts +1 -1
  197. package/src/license-protocol.ts +1 -1
  198. package/src/messaging/browser/window-connection.ts +1 -1
  199. package/src/messaging/client-call-metrics.ts +1 -1
  200. package/src/messaging/error.ts +1 -1
  201. package/src/oss-allowlist.ts +1 -1
  202. package/src/payment-protocol.ts +1 -1
  203. package/src/permission.ts +1 -1
  204. package/src/plans.ts +1 -1
  205. package/src/protocol.spec.ts +1 -1
  206. package/src/protocol.ts +3 -3
  207. package/src/snapshot-url.spec.ts +1 -1
  208. package/src/snapshot-url.ts +1 -1
  209. package/src/team-subscription-protocol.ts +1 -1
  210. package/src/teams-projects-protocol.ts +1 -1
  211. package/src/typings/globals.ts +1 -1
  212. package/src/usage.ts +1 -1
  213. package/src/util/analytics.ts +1 -1
  214. package/src/util/async-iterator.ts +1 -1
  215. package/src/util/cancelable.ts +1 -1
  216. package/src/util/date-time.ts +1 -1
  217. package/src/util/debug-app.ts +1 -1
  218. package/src/util/deep-partial.ts +1 -1
  219. package/src/util/deferred.ts +1 -1
  220. package/src/util/garbage-collected-cache.ts +1 -1
  221. package/src/util/generate-workspace-id.spec.ts +1 -1
  222. package/src/util/generate-workspace-id.ts +1 -1
  223. package/src/util/gitpod-cookie.ts +1 -1
  224. package/src/util/gitpod-host-url.spec.ts +1 -1
  225. package/src/util/gitpod-host-url.ts +36 -1
  226. package/src/util/grpc.ts +1 -1
  227. package/src/util/jaeger-client-types.ts +1 -1
  228. package/src/util/logging.spec.ts +1 -1
  229. package/src/util/logging.ts +1 -1
  230. package/src/util/make-link.ts +1 -1
  231. package/src/util/nice-grpc.ts +1 -1
  232. package/src/util/parse-workspace-id.spec.ts +1 -1
  233. package/src/util/parse-workspace-id.ts +1 -1
  234. package/src/util/queue.spec.ts +1 -1
  235. package/src/util/queue.ts +1 -1
  236. package/src/util/repeat.ts +1 -1
  237. package/src/util/semaphore.ts +1 -1
  238. package/src/util/skip-if.ts +1 -1
  239. package/src/util/timeutil.spec.ts +1 -1
  240. package/src/util/timeutil.ts +1 -1
  241. package/src/util/tracing.spec.ts +1 -1
  242. package/src/util/tracing.ts +1 -1
  243. package/src/util/workspace-port-authentication.ts +1 -1
  244. package/src/webhook-event.ts +1 -1
  245. package/src/workspace-class.ts +1 -1
  246. package/src/workspace-cluster.ts +1 -1
  247. package/src/workspace-instance.ts +1 -1
  248. package/src/wsready.ts +1 -1
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2022 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { Attributes, Client } from "./types";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2022 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { BillingTier, User } from "../protocol";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { suite, test } from "mocha-typescript";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { injectable } from "inversify";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import {
@@ -26,6 +26,7 @@ import {
26
26
  PrebuiltWorkspace,
27
27
  UserSSHPublicKeyValue,
28
28
  SSHPublicKeyValue,
29
+ IDESettings,
29
30
  } from "./protocol";
30
31
  import {
31
32
  Team,
@@ -127,6 +128,7 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
127
128
  deleteWorkspace(id: string): Promise<void>;
128
129
  setWorkspaceDescription(id: string, desc: string): Promise<void>;
129
130
  controlAdmission(id: string, level: GitpodServer.AdmissionLevel): Promise<void>;
131
+ restartRing1(workspaceId: string, type: number): Promise<void>;
130
132
 
131
133
  updateWorkspaceUserPin(id: string, action: GitpodServer.PinAction): Promise<void>;
132
134
  sendHeartBeat(options: GitpodServer.SendHeartBeatOptions): Promise<void>;
@@ -414,16 +416,20 @@ export namespace GitpodServer {
414
416
  export interface GetAccountStatementOptions {
415
417
  date?: string;
416
418
  }
417
- export interface CreateWorkspaceOptions {
419
+ export interface CreateWorkspaceOptions extends StartWorkspaceOptions {
418
420
  contextUrl: string;
421
+
419
422
  // whether running workspaces on the same context should be ignored. If false (default) users will be asked.
420
423
  ignoreRunningWorkspaceOnSameCommit?: boolean;
421
424
  ignoreRunningPrebuild?: boolean;
422
425
  allowUsingPreviousPrebuilds?: boolean;
423
426
  forceDefaultConfig?: boolean;
424
427
  }
428
+
425
429
  export interface StartWorkspaceOptions {
426
- forceDefaultImage: boolean;
430
+ forceDefaultImage?: boolean;
431
+ workspaceClass?: string;
432
+ ideSettings?: IDESettings;
427
433
  }
428
434
  export interface TakeSnapshotOptions {
429
435
  workspaceId: string;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  export enum HeadlessWorkspaceEventType {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { Event } from "./util/event";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2021 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  /**
@@ -36,6 +36,14 @@ export interface IDEOptions {
36
36
  clients?: { [id: string]: IDEClient };
37
37
  }
38
38
 
39
+ export namespace IDEOptions {
40
+ export function asArray(options: IDEOptions): (IDEOption & { id: string })[] {
41
+ return Object.keys(options.options)
42
+ .map((id) => ({ ...options.options[id], id }))
43
+ .sort((a, b) => (a.orderKey || "").localeCompare(b.orderKey || ""));
44
+ }
45
+ }
46
+
39
47
  export interface IDEClient {
40
48
  /**
41
49
  * The default desktop IDE when the user has not specified one.
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  export * from "./protocol";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2022 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { v4 as uuidv4 } from "uuid";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  export interface LicenseValidationResult {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { Message } from "vscode-jsonrpc/lib/messages";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2021 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { injectable } from "inversify";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  export namespace ErrorCodes {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2021 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  export interface OssAllowList {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2021 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  export namespace PaymentProtocol {
package/src/permission.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  // see below for explanation
package/src/plans.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2021 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  export type Currency = "USD" | "EUR";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { suite, test } from "mocha-typescript";
package/src/protocol.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { WorkspaceInstance, PortVisibility } from "./workspace-instance";
@@ -255,8 +255,8 @@ export type IDESettings = {
255
255
  };
256
256
 
257
257
  export interface WorkspaceClasses {
258
- regular: string;
259
- prebuild: string;
258
+ regular?: string;
259
+ prebuild?: string;
260
260
  }
261
261
 
262
262
  export interface UserPlatform {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { suite, test } from "mocha-typescript";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2021 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  export interface SnapshotUrl {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2021 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { v4 as uuidv4 } from "uuid";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2021 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { PrebuiltWorkspaceState, WorkspaceClasses } from "./protocol";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  interface Window {
package/src/usage.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2022 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { WorkspaceType } from "./protocol";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2021 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import Analytics = require("analytics-node");
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  // Use asyncIterators with es2015
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { Disposable } from "./disposable";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  export function formatDate(date?: string) {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2021 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import * as http from "http";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  export class Deferred<T> {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { repeat } from "./repeat";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { suite, test } from "mocha-typescript";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import randomNumber = require("random-number-csprng");
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2021 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
  import * as cookie from "cookie";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import * as chai from "chai";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  const URL = require("url").URL || window.URL;
@@ -21,6 +21,12 @@ const workspaceIDRegex = RegExp(`^${baseWorkspaceIDRegex}$`);
21
21
  // this pattern matches URL prefixes of workspaces
22
22
  const workspaceUrlPrefixRegex = RegExp(`^([0-9]{4,6}-)?${baseWorkspaceIDRegex}\\.`);
23
23
 
24
+ export namespace StartOptions {
25
+ export const WORKSPACE_CLASS = "workspaceClass";
26
+ export const EDITOR = "editor";
27
+ export const USE_LATEST_EDITOR = "useLatestEditor";
28
+ }
29
+
24
30
  export class GitpodHostUrl {
25
31
  readonly url: URL;
26
32
 
@@ -93,6 +99,10 @@ export class GitpodHostUrl {
93
99
  return this.with((url) => ({ pathname: "/" }));
94
100
  }
95
101
 
102
+ asBilling(): GitpodHostUrl {
103
+ return this.with((url) => ({ pathname: "/billing" }));
104
+ }
105
+
96
106
  asLogin(): GitpodHostUrl {
97
107
  return this.with((url) => ({ pathname: "/login" }));
98
108
  }
@@ -120,6 +130,31 @@ export class GitpodHostUrl {
120
130
  });
121
131
  }
122
132
 
133
+ asCreateWorkspace(
134
+ contextUrl: string,
135
+ o?: {
136
+ workspaceClass?: string;
137
+ editor?: string;
138
+ useLatestEditor?: boolean;
139
+ },
140
+ ): GitpodHostUrl {
141
+ const searchParams: URLSearchParams = new URLSearchParams();
142
+ if (o?.workspaceClass && o?.workspaceClass.length > 0) {
143
+ searchParams.append(StartOptions.WORKSPACE_CLASS, o.workspaceClass);
144
+ }
145
+ if (o?.editor && o?.editor?.length > 0) {
146
+ searchParams.append(StartOptions.EDITOR, o.editor);
147
+ }
148
+ if (o?.useLatestEditor !== undefined) {
149
+ searchParams.append(StartOptions.USE_LATEST_EDITOR, o.useLatestEditor.toString());
150
+ }
151
+ return this.withoutWorkspacePrefix().with({
152
+ pathname: "/",
153
+ search: searchParams.toString(),
154
+ hash: "#" + contextUrl,
155
+ });
156
+ }
157
+
123
158
  asWorkspaceAuth(instanceID: string, redirect?: boolean): GitpodHostUrl {
124
159
  return this.with((url) => ({
125
160
  pathname: `/api/auth/workspace-cookie/${instanceID}`,
package/src/util/grpc.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2021 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import * as grpc from "@grpc/grpc-js";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { opentracing } from "jaeger-client";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2021 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { suite, test } from "mocha-typescript";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  const inspect: (object: any) => string = require("util").inspect; // undefined in frontend
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  function isOpenNewTab(event: MouseEvent): boolean {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2022 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { isAbortError } from "abort-controller-x";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import * as chai from "chai";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  const REGEX_WORKSPACE_ID = /[0-9a-z]{2,16}-[0-9a-z]{2,16}-[0-9a-z]{8,11}/;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { suite, test, slow, timeout } from "mocha-typescript";
package/src/util/queue.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { Deferred } from "./deferred";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2021 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  import { Disposable } from "..";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  export class Semaphore {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
3
3
  * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
4
+ * See License.AGPL.txt in the project root for license information.
5
5
  */
6
6
 
7
7
  /**