org: migrate to new composability API
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-org': patch
|
||||
---
|
||||
|
||||
Migrate to new composability API, exporting the plugin instance as `orgPlugin`, and the entity cards as `EntityGroupProfileCard`, `EntityMembersListCard`, `EntityOwnershipCard`, and `EntityUserProfileCard`.
|
||||
@@ -14,6 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { createDevApp } from '@backstage/dev-utils';
|
||||
import { plugin } from '../src/plugin';
|
||||
import { orgPlugin } from '../src/plugin';
|
||||
|
||||
createDevApp().registerPlugin(plugin).render();
|
||||
createDevApp().registerPlugin(orgPlugin).render();
|
||||
|
||||
@@ -13,5 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export { plugin } from './plugin';
|
||||
export {
|
||||
orgPlugin,
|
||||
orgPlugin as plugin,
|
||||
EntityGroupProfileCard,
|
||||
EntityMembersListCard,
|
||||
EntityOwnershipCard,
|
||||
EntityUserProfileCard,
|
||||
} from './plugin';
|
||||
export * from './components';
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { plugin } from './plugin';
|
||||
import { orgPlugin } from './plugin';
|
||||
|
||||
describe('groups', () => {
|
||||
it('should export plugin', () => {
|
||||
expect(plugin).toBeDefined();
|
||||
expect(orgPlugin).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -13,8 +13,37 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { createPlugin } from '@backstage/core';
|
||||
import { createComponentExtension, createPlugin } from '@backstage/core';
|
||||
|
||||
export const plugin = createPlugin({
|
||||
export const orgPlugin = createPlugin({
|
||||
id: 'org',
|
||||
});
|
||||
|
||||
export const EntityGroupProfileCard = orgPlugin.provide(
|
||||
createComponentExtension({
|
||||
component: {
|
||||
lazy: () => import('./components').then(m => m.GroupProfileCard),
|
||||
},
|
||||
}),
|
||||
);
|
||||
export const EntityMembersListCard = orgPlugin.provide(
|
||||
createComponentExtension({
|
||||
component: {
|
||||
lazy: () => import('./components').then(m => m.MembersListCard),
|
||||
},
|
||||
}),
|
||||
);
|
||||
export const EntityOwnershipCard = orgPlugin.provide(
|
||||
createComponentExtension({
|
||||
component: {
|
||||
lazy: () => import('./components').then(m => m.OwnershipCard),
|
||||
},
|
||||
}),
|
||||
);
|
||||
export const EntityUserProfileCard = orgPlugin.provide(
|
||||
createComponentExtension({
|
||||
component: {
|
||||
lazy: () => import('./components').then(m => m.UserProfileCard),
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user