Skip to content

Instantly share code, notes, and snippets.

@valorkin
Created October 6, 2020 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save valorkin/7cfe952e0a79a2b36c4ed793cafc884c to your computer and use it in GitHub Desktop.
Save valorkin/7cfe952e0a79a2b36c4ed793cafc884c to your computer and use it in GitHub Desktop.
meeting notes plugin-descriptor.ts
// 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
}
@valorkin
Copy link
Author

valorkin commented Oct 6, 2020

modules typing is iframe|ng|webcomp etc AnyOf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment