@gitpod/gitpod-protocol 0.1.5-tar-telemetry-settings-data.3 → 0.1.5-team-conns.1
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 +28 -2
- package/lib/accounting-protocol.d.ts +10 -10
- package/lib/accounting-protocol.d.ts.map +1 -1
- package/lib/accounting-protocol.js +22 -31
- package/lib/accounting-protocol.js.map +1 -1
- package/lib/admin-protocol.d.ts +4 -2
- package/lib/admin-protocol.d.ts.map +1 -1
- package/lib/admin-protocol.js.map +1 -1
- package/lib/analytics.d.ts +4 -5
- package/lib/analytics.d.ts.map +1 -1
- package/lib/analytics.js.map +1 -1
- package/lib/auth.d.ts.map +1 -1
- package/lib/connections.d.ts +14 -0
- package/lib/connections.d.ts.map +1 -0
- package/lib/{theia-plugins.js → connections.js} +2 -2
- package/lib/connections.js.map +1 -0
- package/lib/context-url.d.ts.map +1 -1
- package/lib/context-url.js +3 -3
- package/lib/context-url.js.map +1 -1
- package/lib/context-url.spec.d.ts.map +1 -1
- package/lib/context-url.spec.js +20 -5
- package/lib/context-url.spec.js.map +1 -1
- package/lib/email-protocol.d.ts +1 -1
- package/lib/email-protocol.d.ts.map +1 -1
- package/lib/email-protocol.js.map +1 -1
- package/lib/encryption/container-module.d.ts.map +1 -1
- package/lib/encryption/container-module.js +1 -1
- package/lib/encryption/container-module.js.map +1 -1
- package/lib/encryption/encryption-engine.d.ts.map +1 -1
- package/lib/encryption/encryption-engine.js +7 -7
- package/lib/encryption/encryption-engine.js.map +1 -1
- package/lib/encryption/encryption-engine.spec.d.ts.map +1 -1
- package/lib/encryption/encryption-engine.spec.js +2 -3
- package/lib/encryption/encryption-engine.spec.js.map +1 -1
- package/lib/encryption/encryption-service.d.ts.map +1 -1
- package/lib/encryption/encryption-service.js +1 -1
- package/lib/encryption/encryption-service.js.map +1 -1
- package/lib/encryption/key-provider.d.ts.map +1 -1
- package/lib/encryption/key-provider.js +7 -9
- package/lib/encryption/key-provider.js.map +1 -1
- package/lib/env.d.ts +1 -1
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +5 -5
- package/lib/env.js.map +1 -1
- package/lib/gitpod-file-parser.d.ts.map +1 -1
- package/lib/gitpod-file-parser.js +6 -6
- package/lib/gitpod-file-parser.js.map +1 -1
- package/lib/gitpod-file-parser.spec.js +42 -39
- package/lib/gitpod-file-parser.spec.js.map +1 -1
- package/lib/gitpod-service.d.ts +18 -24
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +21 -24
- package/lib/gitpod-service.js.map +1 -1
- package/lib/headless-workspace-log.d.ts +1 -0
- package/lib/headless-workspace-log.d.ts.map +1 -1
- package/lib/headless-workspace-log.js +2 -1
- package/lib/headless-workspace-log.js.map +1 -1
- package/lib/ide-frontend-service.d.ts +1 -1
- package/lib/ide-protocol.d.ts +6 -6
- package/lib/ide-protocol.d.ts.map +1 -1
- package/lib/index.d.ts +17 -16
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/installation-admin-protocol.d.ts.map +1 -1
- package/lib/installation-admin-protocol.js +2 -2
- package/lib/installation-admin-protocol.js.map +1 -1
- package/lib/license-protocol.d.ts.map +1 -1
- package/lib/license-protocol.js.map +1 -1
- package/lib/messaging/browser/connection.d.ts +1 -1
- package/lib/messaging/browser/connection.d.ts.map +1 -1
- package/lib/messaging/browser/connection.js +19 -19
- package/lib/messaging/browser/connection.js.map +1 -1
- package/lib/messaging/browser/window-connection.d.ts +4 -4
- package/lib/messaging/browser/window-connection.d.ts.map +1 -1
- package/lib/messaging/browser/window-connection.js +9 -6
- package/lib/messaging/browser/window-connection.js.map +1 -1
- package/lib/messaging/client-call-metrics.d.ts +2 -2
- package/lib/messaging/client-call-metrics.d.ts.map +1 -1
- package/lib/messaging/client-call-metrics.js +20 -20
- package/lib/messaging/client-call-metrics.js.map +1 -1
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js.map +1 -1
- package/lib/messaging/handler.d.ts.map +1 -1
- package/lib/messaging/handler.js +1 -1
- package/lib/messaging/node/connection.js +8 -8
- package/lib/messaging/node/connection.js.map +1 -1
- package/lib/messaging/proxy-factory.d.ts +1 -1
- package/lib/messaging/proxy-factory.d.ts.map +1 -1
- package/lib/messaging/proxy-factory.js +7 -9
- package/lib/messaging/proxy-factory.js.map +1 -1
- package/lib/payment-protocol.d.ts.map +1 -1
- package/lib/payment-protocol.js +1 -1
- package/lib/payment-protocol.js.map +1 -1
- package/lib/permission.d.ts +2 -2
- package/lib/permission.d.ts.map +1 -1
- package/lib/permission.js +12 -23
- package/lib/permission.js.map +1 -1
- package/lib/plans.d.ts +3 -3
- package/lib/plans.d.ts.map +1 -1
- package/lib/plans.js +206 -171
- package/lib/plans.js.map +1 -1
- package/lib/protocol.d.ts +50 -37
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +81 -86
- package/lib/protocol.js.map +1 -1
- package/lib/snapshot-url.spec.js.map +1 -1
- package/lib/team-subscription-protocol.d.ts +5 -3
- package/lib/team-subscription-protocol.d.ts.map +1 -1
- package/lib/team-subscription-protocol.js +4 -4
- package/lib/team-subscription-protocol.js.map +1 -1
- package/lib/teams-projects-protocol.d.ts +3 -3
- package/lib/teams-projects-protocol.d.ts.map +1 -1
- package/lib/teams-projects-protocol.js +1 -1
- package/lib/teams-projects-protocol.js.map +1 -1
- package/lib/typings/globals.d.ts +2 -2
- package/lib/typings/globals.d.ts.map +1 -1
- package/lib/util/analytics.d.ts.map +1 -1
- package/lib/util/analytics.js +12 -3
- package/lib/util/analytics.js.map +1 -1
- package/lib/util/async-iterator.d.ts.map +1 -1
- package/lib/util/async-iterator.js +3 -3
- package/lib/util/async-iterator.js.map +1 -1
- package/lib/util/cancelable.js.map +1 -1
- package/lib/util/date-time.js +6 -6
- package/lib/util/date-time.js.map +1 -1
- package/lib/util/deferred.js.map +1 -1
- package/lib/util/disposable.d.ts.map +1 -1
- package/lib/util/disposable.js +2 -2
- package/lib/util/disposable.js.map +1 -1
- package/lib/util/event.d.ts.map +1 -1
- package/lib/util/event.js +5 -3
- package/lib/util/event.js.map +1 -1
- package/lib/util/garbage-collected-cache.d.ts.map +1 -1
- package/lib/util/garbage-collected-cache.js +1 -1
- package/lib/util/garbage-collected-cache.js.map +1 -1
- package/lib/util/generate-workspace-id.d.ts.map +1 -1
- package/lib/util/generate-workspace-id.js +435 -435
- package/lib/util/generate-workspace-id.js.map +1 -1
- package/lib/util/generate-workspace-id.spec.js +10 -6
- package/lib/util/generate-workspace-id.spec.js.map +1 -1
- package/lib/util/gitpod-cookie.d.ts +1 -1
- package/lib/util/gitpod-cookie.d.ts.map +1 -1
- package/lib/util/gitpod-cookie.js +0 -3
- package/lib/util/gitpod-cookie.js.map +1 -1
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +31 -29
- package/lib/util/gitpod-host-url.js.map +1 -1
- package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.spec.js +15 -5
- package/lib/util/gitpod-host-url.spec.js.map +1 -1
- package/lib/util/grpc.d.ts.map +1 -1
- package/lib/util/grpc.js.map +1 -1
- package/lib/util/jaeger-client-types.d.ts.map +1 -1
- package/lib/util/logging.d.ts +1 -1
- package/lib/util/logging.d.ts.map +1 -1
- package/lib/util/logging.js +22 -23
- package/lib/util/logging.js.map +1 -1
- package/lib/util/make-link.js +5 -5
- package/lib/util/make-link.js.map +1 -1
- package/lib/util/parse-workspace-id.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.js +1 -2
- package/lib/util/parse-workspace-id.js.map +1 -1
- package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.spec.js.map +1 -1
- package/lib/util/queue.spec.js +9 -6
- package/lib/util/queue.spec.js.map +1 -1
- package/lib/util/semaphore.d.ts.map +1 -1
- package/lib/util/semaphore.js.map +1 -1
- package/lib/util/skip-if.d.ts.map +1 -1
- package/lib/util/skip-if.js.map +1 -1
- package/lib/util/timeutil.d.ts.map +1 -1
- package/lib/util/timeutil.js +2 -2
- package/lib/util/timeutil.js.map +1 -1
- package/lib/util/timeutil.spec.d.ts.map +1 -1
- package/lib/util/timeutil.spec.js.map +1 -1
- package/lib/util/tracing.d.ts +6 -6
- package/lib/util/tracing.d.ts.map +1 -1
- package/lib/util/tracing.js +6 -6
- package/lib/util/tracing.js.map +1 -1
- package/lib/util/tracing.spec.js +3 -3
- package/lib/util/tracing.spec.js.map +1 -1
- package/lib/util/workspace-port-authentication.d.ts +7 -7
- package/lib/util/workspace-port-authentication.d.ts.map +1 -1
- package/lib/util/workspace-port-authentication.js +8 -11
- package/lib/util/workspace-port-authentication.js.map +1 -1
- package/lib/workspace-cluster.d.ts +1 -1
- package/lib/workspace-cluster.d.ts.map +1 -1
- package/lib/workspace-cluster.js +2 -4
- package/lib/workspace-cluster.js.map +1 -1
- package/lib/workspace-instance.d.ts +2 -2
- package/lib/workspace-instance.d.ts.map +1 -1
- package/lib/wsready.d.ts +1 -1
- package/lib/wsready.d.ts.map +1 -1
- package/lib/wsready.js +2 -2
- package/package.json +2 -2
- package/pkg-yarn.lock +2 -2
- package/provenance-bundle.jsonl +1 -1
- package/src/accounting-protocol.ts +53 -51
- package/src/admin-protocol.ts +25 -21
- package/src/analytics.ts +26 -28
- package/src/auth.ts +2 -2
- package/src/connections.ts +16 -0
- package/src/context-url.spec.ts +25 -11
- package/src/context-url.ts +80 -78
- package/src/email-protocol.ts +5 -6
- package/src/encryption/container-module.ts +2 -3
- package/src/encryption/encryption-engine.spec.ts +9 -8
- package/src/encryption/encryption-engine.ts +14 -14
- package/src/encryption/encryption-service.ts +4 -5
- package/src/encryption/key-provider.ts +16 -19
- package/src/env.ts +9 -9
- package/src/gitpod-file-parser.spec.ts +55 -61
- package/src/gitpod-file-parser.ts +16 -17
- package/src/gitpod-service.ts +119 -101
- package/src/headless-workspace-log.ts +6 -4
- package/src/ide-frontend-service.ts +2 -2
- package/src/ide-protocol.ts +8 -8
- package/src/index.ts +17 -16
- package/src/installation-admin-protocol.ts +8 -8
- package/src/license-protocol.ts +5 -6
- package/src/messaging/browser/connection.ts +45 -47
- package/src/messaging/browser/window-connection.ts +39 -29
- package/src/messaging/client-call-metrics.ts +70 -71
- package/src/messaging/error.ts +1 -3
- package/src/messaging/handler.ts +6 -6
- package/src/messaging/node/connection.ts +8 -8
- package/src/messaging/proxy-factory.ts +23 -30
- package/src/oss-allowlist.ts +3 -3
- package/src/payment-protocol.ts +2 -2
- package/src/permission.ts +20 -31
- package/src/plans.ts +236 -189
- package/src/protocol.ts +232 -239
- package/src/snapshot-url.spec.ts +9 -7
- package/src/team-subscription-protocol.ts +33 -23
- package/src/teams-projects-protocol.ts +8 -8
- package/src/typings/globals.ts +4 -4
- package/src/util/analytics.ts +46 -24
- package/src/util/async-iterator.ts +4 -5
- package/src/util/cancelable.ts +3 -3
- package/src/util/date-time.ts +8 -8
- package/src/util/deferred.ts +6 -6
- package/src/util/disposable.ts +3 -6
- package/src/util/event.ts +9 -11
- package/src/util/garbage-collected-cache.ts +3 -6
- package/src/util/generate-workspace-id.spec.ts +18 -15
- package/src/util/generate-workspace-id.ts +453 -453
- package/src/util/gitpod-cookie.ts +8 -9
- package/src/util/gitpod-host-url.spec.ts +40 -13
- package/src/util/gitpod-host-url.ts +37 -34
- package/src/util/grpc.ts +1 -1
- package/src/util/jaeger-client-types.ts +2 -2
- package/src/util/logging.ts +49 -39
- package/src/util/make-link.ts +6 -7
- package/src/util/parse-workspace-id.spec.ts +17 -8
- package/src/util/parse-workspace-id.ts +5 -6
- package/src/util/queue.spec.ts +27 -25
- package/src/util/repeat.ts +1 -1
- package/src/util/semaphore.ts +4 -6
- package/src/util/skip-if.ts +9 -6
- package/src/util/timeutil.spec.ts +14 -15
- package/src/util/timeutil.ts +15 -11
- package/src/util/tracing.spec.ts +28 -23
- package/src/util/tracing.ts +46 -41
- package/src/util/workspace-port-authentication.ts +10 -13
- package/src/workspace-cluster.ts +15 -12
- package/src/workspace-instance.ts +27 -23
- package/src/wsready.ts +3 -3
- package/data/builtin-theia-plugins.json +0 -372
- package/lib/theia-plugins.d.ts +0 -11
- package/lib/theia-plugins.d.ts.map +0 -1
- package/lib/theia-plugins.js.map +0 -1
- package/src/theia-plugins.ts +0 -11
package/src/gitpod-service.ts
CHANGED
|
@@ -5,32 +5,53 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
|
-
User,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
User,
|
|
9
|
+
WorkspaceInfo,
|
|
10
|
+
WorkspaceCreationResult,
|
|
11
|
+
WorkspaceInstanceUser,
|
|
12
|
+
WhitelistedRepository,
|
|
13
|
+
WorkspaceImageBuild,
|
|
14
|
+
AuthProviderInfo,
|
|
15
|
+
CreateWorkspaceMode,
|
|
16
|
+
Token,
|
|
17
|
+
UserEnvVarValue,
|
|
18
|
+
Terms,
|
|
19
|
+
Configuration,
|
|
20
|
+
UserInfo,
|
|
21
|
+
GitpodTokenType,
|
|
22
|
+
GitpodToken,
|
|
23
|
+
AuthProviderEntry,
|
|
24
|
+
GuessGitTokenScopesParams,
|
|
25
|
+
GuessedGitTokenScopes,
|
|
26
|
+
ProjectEnvVar,
|
|
27
|
+
} from "./protocol";
|
|
14
28
|
import {
|
|
15
|
-
Team,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
29
|
+
Team,
|
|
30
|
+
TeamMemberInfo,
|
|
31
|
+
TeamMembershipInvite,
|
|
32
|
+
Project,
|
|
33
|
+
TeamMemberRole,
|
|
34
|
+
PrebuildWithStatus,
|
|
35
|
+
StartPrebuildResult,
|
|
36
|
+
PartialProject,
|
|
37
|
+
} from "./teams-projects-protocol";
|
|
38
|
+
import { JsonRpcProxy, JsonRpcServer } from "./messaging/proxy-factory";
|
|
39
|
+
import { Disposable, CancellationTokenSource } from "vscode-jsonrpc";
|
|
40
|
+
import { HeadlessLogUrls } from "./headless-workspace-log";
|
|
41
|
+
import { WorkspaceInstance, WorkspaceInstancePort, WorkspaceInstancePhase } from "./workspace-instance";
|
|
42
|
+
import { AdminServer } from "./admin-protocol";
|
|
43
|
+
import { GitpodHostUrl } from "./util/gitpod-host-url";
|
|
44
|
+
import { WebSocketConnectionProvider } from "./messaging/browser/connection";
|
|
45
|
+
import { PermissionName } from "./permission";
|
|
46
|
+
import { LicenseService } from "./license-protocol";
|
|
47
|
+
import { Emitter } from "./util/event";
|
|
48
|
+
import { AccountStatement, CreditAlert } from "./accounting-protocol";
|
|
49
|
+
import { GithubUpgradeURL, PlanCoupon } from "./payment-protocol";
|
|
50
|
+
import { TeamSubscription, TeamSubscriptionSlot, TeamSubscriptionSlotResolved } from "./team-subscription-protocol";
|
|
51
|
+
import { RemotePageMessage, RemoteTrackMessage, RemoteIdentifyMessage } from "./analytics";
|
|
52
|
+
import { IDEServer } from "./ide-protocol";
|
|
53
|
+
import { InstallationAdminSettings, TelemetryData } from "./installation-admin-protocol";
|
|
54
|
+
import { Connection } from "./connections";
|
|
34
55
|
|
|
35
56
|
export interface GitpodClient {
|
|
36
57
|
onInstanceUpdate(instance: WorkspaceInstance): void;
|
|
@@ -46,7 +67,7 @@ export interface GitpodClient {
|
|
|
46
67
|
//#endregion
|
|
47
68
|
}
|
|
48
69
|
|
|
49
|
-
export const GitpodServer = Symbol(
|
|
70
|
+
export const GitpodServer = Symbol("GitpodServer");
|
|
50
71
|
export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer, LicenseService, IDEServer {
|
|
51
72
|
// User related API
|
|
52
73
|
getLoggedInUser(): Promise<User>;
|
|
@@ -157,10 +178,11 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
|
|
|
157
178
|
setProjectEnvironmentVariable(projectId: string, name: string, value: string, censored: boolean): Promise<void>;
|
|
158
179
|
getProjectEnvironmentVariables(projectId: string): Promise<ProjectEnvVar[]>;
|
|
159
180
|
deleteProjectEnvironmentVariable(variableId: string): Promise<void>;
|
|
181
|
+
setProjectConnection(projectId: string, connection: Connection): Promise<void>;
|
|
160
182
|
|
|
161
183
|
// content service
|
|
162
|
-
getContentBlobUploadUrl(name: string): Promise<string
|
|
163
|
-
getContentBlobDownloadUrl(name: string): Promise<string
|
|
184
|
+
getContentBlobUploadUrl(name: string): Promise<string>;
|
|
185
|
+
getContentBlobDownloadUrl(name: string): Promise<string>;
|
|
164
186
|
|
|
165
187
|
// Gitpod token
|
|
166
188
|
getGitpodTokens(): Promise<GitpodToken[]>;
|
|
@@ -197,15 +219,6 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
|
|
|
197
219
|
*/
|
|
198
220
|
getLayout(workspaceId: string): Promise<string | undefined>;
|
|
199
221
|
|
|
200
|
-
/**
|
|
201
|
-
* @param params
|
|
202
|
-
* @returns promise resolves to an URL to be used for the upload
|
|
203
|
-
*/
|
|
204
|
-
preparePluginUpload(params: PreparePluginUploadParams): Promise<string>
|
|
205
|
-
resolvePlugins(workspaceId: string, params: ResolvePluginsParams): Promise<ResolvedPlugins>;
|
|
206
|
-
installUserPlugins(params: InstallPluginsParams): Promise<boolean>;
|
|
207
|
-
uninstallUserPlugin(params: UninstallPluginParams): Promise<boolean>;
|
|
208
|
-
|
|
209
222
|
guessGitTokenScopes(params: GuessGitTokenScopesParams): Promise<GuessedGitTokenScopes>;
|
|
210
223
|
|
|
211
224
|
/**
|
|
@@ -237,9 +250,13 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
|
|
|
237
250
|
|
|
238
251
|
tsGet(): Promise<TeamSubscription[]>;
|
|
239
252
|
tsGetSlots(): Promise<TeamSubscriptionSlotResolved[]>;
|
|
240
|
-
tsGetUnassignedSlot(teamSubscriptionId: string): Promise<TeamSubscriptionSlot | undefined
|
|
253
|
+
tsGetUnassignedSlot(teamSubscriptionId: string): Promise<TeamSubscriptionSlot | undefined>;
|
|
241
254
|
tsAddSlots(teamSubscriptionId: string, quantity: number): Promise<void>;
|
|
242
|
-
tsAssignSlot(
|
|
255
|
+
tsAssignSlot(
|
|
256
|
+
teamSubscriptionId: string,
|
|
257
|
+
teamSubscriptionSlotId: string,
|
|
258
|
+
identityStr: string | undefined,
|
|
259
|
+
): Promise<void>;
|
|
243
260
|
tsReassignSlot(teamSubscriptionId: string, teamSubscriptionSlotId: string, newIdentityStr: string): Promise<void>;
|
|
244
261
|
tsDeactivateSlot(teamSubscriptionId: string, teamSubscriptionSlotId: string): Promise<void>;
|
|
245
262
|
tsReactivateSlot(teamSubscriptionId: string, teamSubscriptionSlotId: string): Promise<void>;
|
|
@@ -255,13 +272,13 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
|
|
|
255
272
|
}
|
|
256
273
|
|
|
257
274
|
export interface RateLimiterError {
|
|
258
|
-
method?: string
|
|
275
|
+
method?: string;
|
|
259
276
|
|
|
260
277
|
/**
|
|
261
278
|
* Retry after this many seconds, earliest.
|
|
262
279
|
* cmp.: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After
|
|
263
280
|
*/
|
|
264
|
-
retryAfter: number
|
|
281
|
+
retryAfter: number;
|
|
265
282
|
}
|
|
266
283
|
|
|
267
284
|
export interface CreateProjectParams {
|
|
@@ -308,13 +325,17 @@ export interface ClientHeaderFields {
|
|
|
308
325
|
|
|
309
326
|
export const WorkspaceTimeoutValues = ["30m", "60m", "180m"] as const;
|
|
310
327
|
|
|
311
|
-
export const createServiceMock = function <C extends GitpodClient, S extends GitpodServer>(
|
|
328
|
+
export const createServiceMock = function <C extends GitpodClient, S extends GitpodServer>(
|
|
329
|
+
methods: Partial<JsonRpcProxy<S>>,
|
|
330
|
+
): GitpodServiceImpl<C, S> {
|
|
312
331
|
return new GitpodServiceImpl<C, S>(createServerMock(methods));
|
|
313
|
-
}
|
|
332
|
+
};
|
|
314
333
|
|
|
315
|
-
export const createServerMock = function <C extends GitpodClient, S extends GitpodServer>(
|
|
316
|
-
methods
|
|
317
|
-
|
|
334
|
+
export const createServerMock = function <C extends GitpodClient, S extends GitpodServer>(
|
|
335
|
+
methods: Partial<JsonRpcProxy<S>>,
|
|
336
|
+
): JsonRpcProxy<S> {
|
|
337
|
+
methods.setClient = methods.setClient || (() => {});
|
|
338
|
+
methods.dispose = methods.dispose || (() => {});
|
|
318
339
|
return new Proxy<JsonRpcProxy<S>>(methods as any as JsonRpcProxy<S>, {
|
|
319
340
|
// @ts-ignore
|
|
320
341
|
get: (target: S, property: keyof S) => {
|
|
@@ -323,25 +344,25 @@ export const createServerMock = function <C extends GitpodClient, S extends Gitp
|
|
|
323
344
|
throw new Error(`Method ${property} not implemented`);
|
|
324
345
|
}
|
|
325
346
|
return result;
|
|
326
|
-
}
|
|
347
|
+
},
|
|
327
348
|
});
|
|
328
|
-
}
|
|
349
|
+
};
|
|
329
350
|
|
|
330
351
|
type WorkspaceTimeoutDurationTuple = typeof WorkspaceTimeoutValues;
|
|
331
352
|
export type WorkspaceTimeoutDuration = WorkspaceTimeoutDurationTuple[number];
|
|
332
353
|
|
|
333
354
|
export interface SetWorkspaceTimeoutResult {
|
|
334
|
-
resetTimeoutOnWorkspaces: string[]
|
|
355
|
+
resetTimeoutOnWorkspaces: string[];
|
|
335
356
|
}
|
|
336
357
|
|
|
337
358
|
export interface GetWorkspaceTimeoutResult {
|
|
338
|
-
duration: WorkspaceTimeoutDuration
|
|
339
|
-
canChange: boolean
|
|
359
|
+
duration: WorkspaceTimeoutDuration;
|
|
360
|
+
canChange: boolean;
|
|
340
361
|
}
|
|
341
362
|
|
|
342
363
|
export interface StartWorkspaceResult {
|
|
343
|
-
instanceID: string
|
|
344
|
-
workspaceURL?: string
|
|
364
|
+
instanceID: string;
|
|
365
|
+
workspaceURL?: string;
|
|
345
366
|
}
|
|
346
367
|
|
|
347
368
|
export namespace GitpodServer {
|
|
@@ -385,23 +406,23 @@ export namespace GitpodServer {
|
|
|
385
406
|
readonly roundTripTime?: number;
|
|
386
407
|
}
|
|
387
408
|
export interface UpdateOwnAuthProviderParams {
|
|
388
|
-
readonly entry: AuthProviderEntry.UpdateEntry | AuthProviderEntry.NewEntry
|
|
409
|
+
readonly entry: AuthProviderEntry.UpdateEntry | AuthProviderEntry.NewEntry;
|
|
389
410
|
}
|
|
390
411
|
export interface DeleteOwnAuthProviderParams {
|
|
391
|
-
readonly id: string
|
|
412
|
+
readonly id: string;
|
|
392
413
|
}
|
|
393
414
|
export type AdmissionLevel = "owner" | "everyone";
|
|
394
415
|
export type PinAction = "pin" | "unpin" | "toggle";
|
|
395
416
|
export interface GenerateNewGitpodTokenOptions {
|
|
396
|
-
name?: string
|
|
397
|
-
type: GitpodTokenType
|
|
398
|
-
scopes?: string[]
|
|
417
|
+
name?: string;
|
|
418
|
+
type: GitpodTokenType;
|
|
419
|
+
scopes?: string[];
|
|
399
420
|
}
|
|
400
421
|
}
|
|
401
422
|
|
|
402
|
-
export const GitpodServerPath =
|
|
423
|
+
export const GitpodServerPath = "/gitpod";
|
|
403
424
|
|
|
404
|
-
export const GitpodServerProxy = Symbol(
|
|
425
|
+
export const GitpodServerProxy = Symbol("GitpodServerProxy");
|
|
405
426
|
export type GitpodServerProxy<S extends GitpodServer> = JsonRpcProxy<S>;
|
|
406
427
|
|
|
407
428
|
export class GitpodCompositeClient<Client extends GitpodClient> implements GitpodClient {
|
|
@@ -415,8 +436,8 @@ export class GitpodCompositeClient<Client extends GitpodClient> implements Gitpo
|
|
|
415
436
|
if (index > -1) {
|
|
416
437
|
this.clients.splice(index, 1);
|
|
417
438
|
}
|
|
418
|
-
}
|
|
419
|
-
}
|
|
439
|
+
},
|
|
440
|
+
};
|
|
420
441
|
}
|
|
421
442
|
|
|
422
443
|
onInstanceUpdate(instance: WorkspaceInstance): void {
|
|
@@ -425,7 +446,7 @@ export class GitpodCompositeClient<Client extends GitpodClient> implements Gitpo
|
|
|
425
446
|
try {
|
|
426
447
|
client.onInstanceUpdate(instance);
|
|
427
448
|
} catch (error) {
|
|
428
|
-
console.error(error)
|
|
449
|
+
console.error(error);
|
|
429
450
|
}
|
|
430
451
|
}
|
|
431
452
|
}
|
|
@@ -437,19 +458,22 @@ export class GitpodCompositeClient<Client extends GitpodClient> implements Gitpo
|
|
|
437
458
|
try {
|
|
438
459
|
client.onPrebuildUpdate(update);
|
|
439
460
|
} catch (error) {
|
|
440
|
-
console.error(error)
|
|
461
|
+
console.error(error);
|
|
441
462
|
}
|
|
442
463
|
}
|
|
443
464
|
}
|
|
444
465
|
}
|
|
445
466
|
|
|
446
|
-
onWorkspaceImageBuildLogs(
|
|
467
|
+
onWorkspaceImageBuildLogs(
|
|
468
|
+
info: WorkspaceImageBuild.StateInfo,
|
|
469
|
+
content: WorkspaceImageBuild.LogContent | undefined,
|
|
470
|
+
): void {
|
|
447
471
|
for (const client of this.clients) {
|
|
448
472
|
if (client.onWorkspaceImageBuildLogs) {
|
|
449
473
|
try {
|
|
450
474
|
client.onWorkspaceImageBuildLogs(info, content);
|
|
451
475
|
} catch (error) {
|
|
452
|
-
console.error(error)
|
|
476
|
+
console.error(error);
|
|
453
477
|
}
|
|
454
478
|
}
|
|
455
479
|
}
|
|
@@ -461,7 +485,7 @@ export class GitpodCompositeClient<Client extends GitpodClient> implements Gitpo
|
|
|
461
485
|
try {
|
|
462
486
|
client.notifyDidOpenConnection();
|
|
463
487
|
} catch (error) {
|
|
464
|
-
console.error(error)
|
|
488
|
+
console.error(error);
|
|
465
489
|
}
|
|
466
490
|
}
|
|
467
491
|
}
|
|
@@ -473,7 +497,7 @@ export class GitpodCompositeClient<Client extends GitpodClient> implements Gitpo
|
|
|
473
497
|
try {
|
|
474
498
|
client.notifyDidCloseConnection();
|
|
475
499
|
} catch (error) {
|
|
476
|
-
console.error(error)
|
|
500
|
+
console.error(error);
|
|
477
501
|
}
|
|
478
502
|
}
|
|
479
503
|
}
|
|
@@ -485,17 +509,16 @@ export class GitpodCompositeClient<Client extends GitpodClient> implements Gitpo
|
|
|
485
509
|
try {
|
|
486
510
|
client.onCreditAlert(creditAlert);
|
|
487
511
|
} catch (error) {
|
|
488
|
-
console.error(error)
|
|
512
|
+
console.error(error);
|
|
489
513
|
}
|
|
490
514
|
}
|
|
491
515
|
}
|
|
492
516
|
}
|
|
493
|
-
|
|
494
517
|
}
|
|
495
518
|
|
|
496
519
|
export type GitpodService = GitpodServiceImpl<GitpodClient, GitpodServer>;
|
|
497
520
|
|
|
498
|
-
const hasWindow =
|
|
521
|
+
const hasWindow = typeof window !== "undefined";
|
|
499
522
|
const phasesOrder: Record<WorkspaceInstancePhase, number> = {
|
|
500
523
|
unknown: 0,
|
|
501
524
|
preparing: 1,
|
|
@@ -505,44 +528,41 @@ const phasesOrder: Record<WorkspaceInstancePhase, number> = {
|
|
|
505
528
|
running: 5,
|
|
506
529
|
interrupted: 6,
|
|
507
530
|
stopping: 7,
|
|
508
|
-
stopped: 8
|
|
531
|
+
stopped: 8,
|
|
509
532
|
};
|
|
510
533
|
export class WorkspaceInstanceUpdateListener {
|
|
511
534
|
private readonly onDidChangeEmitter = new Emitter<void>();
|
|
512
535
|
readonly onDidChange = this.onDidChangeEmitter.event;
|
|
513
536
|
|
|
514
|
-
private source:
|
|
537
|
+
private source: "sync" | "update" = "sync";
|
|
515
538
|
|
|
516
539
|
get info(): WorkspaceInfo {
|
|
517
540
|
return this._info;
|
|
518
541
|
}
|
|
519
542
|
|
|
520
|
-
constructor(
|
|
521
|
-
private readonly service: GitpodService,
|
|
522
|
-
private _info: WorkspaceInfo
|
|
523
|
-
) {
|
|
543
|
+
constructor(private readonly service: GitpodService, private _info: WorkspaceInfo) {
|
|
524
544
|
service.registerClient({
|
|
525
|
-
onInstanceUpdate: instance => {
|
|
545
|
+
onInstanceUpdate: (instance) => {
|
|
526
546
|
if (this.isOutOfOrder(instance)) {
|
|
527
547
|
return;
|
|
528
548
|
}
|
|
529
549
|
this.cancelSync();
|
|
530
550
|
this._info.latestInstance = instance;
|
|
531
|
-
this.source =
|
|
551
|
+
this.source = "update";
|
|
532
552
|
this.onDidChangeEmitter.fire(undefined);
|
|
533
553
|
},
|
|
534
554
|
notifyDidOpenConnection: () => {
|
|
535
555
|
this.sync();
|
|
536
|
-
}
|
|
556
|
+
},
|
|
537
557
|
});
|
|
538
558
|
if (hasWindow) {
|
|
539
559
|
// learn about page lifecycle here: https://developers.google.com/web/updates/2018/07/page-lifecycle-api
|
|
540
|
-
window.document.addEventListener(
|
|
541
|
-
if (window.document.visibilityState ===
|
|
560
|
+
window.document.addEventListener("visibilitychange", async () => {
|
|
561
|
+
if (window.document.visibilityState === "visible") {
|
|
542
562
|
this.sync();
|
|
543
563
|
}
|
|
544
564
|
});
|
|
545
|
-
window.addEventListener(
|
|
565
|
+
window.addEventListener("pageshow", (e) => {
|
|
546
566
|
if (e.persisted) {
|
|
547
567
|
this.sync();
|
|
548
568
|
}
|
|
@@ -570,12 +590,12 @@ export class WorkspaceInstanceUpdateListener {
|
|
|
570
590
|
return;
|
|
571
591
|
}
|
|
572
592
|
this._info = info;
|
|
573
|
-
this.source =
|
|
593
|
+
this.source = "sync";
|
|
574
594
|
this.onDidChangeEmitter.fire(undefined);
|
|
575
595
|
} catch (e) {
|
|
576
|
-
console.error(
|
|
596
|
+
console.error("failed to sync workspace instance:", e);
|
|
577
597
|
}
|
|
578
|
-
})
|
|
598
|
+
});
|
|
579
599
|
}
|
|
580
600
|
private cancelSync(): void {
|
|
581
601
|
if (this.syncTokenSource) {
|
|
@@ -592,7 +612,7 @@ export class WorkspaceInstanceUpdateListener {
|
|
|
592
612
|
if (instance.workspaceId !== this._info.workspace.id) {
|
|
593
613
|
return true;
|
|
594
614
|
}
|
|
595
|
-
if (this.source ===
|
|
615
|
+
if (this.source === "update") {
|
|
596
616
|
return false;
|
|
597
617
|
}
|
|
598
618
|
if (instance.id !== this.info.latestInstance?.id) {
|
|
@@ -600,15 +620,13 @@ export class WorkspaceInstanceUpdateListener {
|
|
|
600
620
|
}
|
|
601
621
|
return phasesOrder[instance.status.phase] < phasesOrder[this.info.latestInstance.status.phase];
|
|
602
622
|
}
|
|
603
|
-
|
|
604
623
|
}
|
|
605
624
|
|
|
606
625
|
export interface GitpodServiceOptions {
|
|
607
|
-
onReconnect?: () =>
|
|
626
|
+
onReconnect?: () => void | Promise<void>;
|
|
608
627
|
}
|
|
609
628
|
|
|
610
629
|
export class GitpodServiceImpl<Client extends GitpodClient, Server extends GitpodServer> {
|
|
611
|
-
|
|
612
630
|
private readonly compositeClient = new GitpodCompositeClient<Client>();
|
|
613
631
|
|
|
614
632
|
constructor(public readonly server: JsonRpcProxy<Server>, private options?: GitpodServiceOptions) {
|
|
@@ -623,7 +641,8 @@ export class GitpodServiceImpl<Client extends GitpodClient, Server extends Gitpo
|
|
|
623
641
|
|
|
624
642
|
private readonly instanceListeners = new Map<string, Promise<WorkspaceInstanceUpdateListener>>();
|
|
625
643
|
listenToInstance(workspaceId: string): Promise<WorkspaceInstanceUpdateListener> {
|
|
626
|
-
const listener =
|
|
644
|
+
const listener =
|
|
645
|
+
this.instanceListeners.get(workspaceId) ||
|
|
627
646
|
(async () => {
|
|
628
647
|
const info = await this.server.getWorkspace(workspaceId);
|
|
629
648
|
return new WorkspaceInstanceUpdateListener(this, info);
|
|
@@ -639,26 +658,25 @@ export class GitpodServiceImpl<Client extends GitpodClient, Server extends Gitpo
|
|
|
639
658
|
}
|
|
640
659
|
}
|
|
641
660
|
|
|
642
|
-
export function createGitpodService<C extends GitpodClient, S extends GitpodServer>(
|
|
661
|
+
export function createGitpodService<C extends GitpodClient, S extends GitpodServer>(
|
|
662
|
+
serverUrl: string | Promise<string>,
|
|
663
|
+
) {
|
|
643
664
|
const toWsUrl = (serverUrl: string) => {
|
|
644
|
-
return new GitpodHostUrl(serverUrl)
|
|
645
|
-
.asWebsocket()
|
|
646
|
-
.withApi({ pathname: GitpodServerPath })
|
|
647
|
-
.toString();
|
|
665
|
+
return new GitpodHostUrl(serverUrl).asWebsocket().withApi({ pathname: GitpodServerPath }).toString();
|
|
648
666
|
};
|
|
649
667
|
let url: string | Promise<string>;
|
|
650
668
|
if (typeof serverUrl === "string") {
|
|
651
669
|
url = toWsUrl(serverUrl);
|
|
652
670
|
} else {
|
|
653
|
-
url = serverUrl.then(url => toWsUrl(url));
|
|
671
|
+
url = serverUrl.then((url) => toWsUrl(url));
|
|
654
672
|
}
|
|
655
673
|
|
|
656
674
|
const connectionProvider = new WebSocketConnectionProvider();
|
|
657
|
-
let onReconnect = () => {
|
|
675
|
+
let onReconnect = () => {};
|
|
658
676
|
const gitpodServer = connectionProvider.createProxy<S>(url, undefined, {
|
|
659
|
-
onListening: socket => {
|
|
677
|
+
onListening: (socket) => {
|
|
660
678
|
onReconnect = () => socket.reconnect();
|
|
661
|
-
}
|
|
679
|
+
},
|
|
662
680
|
});
|
|
663
681
|
return new GitpodServiceImpl<C, S>(gitpodServer, { onReconnect });
|
|
664
|
-
}
|
|
682
|
+
}
|
|
@@ -4,21 +4,23 @@
|
|
|
4
4
|
* See License-AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
export enum HeadlessWorkspaceEventType {
|
|
9
8
|
LogOutput = "log-output",
|
|
10
9
|
FinishedSuccessfully = "finish-success",
|
|
11
10
|
FinishedButFailed = "finish-fail",
|
|
12
11
|
AbortedTimedOut = "aborted-timeout",
|
|
13
12
|
Aborted = "aborted",
|
|
14
|
-
|
|
13
|
+
Failed = "failed",
|
|
14
|
+
Started = "started",
|
|
15
15
|
}
|
|
16
16
|
export namespace HeadlessWorkspaceEventType {
|
|
17
17
|
export function isRunning(t: HeadlessWorkspaceEventType) {
|
|
18
18
|
return t === HeadlessWorkspaceEventType.LogOutput;
|
|
19
19
|
}
|
|
20
20
|
export function didFinish(t: HeadlessWorkspaceEventType) {
|
|
21
|
-
return
|
|
21
|
+
return (
|
|
22
|
+
t === HeadlessWorkspaceEventType.FinishedButFailed || t === HeadlessWorkspaceEventType.FinishedSuccessfully
|
|
23
|
+
);
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
26
|
|
|
@@ -35,4 +37,4 @@ export interface HeadlessLogUrls {
|
|
|
35
37
|
|
|
36
38
|
/** cmp. @const HEADLESS_LOG_STREAM_STATUS_CODE_REGEX */
|
|
37
39
|
export const HEADLESS_LOG_STREAM_STATUS_CODE = "X-LogStream-StatusCode";
|
|
38
|
-
export const HEADLESS_LOG_STREAM_STATUS_CODE_REGEX = /X-LogStream-StatusCode: ([0-9]{3})/;
|
|
40
|
+
export const HEADLESS_LOG_STREAM_STATUS_CODE_REGEX = /X-LogStream-StatusCode: ([0-9]{3})/;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { Event } from "./util/event";
|
|
8
8
|
import { Disposable } from "./util/disposable";
|
|
9
9
|
|
|
10
|
-
export type IDEFrontendState =
|
|
10
|
+
export type IDEFrontendState = "init" | "ready" | "terminated";
|
|
11
11
|
|
|
12
12
|
export interface IDEFrontendService {
|
|
13
13
|
readonly state: IDEFrontendState;
|
|
@@ -25,4 +25,4 @@ export interface IDEFrontendService {
|
|
|
25
25
|
* confirmation dialogs for stopped workspaces.
|
|
26
26
|
*/
|
|
27
27
|
start(): Disposable;
|
|
28
|
-
}
|
|
28
|
+
}
|
package/src/ide-protocol.ts
CHANGED
|
@@ -45,12 +45,12 @@ export interface IDEClient {
|
|
|
45
45
|
/**
|
|
46
46
|
* Desktop IDEs supported by the client.
|
|
47
47
|
*/
|
|
48
|
-
desktopIDEs?: string[]
|
|
48
|
+
desktopIDEs?: string[];
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* Steps to install the client on user machine.
|
|
52
52
|
*/
|
|
53
|
-
installationSteps?: string[]
|
|
53
|
+
installationSteps?: string[];
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
export interface IDEOption {
|
|
@@ -67,12 +67,12 @@ export interface IDEOption {
|
|
|
67
67
|
/**
|
|
68
68
|
* The type of the IDE, currently 'browser' or 'desktop'.
|
|
69
69
|
*/
|
|
70
|
-
type:
|
|
70
|
+
type: "browser" | "desktop";
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
* The logo for the IDE. That could be a key in (see
|
|
74
|
+
* components/dashboard/src/images/ideLogos.ts) or a URL.
|
|
75
|
+
*/
|
|
76
76
|
logo: string;
|
|
77
77
|
|
|
78
78
|
/**
|
|
@@ -93,8 +93,8 @@ export interface IDEOption {
|
|
|
93
93
|
notes?: string[];
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
* If `true` this IDE option is not visible in the IDE preferences.
|
|
97
|
+
*/
|
|
98
98
|
hidden?: boolean;
|
|
99
99
|
|
|
100
100
|
/**
|
package/src/index.ts
CHANGED
|
@@ -4,19 +4,20 @@
|
|
|
4
4
|
* See License-AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
7
|
+
export * from "./protocol";
|
|
8
|
+
export * from "./gitpod-service";
|
|
9
|
+
export * from "./util/disposable";
|
|
10
|
+
export * from "./util/event";
|
|
11
|
+
export * from "./util/queue";
|
|
12
|
+
export * from "./license-protocol";
|
|
13
|
+
export * from "./workspace-instance";
|
|
14
|
+
export * from "./permission";
|
|
15
|
+
export * from "./admin-protocol";
|
|
16
|
+
export * from "./email-protocol";
|
|
17
|
+
export * from "./headless-workspace-log";
|
|
18
|
+
export * from "./context-url";
|
|
19
|
+
export * from "./teams-projects-protocol";
|
|
20
|
+
export * from "./snapshot-url";
|
|
21
|
+
export * from "./oss-allowlist";
|
|
22
|
+
export * from "./installation-admin-protocol";
|
|
23
|
+
export * from "./connections";
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
* See License-AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { v4 as uuidv4 } from
|
|
7
|
+
import { v4 as uuidv4 } from "uuid";
|
|
8
8
|
|
|
9
9
|
const InstallationAdminSettingsPrototype = {
|
|
10
|
-
sendTelemetry: true
|
|
11
|
-
}
|
|
10
|
+
sendTelemetry: true,
|
|
11
|
+
};
|
|
12
12
|
|
|
13
13
|
export type InstallationAdminSettings = typeof InstallationAdminSettingsPrototype;
|
|
14
14
|
|
|
@@ -24,10 +24,10 @@ export interface InstallationAdmin {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export interface TelemetryData {
|
|
27
|
-
installationAdmin: InstallationAdmin
|
|
28
|
-
totalUsers: number
|
|
29
|
-
totalWorkspaces: number
|
|
30
|
-
totalInstances: number
|
|
27
|
+
installationAdmin: InstallationAdmin;
|
|
28
|
+
totalUsers: number;
|
|
29
|
+
totalWorkspaces: number;
|
|
30
|
+
totalInstances: number;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export namespace InstallationAdmin {
|
|
@@ -36,7 +36,7 @@ export namespace InstallationAdmin {
|
|
|
36
36
|
id: uuidv4(),
|
|
37
37
|
settings: {
|
|
38
38
|
...InstallationAdminSettingsPrototype,
|
|
39
|
-
}
|
|
39
|
+
},
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
}
|
package/src/license-protocol.ts
CHANGED
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
* See License-AGPL.txt in the project root for license information.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
export interface LicenseValidationResult {
|
|
9
|
-
valid: boolean
|
|
10
|
-
msg?: string
|
|
11
|
-
issue?: LicenseIssue
|
|
8
|
+
valid: boolean;
|
|
9
|
+
msg?: string;
|
|
10
|
+
issue?: LicenseIssue;
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export type LicenseIssue = "seats-exhausted";
|
|
@@ -34,5 +33,5 @@ export enum LicenseFeature {
|
|
|
34
33
|
export interface LicenseService {
|
|
35
34
|
validateLicense(): Promise<LicenseValidationResult>;
|
|
36
35
|
getLicenseInfo(): Promise<GetLicenseInfoResult>;
|
|
37
|
-
licenseIncludesFeature(feature: LicenseFeature): Promise<boolean
|
|
38
|
-
}
|
|
36
|
+
licenseIncludesFeature(feature: LicenseFeature): Promise<boolean>;
|
|
37
|
+
}
|