@gitpod/gitpod-protocol 0.1.5-mp-usage-list-workspaces.18 → 0.1.5-mp-server-experiments.8
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/experiments/always-default.d.ts +8 -0
- package/lib/experiments/always-default.d.ts.map +1 -0
- package/lib/experiments/always-default.js +20 -0
- package/lib/experiments/always-default.js.map +1 -0
- package/lib/experiments/configcat-server.d.ts +8 -0
- package/lib/experiments/configcat-server.d.ts.map +1 -0
- package/lib/experiments/configcat-server.js +33 -0
- package/lib/experiments/configcat-server.js.map +1 -0
- package/lib/experiments/configcat.d.ts +21 -0
- package/lib/experiments/configcat.d.ts.map +1 -0
- package/lib/experiments/configcat.js +47 -0
- package/lib/experiments/configcat.js.map +1 -0
- package/lib/experiments/types.d.ts +19 -0
- package/lib/experiments/types.d.ts.map +1 -0
- package/lib/experiments/types.js +8 -0
- package/lib/experiments/types.js.map +1 -0
- package/lib/gitpod-service.d.ts +6 -4
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.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 -0
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +1 -1
- package/lib/protocol.js.map +1 -1
- package/lib/teams-projects-protocol.d.ts +1 -0
- package/lib/teams-projects-protocol.d.ts.map +1 -1
- package/lib/teams-projects-protocol.js.map +1 -1
- package/lib/util/debug-app.d.ts +25 -0
- package/lib/util/debug-app.d.ts.map +1 -0
- package/lib/util/debug-app.js +100 -0
- package/lib/util/debug-app.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/workspace-instance.d.ts +6 -0
- package/lib/workspace-instance.d.ts.map +1 -1
- package/package.json +9 -6
- package/pkg-yarn.lock +7 -5
- package/provenance-bundle.jsonl +1 -1
- package/src/experiments/always-default.ts +24 -0
- package/src/experiments/configcat-server.ts +36 -0
- package/src/experiments/configcat.ts +53 -0
- package/src/experiments/types.ts +32 -0
- package/src/gitpod-service.ts +6 -4
- package/src/messaging/error.ts +3 -0
- package/src/protocol.ts +4 -1
- package/src/teams-projects-protocol.ts +1 -0
- package/src/util/debug-app.ts +81 -0
- package/src/util/timeutil.ts +6 -0
- package/src/workspace-instance.ts +7 -0
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 hoursBefore(date: string, hours: number): string {
|
|
51
|
+
const result = new Date(date);
|
|
52
|
+
result.setHours(result.getHours() - hours);
|
|
53
|
+
return result.toISOString();
|
|
54
|
+
}
|
|
55
|
+
|
|
50
56
|
export function hoursLater(date: string, hours: number): string {
|
|
51
57
|
const result = new Date(date);
|
|
52
58
|
result.setHours(result.getHours() + hours);
|
|
@@ -62,6 +62,13 @@ export interface WorkspaceInstance {
|
|
|
62
62
|
* resources that are provided to the workspace.
|
|
63
63
|
*/
|
|
64
64
|
workspaceClass?: string;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Identifies the team to which this instance's runtime should be attributed to
|
|
68
|
+
* (e.g. for usage analytics or billing purposes).
|
|
69
|
+
* If unset, the usage should be attributed to the workspace's owner (ws.ownerId).
|
|
70
|
+
*/
|
|
71
|
+
attributedTeamId?: string;
|
|
65
72
|
}
|
|
66
73
|
|
|
67
74
|
// WorkspaceInstanceStatus describes the current state of a workspace instance
|