Created
October 6, 2020 14:44
-
-
Save valorkin/7cfe952e0a79a2b36c4ed793cafc884c to your computer and use it in GitHub Desktop.
meeting notes plugin-descriptor.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// should be on pair with https://github.com/webpack/webpack/blob/master/schemas/plugins/container/ModuleFederationPlugin.json | |
// we speak of one config for several types of entries (iframe\webpack\module federation) | |
// generic = <plugin launcher plugin="name1" module="component1" | |
// <angular-module-fed-launcher plugin="name1" module="component1" version="" env="production" provider="ariba" | |
// <iframe-launcher plugin="name2" module="page1" | |
// <webpack-component pl | |
// ContainerDescriptor? | |
<plugin-launcher name= module=> | |
ng-template #default | |
<component-hello title= (click)=""> | |
ng-template #fallback | |
span.loading | |
ng-template #failture | |
span.it-failed | |
</plugin-launcher> | |
export interface PluginDescriptor { | |
// container/plugin name | |
name: string; | |
// version of plugin. should we support v | |
version: string; | |
// url to remoteEntry.js (iframe/webcomponents/module federate) | |
// todo: rename to `uri` | |
remoteEntry: string; | |
type: 'iframe'| 'angular_ivy_mf'| 'webcomponent_mf' | |
// host url `https://localhost:4201/buyers/` | |
// host: string | |
// todo: support enviropments? | |
// in module federation this is `exposes` | |
modules: [ | |
{ | |
name: string; | |
componentName: string; | |
// iframe uri or part of uri `/index.html` | |
// module federation: `remoteEntry.js` | |
// entryPoint: string; | |
} | |
], | |
// fieldglass|ariba|sap | |
// could be renamed to vendor? | |
// could we put this to meta? | |
// meta: Record<string, string> | |
provider: string; | |
// todo: remove | |
// sinceVersion: string; | |
// todo: remove | |
// untilVersion: string; | |
// todo: remove | |
// module.name | |
// todo: provide name conventions | |
// remoteName: string; | |
// todo: redefine | |
// string: [] ? cflp | |
// todo: I need docs about cflp routing | |
// Frank would love to remove it :D | |
remoteRoute: string; | |
// Frank would love to remove it :D | |
hasRoutes: boolean; | |
// todo: remove -> module.name | |
// exposedModule: string; | |
// todo: remove add `description: string;` | |
// displayName: string; | |
// todo: check can we work without it? | |
// todo: move to modules | |
componentName: string; | |
// todo: remove | |
type: Scope; | |
// todo: remove | |
category: string; | |
// add `homepage: string;` | |
// "homepage": "https://github.com/webpack/webpack", | |
// changeNotes: string; | |
} | |
/** | |
* The idea behind the scope is that there are components that are instantiated at the time we use Page launcher. | |
* But there could be a situation, where we need to register a PLUGIN at the bootstrap at the lauch time, there we | |
* have scope Application. | |
* Not implemented yet default value should be as Page | |
*/ | |
export enum Scope { | |
Application = 1, | |
Page | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
modules typing is iframe|ng|webcomp etc AnyOf