Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Extension insights package #2286

Merged
merged 4 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/apps/backoffice/backoffice.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const CORE_PACKAGES = [
import('../../packages/data-type/umbraco-package.js'),
import('../../packages/dictionary/umbraco-package.js'),
import('../../packages/documents/umbraco-package.js'),
import('../../packages/extension-insights/umbraco-package.js'),
import('../../packages/health-check/umbraco-package.js'),
import('../../packages/help/umbraco-package.js'),
import('../../packages/language/umbraco-package.js'),
Expand Down
24 changes: 0 additions & 24 deletions src/packages/core/extension-registry/collection/manifests.ts

This file was deleted.

25 changes: 0 additions & 25 deletions src/packages/core/extension-registry/collection/views/manifests.ts

This file was deleted.

12 changes: 1 addition & 11 deletions src/packages/core/extension-registry/manifests.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
import { manifests as conditionManifests } from './conditions/manifests.js';
import { manifests as menuItemManifests } from './menu-item/manifests.js';
import { manifests as workspaceManifests } from './workspace/manifests.js';
import { manifests as collectionManifests } from './collection/manifests.js';
import { manifests as entityActionManifests } from './entity-actions/manifests.js';
import type { ManifestTypes } from './models/index.js';

export const manifests: Array<ManifestTypes> = [
...conditionManifests,
...menuItemManifests,
...workspaceManifests,
...collectionManifests,
...entityActionManifests,
];
export const manifests: Array<ManifestTypes> = [...conditionManifests];
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { umbExtensionsRegistry } from '../registry.js';
import type { UmbExtensionCollectionFilterModel } from './types.js';
import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
import { html, customElement, css } from '@umbraco-cms/backoffice/external/lit';
import { fromCamelCase } from '@umbraco-cms/backoffice/utils';
import { UMB_COLLECTION_CONTEXT, UmbCollectionDefaultElement } from '@umbraco-cms/backoffice/collection';
Expand Down
20 changes: 20 additions & 0 deletions src/packages/extension-insights/collection/manifests.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { UMB_EXTENSION_COLLECTION_REPOSITORY_ALIAS } from './repository/index.js';
import { manifests as collectionRepositoryManifests } from './repository/manifests.js';
import { manifests as collectionViewManifests } from './views/manifests.js';

export const UMB_EXTENSION_COLLECTION_ALIAS = 'Umb.Collection.Extension';

export const manifests: Array<UmbExtensionManifest> = [
{
type: 'collection',
kind: 'default',
alias: UMB_EXTENSION_COLLECTION_ALIAS,
name: 'Extension Collection',
element: () => import('./extension-collection.element.js'),
meta: {
repositoryAlias: UMB_EXTENSION_COLLECTION_REPOSITORY_ALIAS,
},
},
...collectionRepositoryManifests,
...collectionViewManifests,
];
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { umbExtensionsRegistry } from '../../registry.js';
import type { UmbExtensionCollectionFilterModel, UmbExtensionDetailModel } from '../types.js';
import { UMB_EXTENSION_ENTITY_TYPE } from '../../entity.js';
import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
import { UmbRepositoryBase } from '@umbraco-cms/backoffice/repository';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/collection';
Expand Down
23 changes: 23 additions & 0 deletions src/packages/extension-insights/collection/views/manifests.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { UMB_COLLECTION_ALIAS_CONDITION } from '@umbraco-cms/backoffice/collection';

export const UMB_EXTENSION_TABLE_COLLECTION_VIEW_ALIAS = 'Umb.CollectionView.Extension.Table';

export const manifests: Array<UmbExtensionManifest> = [
{
type: 'collectionView',
alias: UMB_EXTENSION_TABLE_COLLECTION_VIEW_ALIAS,
name: 'Extension Table Collection View',
element: () => import('./table/extension-table-collection-view.element.js'),
meta: {
label: 'Table',
icon: 'icon-list',
pathName: 'table',
},
conditions: [
{
alias: UMB_COLLECTION_ALIAS_CONDITION,
match: 'Umb.Collection.Extension',
},
],
},
];
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { umbExtensionsRegistry } from '../../registry.js';
import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
import { UMB_ACTION_EVENT_CONTEXT } from '@umbraco-cms/backoffice/action';
import { UmbEntityActionBase, UmbRequestReloadStructureForEntityEvent } from '@umbraco-cms/backoffice/entity-action';
import { umbConfirmModal } from '@umbraco-cms/backoffice/modal';
Expand Down
11 changes: 11 additions & 0 deletions src/packages/extension-insights/manifests.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { manifests as menuItemManifests } from './menu-item/manifests.js';
import { manifests as workspaceManifests } from './workspace/manifests.js';
import { manifests as collectionManifests } from './collection/manifests.js';
import { manifests as entityActionManifests } from './entity-actions/manifests.js';

export const manifests: Array<UmbExtensionManifest> = [
...menuItemManifests,
...workspaceManifests,
...collectionManifests,
...entityActionManifests,
];
8 changes: 8 additions & 0 deletions src/packages/extension-insights/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "@umbraco-backoffice/extension-insights",
"private": true,
"type": "module",
"scripts": {
"build": "vite build"
}
}
9 changes: 9 additions & 0 deletions src/packages/extension-insights/umbraco-package.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const name = 'Umbraco.Core.ExtensionInsight';
export const extensions = [
{
name: 'Extension Insight Bundle',
alias: 'Umb.Bundle.ExtensionInsight',
type: 'bundle',
js: () => import('./manifests.js'),
},
];
12 changes: 12 additions & 0 deletions src/packages/extension-insights/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from 'vite';
import { rmSync } from 'fs';
import { getDefaultConfig } from '../../vite-config-base';

const dist = '../../../dist-cms/packages/extension-insights';

// delete the unbundled dist folder
rmSync(dist, { recursive: true, force: true });

export default defineConfig({
...getDefaultConfig({ dist, entry: ['manifests.ts', 'umbraco-package.ts'] }),
});
Loading