@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.
- package/data/gitpod-schema.json +44 -129
- package/lib/accounting-protocol.d.ts +1 -0
- package/lib/accounting-protocol.d.ts.map +1 -1
- package/lib/accounting-protocol.js +4 -0
- package/lib/accounting-protocol.js.map +1 -1
- 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/billing-mode.d.ts +40 -0
- package/lib/billing-mode.d.ts.map +1 -0
- package/lib/billing-mode.js +36 -0
- package/lib/billing-mode.js.map +1 -0
- package/lib/experiments/configcat-server.d.ts +2 -0
- package/lib/experiments/configcat-server.d.ts.map +1 -1
- package/lib/experiments/configcat-server.js +2 -1
- package/lib/experiments/configcat-server.js.map +1 -1
- package/lib/gitpod-service.d.ts +19 -4
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js.map +1 -1
- package/lib/ide-protocol.d.ts +8 -0
- package/lib/ide-protocol.d.ts.map +1 -1
- package/lib/messaging/client-call-metrics.d.ts +1 -17
- package/lib/messaging/client-call-metrics.d.ts.map +1 -1
- package/lib/messaging/client-call-metrics.js +1 -2
- package/lib/messaging/client-call-metrics.js.map +1 -1
- package/lib/messaging/error.d.ts +4 -1
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +9 -3
- package/lib/messaging/error.js.map +1 -1
- package/lib/plans.d.ts +1 -0
- package/lib/plans.d.ts.map +1 -1
- package/lib/plans.js +4 -0
- package/lib/plans.js.map +1 -1
- package/lib/protocol.d.ts +17 -2
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +15 -2
- package/lib/protocol.js.map +1 -1
- package/lib/team-subscription-protocol.d.ts +1 -0
- package/lib/team-subscription-protocol.d.ts.map +1 -1
- package/lib/team-subscription-protocol.js +4 -0
- package/lib/team-subscription-protocol.js.map +1 -1
- package/lib/usage.d.ts +50 -10
- package/lib/usage.d.ts.map +1 -1
- package/lib/usage.js +6 -107
- package/lib/usage.js.map +1 -1
- package/lib/util/garbage-collected-cache.d.ts.map +1 -1
- package/lib/util/garbage-collected-cache.js +5 -0
- package/lib/util/garbage-collected-cache.js.map +1 -1
- package/lib/util/gitpod-host-url.d.ts +3 -0
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +18 -0
- package/lib/util/gitpod-host-url.js.map +1 -1
- package/lib/util/grpc.d.ts +19 -0
- package/lib/util/grpc.d.ts.map +1 -1
- package/lib/util/grpc.js +73 -1
- package/lib/util/grpc.js.map +1 -1
- package/lib/util/logging.spec.d.ts +7 -0
- package/lib/util/logging.spec.d.ts.map +1 -0
- package/lib/util/logging.spec.js +52 -0
- package/lib/util/logging.spec.js.map +1 -0
- package/lib/util/timeutil.d.ts +1 -0
- package/lib/util/timeutil.d.ts.map +1 -1
- package/lib/util/timeutil.js +7 -1
- package/lib/util/timeutil.js.map +1 -1
- package/lib/util/timeutil.spec.d.ts +1 -0
- package/lib/util/timeutil.spec.d.ts.map +1 -1
- package/lib/util/timeutil.spec.js +10 -0
- package/lib/util/timeutil.spec.js.map +1 -1
- package/lib/workspace-class.d.ts +14 -0
- package/lib/workspace-class.d.ts.map +1 -0
- package/lib/workspace-class.js +8 -0
- package/lib/workspace-class.js.map +1 -0
- package/lib/workspace-instance.d.ts +1 -0
- package/lib/workspace-instance.d.ts.map +1 -1
- package/lib/wsready.d.ts +3 -3
- package/lib/wsready.d.ts.map +1 -1
- package/lib/wsready.js +0 -2
- package/lib/wsready.js.map +1 -1
- package/package.json +5 -2
- package/pkg-yarn.lock +3 -2
- package/provenance-bundle.jsonl +1 -1
- package/src/accounting-protocol.ts +3 -0
- package/src/admin-protocol.ts +4 -1
- package/src/billing-mode.ts +67 -0
- package/src/experiments/configcat-server.ts +3 -0
- package/src/gitpod-service.ts +23 -4
- package/src/ide-protocol.ts +10 -0
- package/src/messaging/client-call-metrics.ts +1 -20
- package/src/messaging/error.ts +13 -4
- package/src/plans.ts +4 -0
- package/src/protocol.ts +36 -4
- package/src/team-subscription-protocol.ts +3 -0
- package/src/usage.ts +54 -128
- package/src/util/garbage-collected-cache.ts +5 -0
- package/src/util/gitpod-host-url.ts +21 -0
- package/src/util/grpc.ts +89 -0
- package/src/util/logging.spec.ts +23 -0
- package/src/util/timeutil.spec.ts +7 -1
- package/src/util/timeutil.ts +6 -0
- package/src/workspace-class.ts +14 -0
- package/src/workspace-instance.ts +3 -0
- 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
|
package/src/util/timeutil.ts
CHANGED
|
@@ -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-
|
|
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
|
-
}
|