Skip to content

Commit 8f432d5

Browse files
committed
Generate Extension Info in server application
fixes #13481 contributed on behalf of STMicroelectronics Signed-off-by: Remi Schnekenburger <[email protected]>
1 parent 746f8ff commit 8f432d5

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66

77
## not yet released
88

9+
- [application-manager] Generate Extension Info in server application to avoid empty About Dialog [#13590](https://github.com/eclipse-theia/theia/pull/13590) - contributed on behalf of STMicroelectronics
910
- [scm] added support for dirty diff peek view [#13104](https://github.com/eclipse-theia/theia/pull/13104)
1011

1112
<a name="breaking_changes_not_yet_released">[Breaking Changes:](#breaking_changes_not_yet_released)</a>
13+
1214
- [scm] revised some of the dirty diff related types [#13104](https://github.com/eclipse-theia/theia/pull/13104)
1315
- replaced `DirtyDiff.added/removed/modified` with `changes`, which provides more detailed information about the changes
1416
- changed the semantics of `LineRange` to represent a range that spans up to but not including the `end` line (previously, it included the `end` line)

dev-packages/application-manager/src/generator/backend-generator.ts

+2
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ const main = require('@theia/core/lib/node/main');
185185
186186
BackendApplicationConfigProvider.set(${this.prettyStringify(this.pck.props.backend.config)});
187187
188+
globalThis.extensionInfo = ${this.prettyStringify(this.pck.extensionPackages.map(({ name, version }) => ({ name, version }))) };
189+
188190
const serverModule = require('./server');
189191
const serverAddress = main.start(serverModule());
190192

packages/core/src/node/application-server.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ export class ApplicationServerImpl implements ApplicationServer {
2626
protected readonly applicationPackage: ApplicationPackage;
2727

2828
getExtensionsInfos(): Promise<ExtensionInfo[]> {
29-
const extensions = this.applicationPackage.extensionPackages;
30-
const infos: ExtensionInfo[] = extensions.map(extension => ({ name: extension.name, version: extension.version }));
31-
return Promise.resolve(infos);
29+
// @ts-expect-error
30+
const appInfo: ExtensionInfo[] = globalThis.extensionInfo;
31+
return Promise.resolve(appInfo);
3232
}
3333

3434
getApplicationInfo(): Promise<ApplicationInfo | undefined> {

0 commit comments

Comments
 (0)