Skip to content

Commit

Permalink
deps(workbench): update @scion/microfrontend-platform to version 1.0.…
Browse files Browse the repository at this point in the history
…0-rc.12
  • Loading branch information
danielwiehl authored and Marcarrian committed Dec 21, 2022
1 parent 73a4ee0 commit 1f674fa
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 21 deletions.
4 changes: 2 additions & 2 deletions apps/workbench-client-testing-app/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

import {Component, HostBinding, Inject, Optional} from '@angular/core';
import {APP_IDENTITY, FocusMonitor, MicrofrontendPlatform, PlatformPropertyService} from '@scion/microfrontend-platform';
import {APP_IDENTITY, FocusMonitor, MicrofrontendPlatformClient, PlatformPropertyService} from '@scion/microfrontend-platform';

@Component({
selector: 'app-root',
Expand All @@ -18,7 +18,7 @@ import {APP_IDENTITY, FocusMonitor, MicrofrontendPlatform, PlatformPropertyServi
})
export class AppComponent {

public readonly workbenchContextActive = MicrofrontendPlatform.isConnectedToHost();
public readonly workbenchContextActive = MicrofrontendPlatformClient.isConnected();

public appSymbolicName: string;

Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@angular/router": "14.2.3",
"@scion/components": "14.0.2",
"@scion/components.internal": "14.0.1",
"@scion/microfrontend-platform": "1.0.0-rc.11",
"@scion/microfrontend-platform": "1.0.0-rc.12",
"@scion/toolkit": "1.3.1",
"rxjs": "7.5.7",
"tslib": "2.4.0",
Expand Down
2 changes: 1 addition & 1 deletion projects/scion/workbench-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"peerDependencies": {
"rxjs": "^7.5.0",
"@scion/toolkit": "^1.0.0-0",
"@scion/microfrontend-platform": "^1.0.0-rc.11"
"@scion/microfrontend-platform": "^1.0.0-rc.12"
},
"keywords": [
"scion",
Expand Down
7 changes: 3 additions & 4 deletions projects/scion/workbench-client/src/lib/workbench-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@

import {Beans} from '@scion/toolkit/bean-manager';
import {WorkbenchViewInitializer} from './view/workbench-view-initializer';
import {MicrofrontendPlatform} from '@scion/microfrontend-platform';
import {ConnectOptions, MicrofrontendPlatformClient} from '@scion/microfrontend-platform';
import {WorkbenchRouter} from './routing/workbench-router';
import {WorkbenchPopupService} from './popup/workbench-popup-service';
import {WorkbenchPopupInitializer} from './popup/workbench-popup-initializer';
import {WorkbenchMessageBoxService} from './message-box/workbench-message-box-service';
import {WorkbenchNotificationService} from './notification/workbench-notification-service';
import {ConnectOptions} from '@scion/microfrontend-platform';

/**
* **SCION Workbench Client provides core API for a web app to interact with SCION Workbench and other microfrontends.**
Expand Down Expand Up @@ -94,7 +93,7 @@ export class WorkbenchClient {
* micro application connects to the workbench during the bootstrapping. In Angular, for example, this can be done in
* an app initializer.
*
* See {@link @scion/microfrontend-platform!MicrofrontendPlatform.connectToHost} for more information about connecting to the platform host.
* See {@link @scion/microfrontend-platform!MicrofrontendPlatformClient.connect} for more information about connecting to the platform host.
*
* @param symbolicName - Specifies the symbolic name of the micro application. The micro application needs to be registered
* in the workbench under that identity.
Expand All @@ -108,6 +107,6 @@ export class WorkbenchClient {
Beans.register(WorkbenchNotificationService);
Beans.registerInitializer({useClass: WorkbenchViewInitializer});
Beans.registerInitializer({useClass: WorkbenchPopupInitializer});
await MicrofrontendPlatform.connectToHost(symbolicName, connectOptions);
await MicrofrontendPlatformClient.connect(symbolicName, connectOptions);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"externalSymbolLinkMappings": {
"@scion/microfrontend-platform": {
"MicrofrontendPlatform": "https://scion-microfrontend-platform-api.vercel.app/classes/MicrofrontendPlatform.html",
"MicrofrontendPlatform.connectToHost": "https://scion-microfrontend-platform-api.vercel.app/classes/MicrofrontendPlatform.html#connectToHost",
"MicrofrontendPlatformClient.connect": "https://scion-microfrontend-platform-api.vercel.app/classes/MicrofrontendPlatformClient.html#connect",
"PreferredSizeService": "https://scion-microfrontend-platform-api.vercel.app/classes/PreferredSizeService.html"
}
}
Expand Down
4 changes: 2 additions & 2 deletions projects/scion/workbench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"@angular/router": "^14.0.0",
"@scion/components": "^14.0.0",
"@scion/toolkit": "^1.3.0",
"@scion/microfrontend-platform": "^1.0.0-rc.11",
"@scion/workbench-client": "^1.0.0-0",
"@scion/microfrontend-platform": "^1.0.0-rc.12",
"@scion/workbench-client": "^1.0.0-beta.16",
"rxjs": "^7.5.0"
},
"peerDependenciesMeta": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

import {Injectable, Injector, NgZone, OnDestroy} from '@angular/core';
import {CapabilityInterceptor, HostManifestInterceptor, IntentInterceptor, MicrofrontendPlatform, MicrofrontendPlatformConfig, ObservableDecorator, Runlevel} from '@scion/microfrontend-platform';
import {CapabilityInterceptor, HostManifestInterceptor, IntentInterceptor, MicrofrontendPlatform, MicrofrontendPlatformConfig, MicrofrontendPlatformHost, ObservableDecorator} from '@scion/microfrontend-platform';
import {Beans} from '@scion/toolkit/bean-manager';
import {Logger, LoggerNames} from '../../logging';
import {NgZoneObservableDecorator} from './ng-zone-observable-decorator';
Expand Down Expand Up @@ -79,13 +79,13 @@ export class MicrofrontendPlatformInitializer implements WorkbenchInitializer, O
// must be done in runlevel 2, i.e., before activator microfrontends are installed.
Beans.registerInitializer({
useFunction: () => this._zone.run(() => runWorkbenchInitializers(MICROFRONTEND_PLATFORM_POST_STARTUP, this._injector)),
runlevel: Runlevel.Two,
runlevel: 2,
});

// Start the SCION Microfrontend Platform.
// We start the platform outside the Angular zone in order to avoid excessive change detection cycles
// of platform-internal subscriptions to global DOM events.
await this._zone.runOutsideAngular(() => MicrofrontendPlatform.startHost(microfrontendPlatformConfig));
await this._zone.runOutsideAngular(() => MicrofrontendPlatformHost.start(microfrontendPlatformConfig));

this._logger.debug('SCION Microfrontend Platform started.', LoggerNames.LIFECYCLE, microfrontendPlatformConfig);
}
Expand Down

0 comments on commit 1f674fa

Please sign in to comment.