diff --git a/apps/workbench-client-testing-app/src/app/app.component.ts b/apps/workbench-client-testing-app/src/app/app.component.ts index ec8a95a13..a4533f820 100644 --- a/apps/workbench-client-testing-app/src/app/app.component.ts +++ b/apps/workbench-client-testing-app/src/app/app.component.ts @@ -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', @@ -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; diff --git a/package-lock.json b/package-lock.json index 1bbe7f9e0..ea79e9ab6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,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", @@ -3305,9 +3305,9 @@ } }, "node_modules/@scion/microfrontend-platform": { - "version": "1.0.0-rc.11", - "resolved": "https://registry.npmjs.org/@scion/microfrontend-platform/-/microfrontend-platform-1.0.0-rc.11.tgz", - "integrity": "sha512-hLVlBdVtsl5daTo+3yhKWwdOaDWFCrbAN/KUyRoMaaT4bVV2cxgQoWW2yf3zijBxZ9WsSnwMQPe9ZUzb4cX+yw==", + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/@scion/microfrontend-platform/-/microfrontend-platform-1.0.0-rc.12.tgz", + "integrity": "sha512-M9yG2juQtMHt+xHCDPzBydn5UjnBnEPiA8GC7RZfX4IPmHity4DuSAg6ZJ959u6qAoE54ZHLjEINoEtVb5pkOQ==", "dependencies": { "tslib": "^2.3.0" }, @@ -20015,9 +20015,9 @@ } }, "@scion/microfrontend-platform": { - "version": "1.0.0-rc.11", - "resolved": "https://registry.npmjs.org/@scion/microfrontend-platform/-/microfrontend-platform-1.0.0-rc.11.tgz", - "integrity": "sha512-hLVlBdVtsl5daTo+3yhKWwdOaDWFCrbAN/KUyRoMaaT4bVV2cxgQoWW2yf3zijBxZ9WsSnwMQPe9ZUzb4cX+yw==", + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/@scion/microfrontend-platform/-/microfrontend-platform-1.0.0-rc.12.tgz", + "integrity": "sha512-M9yG2juQtMHt+xHCDPzBydn5UjnBnEPiA8GC7RZfX4IPmHity4DuSAg6ZJ959u6qAoE54ZHLjEINoEtVb5pkOQ==", "requires": { "tslib": "^2.3.0" } diff --git a/package.json b/package.json index 9453a5f6e..820f3084e 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/projects/scion/workbench-client/package.json b/projects/scion/workbench-client/package.json index 5324d7b09..156db8165 100644 --- a/projects/scion/workbench-client/package.json +++ b/projects/scion/workbench-client/package.json @@ -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", diff --git a/projects/scion/workbench-client/src/lib/workbench-client.ts b/projects/scion/workbench-client/src/lib/workbench-client.ts index 6402c6dc8..f218becf0 100644 --- a/projects/scion/workbench-client/src/lib/workbench-client.ts +++ b/projects/scion/workbench-client/src/lib/workbench-client.ts @@ -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.** @@ -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. @@ -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); } } diff --git a/projects/scion/workbench-client/tsconfig.lib.prod.typedoc.json b/projects/scion/workbench-client/tsconfig.lib.prod.typedoc.json index f9490f757..b531cb070 100644 --- a/projects/scion/workbench-client/tsconfig.lib.prod.typedoc.json +++ b/projects/scion/workbench-client/tsconfig.lib.prod.typedoc.json @@ -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" } } diff --git a/projects/scion/workbench/package.json b/projects/scion/workbench/package.json index 08c6a7835..7580fbf38 100644 --- a/projects/scion/workbench/package.json +++ b/projects/scion/workbench/package.json @@ -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": { diff --git a/projects/scion/workbench/src/lib/microfrontend-platform/initialization/microfrontend-platform-initializer.service.ts b/projects/scion/workbench/src/lib/microfrontend-platform/initialization/microfrontend-platform-initializer.service.ts index cbac74742..95b876e35 100644 --- a/projects/scion/workbench/src/lib/microfrontend-platform/initialization/microfrontend-platform-initializer.service.ts +++ b/projects/scion/workbench/src/lib/microfrontend-platform/initialization/microfrontend-platform-initializer.service.ts @@ -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'; @@ -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); }