@gitpod/gitpod-protocol 0.1.5-sje-kots-node-reqs.1 → 0.1.5-sje-installer-proxy-config-backup.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.
Files changed (102) hide show
  1. package/data/gitpod-schema.json +44 -129
  2. package/lib/accounting-protocol.d.ts +1 -0
  3. package/lib/accounting-protocol.d.ts.map +1 -1
  4. package/lib/accounting-protocol.js +4 -0
  5. package/lib/accounting-protocol.js.map +1 -1
  6. package/lib/admin-protocol.d.ts +4 -1
  7. package/lib/admin-protocol.d.ts.map +1 -1
  8. package/lib/admin-protocol.js.map +1 -1
  9. package/lib/billing-mode.d.ts +40 -0
  10. package/lib/billing-mode.d.ts.map +1 -0
  11. package/lib/billing-mode.js +36 -0
  12. package/lib/billing-mode.js.map +1 -0
  13. package/lib/experiments/configcat-server.d.ts +2 -0
  14. package/lib/experiments/configcat-server.d.ts.map +1 -1
  15. package/lib/experiments/configcat-server.js +2 -1
  16. package/lib/experiments/configcat-server.js.map +1 -1
  17. package/lib/gitpod-service.d.ts +19 -4
  18. package/lib/gitpod-service.d.ts.map +1 -1
  19. package/lib/gitpod-service.js.map +1 -1
  20. package/lib/ide-protocol.d.ts +8 -0
  21. package/lib/ide-protocol.d.ts.map +1 -1
  22. package/lib/messaging/client-call-metrics.d.ts +1 -17
  23. package/lib/messaging/client-call-metrics.d.ts.map +1 -1
  24. package/lib/messaging/client-call-metrics.js +1 -2
  25. package/lib/messaging/client-call-metrics.js.map +1 -1
  26. package/lib/messaging/error.d.ts +4 -1
  27. package/lib/messaging/error.d.ts.map +1 -1
  28. package/lib/messaging/error.js +9 -3
  29. package/lib/messaging/error.js.map +1 -1
  30. package/lib/plans.d.ts +1 -0
  31. package/lib/plans.d.ts.map +1 -1
  32. package/lib/plans.js +4 -0
  33. package/lib/plans.js.map +1 -1
  34. package/lib/protocol.d.ts +17 -2
  35. package/lib/protocol.d.ts.map +1 -1
  36. package/lib/protocol.js +15 -2
  37. package/lib/protocol.js.map +1 -1
  38. package/lib/team-subscription-protocol.d.ts +1 -0
  39. package/lib/team-subscription-protocol.d.ts.map +1 -1
  40. package/lib/team-subscription-protocol.js +4 -0
  41. package/lib/team-subscription-protocol.js.map +1 -1
  42. package/lib/usage.d.ts +50 -10
  43. package/lib/usage.d.ts.map +1 -1
  44. package/lib/usage.js +6 -107
  45. package/lib/usage.js.map +1 -1
  46. package/lib/util/garbage-collected-cache.d.ts.map +1 -1
  47. package/lib/util/garbage-collected-cache.js +5 -0
  48. package/lib/util/garbage-collected-cache.js.map +1 -1
  49. package/lib/util/gitpod-host-url.d.ts +3 -0
  50. package/lib/util/gitpod-host-url.d.ts.map +1 -1
  51. package/lib/util/gitpod-host-url.js +18 -0
  52. package/lib/util/gitpod-host-url.js.map +1 -1
  53. package/lib/util/grpc.d.ts +19 -0
  54. package/lib/util/grpc.d.ts.map +1 -1
  55. package/lib/util/grpc.js +73 -1
  56. package/lib/util/grpc.js.map +1 -1
  57. package/lib/util/logging.spec.d.ts +7 -0
  58. package/lib/util/logging.spec.d.ts.map +1 -0
  59. package/lib/util/logging.spec.js +52 -0
  60. package/lib/util/logging.spec.js.map +1 -0
  61. package/lib/util/timeutil.d.ts +1 -0
  62. package/lib/util/timeutil.d.ts.map +1 -1
  63. package/lib/util/timeutil.js +7 -1
  64. package/lib/util/timeutil.js.map +1 -1
  65. package/lib/util/timeutil.spec.d.ts +1 -0
  66. package/lib/util/timeutil.spec.d.ts.map +1 -1
  67. package/lib/util/timeutil.spec.js +10 -0
  68. package/lib/util/timeutil.spec.js.map +1 -1
  69. package/lib/workspace-class.d.ts +14 -0
  70. package/lib/workspace-class.d.ts.map +1 -0
  71. package/lib/workspace-class.js +8 -0
  72. package/lib/workspace-class.js.map +1 -0
  73. package/lib/workspace-instance.d.ts +1 -0
  74. package/lib/workspace-instance.d.ts.map +1 -1
  75. package/lib/wsready.d.ts +3 -3
  76. package/lib/wsready.d.ts.map +1 -1
  77. package/lib/wsready.js +0 -2
  78. package/lib/wsready.js.map +1 -1
  79. package/package.json +5 -2
  80. package/pkg-yarn.lock +3 -2
  81. package/provenance-bundle.jsonl +1 -1
  82. package/src/accounting-protocol.ts +3 -0
  83. package/src/admin-protocol.ts +4 -1
  84. package/src/billing-mode.ts +67 -0
  85. package/src/experiments/configcat-server.ts +3 -0
  86. package/src/gitpod-service.ts +23 -4
  87. package/src/ide-protocol.ts +10 -0
  88. package/src/messaging/client-call-metrics.ts +1 -20
  89. package/src/messaging/error.ts +13 -4
  90. package/src/plans.ts +4 -0
  91. package/src/protocol.ts +36 -4
  92. package/src/team-subscription-protocol.ts +3 -0
  93. package/src/usage.ts +54 -128
  94. package/src/util/garbage-collected-cache.ts +5 -0
  95. package/src/util/gitpod-host-url.ts +21 -0
  96. package/src/util/grpc.ts +89 -0
  97. package/src/util/logging.spec.ts +23 -0
  98. package/src/util/timeutil.spec.ts +7 -1
  99. package/src/util/timeutil.ts +6 -0
  100. package/src/workspace-class.ts +14 -0
  101. package/src/workspace-instance.ts +3 -0
  102. package/src/wsready.ts +5 -4
