@gitpod/gitpod-protocol 0.1.5-wv-add-image-builds-to-dashboard.0 → 0.1.5-wv-remove-without-ws-flag.5
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/billing-mode.js +2 -2
- package/lib/billing-mode.js.map +1 -1
- package/lib/frontend-dashboard-service.d.ts +90 -0
- package/lib/frontend-dashboard-service.d.ts.map +1 -0
- package/lib/frontend-dashboard-service.js +49 -0
- package/lib/frontend-dashboard-service.js.map +1 -0
- package/lib/gitpod-service.d.ts +9 -9
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +19 -11
- package/lib/gitpod-service.js.map +1 -1
- package/lib/permission.d.ts +4 -1
- package/lib/permission.d.ts.map +1 -1
- package/lib/permission.js +3 -0
- package/lib/permission.js.map +1 -1
- package/lib/protocol.d.ts +1 -0
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js.map +1 -1
- package/lib/teams-projects-protocol.d.ts +3 -0
- package/lib/teams-projects-protocol.d.ts.map +1 -1
- package/lib/teams-projects-protocol.js +8 -1
- package/lib/teams-projects-protocol.js.map +1 -1
- package/lib/typings/globals.d.ts +1 -1
- package/lib/typings/globals.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.d.ts +6 -2
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +11 -4
- package/lib/util/gitpod-host-url.js.map +1 -1
- package/package.json +1 -1
- package/pkg-yarn.lock +1 -1
- package/provenance-bundle.jsonl +1 -1
- package/src/billing-mode.ts +2 -2
- package/src/frontend-dashboard-service.ts +125 -0
- package/src/gitpod-service.ts +20 -14
- package/src/permission.ts +4 -0
- package/src/protocol.ts +3 -0
- package/src/teams-projects-protocol.ts +6 -0
- package/src/typings/globals.ts +2 -1
- package/src/util/gitpod-host-url.ts +15 -4
package/src/typings/globals.ts
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
interface Window {
|
|
8
|
+
// gitpod is used by supervisor/frontend and vscode browser https://github.com/gitpod-io/openvscode-server/blob/dadd40deda5959c0efdaa0c7d02ab64b6f8b5ad0/src/vs/gitpod/browser/workbench/workbench.ts#L7
|
|
8
9
|
gitpod: {
|
|
9
|
-
service: import("../gitpod-service").GitpodService;
|
|
10
10
|
ideService?: import("../ide-frontend-service").IDEFrontendService;
|
|
11
|
+
loggedUserID?: string;
|
|
11
12
|
};
|
|
12
13
|
}
|
|
@@ -77,8 +77,15 @@ export class GitpodHostUrl {
|
|
|
77
77
|
return updated.with((url) => ({ pathname: `/api${url.pathname}` }));
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
withContext(
|
|
81
|
-
|
|
80
|
+
withContext(
|
|
81
|
+
contextUrl: string,
|
|
82
|
+
startOptions?: { showOptions?: boolean; editor?: string; workspaceClass?: string },
|
|
83
|
+
) {
|
|
84
|
+
const searchParams = new URLSearchParams();
|
|
85
|
+
if (startOptions?.showOptions) {
|
|
86
|
+
searchParams.append("showOptions", "true");
|
|
87
|
+
}
|
|
88
|
+
return this.with((url) => ({ hash: contextUrl, search: searchParams.toString() }));
|
|
82
89
|
}
|
|
83
90
|
|
|
84
91
|
asWebsocket(): GitpodHostUrl {
|
|
@@ -124,10 +131,9 @@ export class GitpodHostUrl {
|
|
|
124
131
|
});
|
|
125
132
|
}
|
|
126
133
|
|
|
127
|
-
asWorkspaceAuth(instanceID: string
|
|
134
|
+
asWorkspaceAuth(instanceID: string): GitpodHostUrl {
|
|
128
135
|
return this.with((url) => ({
|
|
129
136
|
pathname: `/api/auth/workspace-cookie/${instanceID}`,
|
|
130
|
-
search: redirect ? "redirect" : "",
|
|
131
137
|
}));
|
|
132
138
|
}
|
|
133
139
|
|
|
@@ -163,6 +169,11 @@ export class GitpodHostUrl {
|
|
|
163
169
|
return pathSegs[2];
|
|
164
170
|
}
|
|
165
171
|
|
|
172
|
+
const cleanHash = this.url.hash.replace(/^#/, "");
|
|
173
|
+
if (this.url.pathname == "/start/" && cleanHash.match(workspaceIDRegex)) {
|
|
174
|
+
return cleanHash;
|
|
175
|
+
}
|
|
176
|
+
|
|
166
177
|
return undefined;
|
|
167
178
|
}
|
|
168
179
|
|