entry-point interface

This commit is contained in:
Niels Lyngsø
2023-06-27 13:42:17 +02:00
parent e390afa85d
commit e43fa3029a
5 changed files with 7 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
import type { UmbEntryPointModule } from './umb-lifecycle.interface.js';
import type { UmbEntryPointModule } from './entry-point.interface.js';
/**
* Validate if an ESModule exports a known init function called 'onInit'

View File

@@ -9,4 +9,4 @@ export * from './load-extension.function.js';
export * from './registry/extension.registry.js';
export * from './type-guards/index.js';
export * from './types.js';
export * from './umb-lifecycle.interface.js';
export * from './entry-point.interface.js';

View File

@@ -1,5 +1,5 @@
import { UmbEntryPointModule } from './entry-point.interface.js';
import { UmbBackofficeExtensionRegistry } from '@umbraco-cms/backoffice/extension-registry';
import type { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type HTMLElementConstructor<T = HTMLElement> = new (...args: any[]) => T;
@@ -155,10 +155,7 @@ export interface ManifestWithMeta extends ManifestBase {
* This type of extension gives full control and will simply load the specified JS file
* You could have custom logic to decide which extensions to load/register by using extensionRegistry
*/
export interface ManifestEntryPoint
extends ManifestWithLoader<{
onInit: (host: UmbControllerHostElement, extensionApi: UmbBackofficeExtensionRegistry) => void;
}> {
export interface ManifestEntryPoint extends ManifestWithLoader<UmbEntryPointModule> {
type: 'entryPoint';
/**

View File

@@ -1,6 +1,8 @@
import { ManifestTypes } from './extension-registry/index.js';
export const name = 'Umbraco.Core';
export const version = '0.0.1';
export const extensions = [
export const extensions: Array<ManifestTypes> = [
{
name: 'Core Entry Point',
alias: 'Umb.EntryPoint.Core',