@@ -7,10 +7,16 @@
7
7
  import * as chai from "chai";
8
8
  const expect = chai.expect;
9
9
  import { suite, test } from "mocha-typescript";
10
- import { oneMonthLater } from "./timeutil";
10
+ import { daysBefore, hoursBefore, oneMonthLater } from "./timeutil";
11
11
 
12
12
  @suite()
13
13
  export class TimeutilSpec {
14
+ @test
15
+ testDaysBefore() {
16
+ const now = new Date().toISOString();
17
+ expect(daysBefore(now, 2)).to.be.eq(hoursBefore(now, 48));
18
+ }
19
+
14
20
  @test
15
21
  testTimeutil() {
16
22
  // targeting a 1st, 1th of Jan => 1st of Feb
@@ -47,6 +47,12 @@ export const orderAsc = (d1: string, d2: string): number => liftDate(d1, d2, (d1
47
47
  export const liftDate1 = <T>(d1: string, f: (d1: Date) => T): T => f(new Date(d1));
48
48
  export const liftDate = <T>(d1: string, d2: string, f: (d1: Date, d2: Date) => T): T => f(new Date(d1), new Date(d2));
49
49
 
50
+ export function daysBefore(date: string, days: number): string {
51
+ const result = new Date(date);
52
+ result.setDate(result.getDate() - days);
53
+ return result.toISOString();
54
+ }
55
+
50
56
  export function hoursBefore(date: string, hours: number): string {
51
57
  const result = new Date(date);
52
58
  result.setHours(result.getHours() - hours);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Copyright (c) 2022 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 SupportedWorkspaceClass {
8
+ id: string;
9
+ category: string;
10
+ displayName: string;
11
+ description: string;
12
+ powerups: number;
13
+ isSelected: boolean;
14
+ }
@@ -246,6 +246,9 @@ export interface WorkspaceInstanceConfiguration {
246
246
  // desktopIdeImage is the ref of the desktop IDE image this instance uses.
247
247
  desktopIdeImage?: string;
248
248
 
249
+ // desktopIdePluginImage is the ref of the desktop IDE plugin image this instance uses.
250
+ desktopIdePluginImage?: string;
251
+
249
252
  // supervisorImage is the ref of the supervisor image this instance uses.
250
253
  supervisorImage?: string;
251
254
 
package/src/wsready.ts CHANGED
@@ -4,14 +4,15 @@
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-05-18 18:19:49.011672619 +0000 UTC m=+0.006607361
7
+ // generated using github.com/32leaves/bel on 2022-07-21 07:41:48.081573085 +0000 UTC m=+0.009109470
8
8
  // DO NOT MODIFY
9
9
 
10
+ export interface WorkspaceReadyMessage {
11
+ source: WorkspaceInitSource;
12
+ }
13
+
10
14
  export enum WorkspaceInitSource {
11
15
  WorkspaceInitFromBackup = "from-backup",
12
16
  WorkspaceInitFromPrebuild = "from-prebuild",
13
17
  WorkspaceInitFromOther = "from-other",
14
18
  }
15
- export interface WorkspaceReadyMessage {
16
- source: WorkspaceInitSource;
17
- }