Skip to content

Commit

Permalink
Generate Extension Info in server application (eclipse-theia#13590)
Browse files Browse the repository at this point in the history
fixes eclipse-theia#13481

contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <[email protected]>
  • Loading branch information
rschnekenbu authored Apr 24, 2024
1 parent 845b291 commit ae0b3e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@

## not yet released

- [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
- [scm] added support for dirty diff peek view [#13104](https://github.com/eclipse-theia/theia/pull/13104)
- [test] stub VS Code `Test Coverage` API [#13631](https://github.com/eclipse-theia/theia/pull/13631)

<a name="breaking_changes_not_yet_released">[Breaking Changes:](#breaking_changes_not_yet_released)</a>

- [scm] revised some of the dirty diff related types [#13104](https://github.com/eclipse-theia/theia/pull/13104)
- replaced `DirtyDiff.added/removed/modified` with `changes`, which provides more detailed information about the changes
- 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ const main = require('@theia/core/lib/node/main');
BackendApplicationConfigProvider.set(${this.prettyStringify(this.pck.props.backend.config)});
globalThis.extensionInfo = ${this.prettyStringify(this.pck.extensionPackages.map(({ name, version }) => ({ name, version }))) };
const serverModule = require('./server');
const serverAddress = main.start(serverModule());
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/node/application-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export class ApplicationServerImpl implements ApplicationServer {
protected readonly applicationPackage: ApplicationPackage;

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

getApplicationInfo(): Promise<ApplicationInfo | undefined> {
Expand Down

0 comments on commit ae0b3e8

Please sign in to comment.