Skip to content

Commit c28d563

Browse files
authored
Merge pull request #2296 from umbraco/v15/feature/emm-workspace-extensions
Feature: Extension Manifest Map: Workspace & co
2 parents fd2ce5f + 7ae2deb commit c28d563

File tree

584 files changed

+2921
-3775
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

584 files changed

+2921
-3775
lines changed

devops/json-schema-generator/index.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { writeFileSync } from 'fs';
2+
import { createImportMap } from '../importmap/index.js';
3+
4+
const tsPath = './src/json-schema/all-packages.ts';
5+
6+
const importmap = createImportMap({
7+
rootDir: './src',
8+
replaceModuleExtensions: true,
9+
});
10+
11+
const paths = Object.keys(importmap.imports);
12+
13+
const content = `
14+
${
15+
paths.map(path => `import '${path}';`).join('\n')
16+
}
17+
`;
18+
19+
//const config = await resolveConfig('./.prettierrc.json');
20+
//const formattedContent = await format(content, { ...config, parser: 'json' });
21+
22+
writeFileSync(tsPath, content);

examples/entity-content-type-condition/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import type { ManifestWorkspaceView } from '@umbraco-cms/backoffice/extension-registry';
2-
3-
const workspace: ManifestWorkspaceView = {
1+
const workspace: UmbExtensionManifest = {
42
type: 'workspaceView',
53
alias: 'Example.WorkspaceView.EntityContentTypeCondition',
64
name: 'Example Workspace View With Entity Content Type Condition',

examples/entity-content-type-condition/workspace-view.element.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ import { html, customElement } from '@umbraco-cms/backoffice/external/lit';
22
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
33

44
@customElement('umb-example-entity-content-type-condition')
5-
export class UmbWorkspaceViewElement extends UmbLitElement {
5+
export class UmbWorkspaceExampleViewElement extends UmbLitElement {
66
override render() {
77
return html`<p>
88
This is a conditional element that is only shown in workspaces based on it's entities content type.
99
</p>`;
1010
}
1111
}
1212

13-
export default UmbWorkspaceViewElement;
13+
export default UmbWorkspaceExampleViewElement;
1414

1515
declare global {
1616
interface HTMLElementTagNameMap {
17-
'umb-example-entity-content-type-condition': UmbWorkspaceViewElement;
17+
'umb-example-entity-content-type-condition': UmbWorkspaceExampleViewElement;
1818
}
1919
}

examples/icons/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
2-
3-
export const manifests: Array<ManifestTypes> = [
1+
export const manifests: Array<UmbExtensionManifest> = [
42
{
53
type: 'icons',
64
name: 'Example Dataset Dashboard',

examples/workspace-context-counter/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
2-
3-
export const manifests: Array<ManifestTypes> = [
1+
export const manifests: Array<UmbExtensionManifest> = [
42
{
53
type: 'workspaceContext',
64
name: 'Example Counter Workspace Context',
75
alias: 'example.workspaceCounter.counter',
8-
js: () => import('./counter-workspace-context.js'),
6+
api: () => import('./counter-workspace-context.js'),
97
conditions: [
108
{
119
alias: 'Umb.Condition.WorkspaceAlias',

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,9 @@
160160
"generate:server-api": "openapi-ts --file devops/openapi-ts/openapi-ts.config.js",
161161
"generate:icons": "node ./devops/icons/index.js",
162162
"generate:overrides": "node ./devops/tsc/index.js",
163-
"generate:jsonschema:dist": "typescript-json-schema --required --include \"./src/packages/core/extension-registry/umbraco-package.ts\" --out dist-cms/umbraco-package-schema.json tsconfig.json UmbracoPackage",
164-
"generate:jsonschema": "typescript-json-schema --required --include \"./src/packages/core/extension-registry/*.ts\"",
163+
"generate:jsonschema:imports": "node ./devops/json-schema-generator/index.js",
164+
"generate:jsonschema:dist": "typescript-json-schema --required --include \"./src/json-schema/umbraco-package-schema.ts\" --out dist-cms/umbraco-package-schema.json tsconfig.json UmbracoPackage",
165+
"generate:jsonschema": "typescript-json-schema --required --include \"./src/json-schema/umbraco-package-schema.ts\"",
165166
"lint:errors": "npm run lint -- --quiet",
166167
"lint:fix": "npm run lint -- --fix",
167168
"lint": "eslint src",

public-assets/App_Plugins/custom-bundle-package/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const manifests: Array<ManifestTypes> = [
1+
export const manifests: Array<UmbExtensionManifest> = [
22
{
33
type: 'section',
44
alias: 'MyBundle.Section.Custom',

src/json-schema/all-packages.ts

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
import '@umbraco-cms/backoffice/app';
2+
import '@umbraco-cms/backoffice/class-api';
3+
import '@umbraco-cms/backoffice/context-api';
4+
import '@umbraco-cms/backoffice/controller-api';
5+
import '@umbraco-cms/backoffice/element-api';
6+
import '@umbraco-cms/backoffice/extension-api';
7+
import '@umbraco-cms/backoffice/formatting-api';
8+
import '@umbraco-cms/backoffice/localization-api';
9+
import '@umbraco-cms/backoffice/observable-api';
10+
import '@umbraco-cms/backoffice/action';
11+
import '@umbraco-cms/backoffice/audit-log';
12+
import '@umbraco-cms/backoffice/auth';
13+
import '@umbraco-cms/backoffice/block-custom-view';
14+
import '@umbraco-cms/backoffice/block-grid';
15+
import '@umbraco-cms/backoffice/block-list';
16+
import '@umbraco-cms/backoffice/block-rte';
17+
import '@umbraco-cms/backoffice/block-type';
18+
import '@umbraco-cms/backoffice/block';
19+
import '@umbraco-cms/backoffice/code-editor';
20+
import '@umbraco-cms/backoffice/collection';
21+
import '@umbraco-cms/backoffice/components';
22+
import '@umbraco-cms/backoffice/content-type';
23+
import '@umbraco-cms/backoffice/content';
24+
import '@umbraco-cms/backoffice/culture';
25+
import '@umbraco-cms/backoffice/picker';
26+
import '@umbraco-cms/backoffice/current-user';
27+
import '@umbraco-cms/backoffice/data-type';
28+
import '@umbraco-cms/backoffice/debug';
29+
import '@umbraco-cms/backoffice/dictionary';
30+
import '@umbraco-cms/backoffice/document-blueprint';
31+
import '@umbraco-cms/backoffice/document-type';
32+
import '@umbraco-cms/backoffice/document';
33+
import '@umbraco-cms/backoffice/entity-action';
34+
import '@umbraco-cms/backoffice/entity-bulk-action';
35+
import '@umbraco-cms/backoffice/entity';
36+
import '@umbraco-cms/backoffice/event';
37+
import '@umbraco-cms/backoffice/extension-registry';
38+
import '@umbraco-cms/backoffice/help';
39+
import '@umbraco-cms/backoffice/icon';
40+
import '@umbraco-cms/backoffice/id';
41+
import '@umbraco-cms/backoffice/imaging';
42+
import '@umbraco-cms/backoffice/language';
43+
import '@umbraco-cms/backoffice/lit-element';
44+
import '@umbraco-cms/backoffice/localization';
45+
import '@umbraco-cms/backoffice/log-viewer';
46+
import '@umbraco-cms/backoffice/markdown-editor';
47+
import '@umbraco-cms/backoffice/media-type';
48+
import '@umbraco-cms/backoffice/media';
49+
import '@umbraco-cms/backoffice/member-group';
50+
import '@umbraco-cms/backoffice/member-type';
51+
import '@umbraco-cms/backoffice/member';
52+
import '@umbraco-cms/backoffice/menu';
53+
import '@umbraco-cms/backoffice/modal';
54+
import '@umbraco-cms/backoffice/multi-url-picker';
55+
import '@umbraco-cms/backoffice/notification';
56+
import '@umbraco-cms/backoffice/object-type';
57+
import '@umbraco-cms/backoffice/package';
58+
import '@umbraco-cms/backoffice/partial-view';
59+
import '@umbraco-cms/backoffice/picker-input';
60+
import '@umbraco-cms/backoffice/property-action';
61+
import '@umbraco-cms/backoffice/property-editor';
62+
import '@umbraco-cms/backoffice/property-type';
63+
import '@umbraco-cms/backoffice/property';
64+
import '@umbraco-cms/backoffice/recycle-bin';
65+
import '@umbraco-cms/backoffice/relation-type';
66+
import '@umbraco-cms/backoffice/relations';
67+
import '@umbraco-cms/backoffice/repository';
68+
import '@umbraco-cms/backoffice/resources';
69+
import '@umbraco-cms/backoffice/router';
70+
import '@umbraco-cms/backoffice/script';
71+
import '@umbraco-cms/backoffice/search';
72+
import '@umbraco-cms/backoffice/section';
73+
import '@umbraco-cms/backoffice/server-file-system';
74+
import '@umbraco-cms/backoffice/settings';
75+
import '@umbraco-cms/backoffice/sorter';
76+
import '@umbraco-cms/backoffice/static-file';
77+
import '@umbraco-cms/backoffice/store';
78+
import '@umbraco-cms/backoffice/style';
79+
import '@umbraco-cms/backoffice/stylesheet';
80+
import '@umbraco-cms/backoffice/sysinfo';
81+
import '@umbraco-cms/backoffice/tags';
82+
import '@umbraco-cms/backoffice/template';
83+
import '@umbraco-cms/backoffice/temporary-file';
84+
import '@umbraco-cms/backoffice/themes';
85+
import '@umbraco-cms/backoffice/tiny-mce';
86+
import '@umbraco-cms/backoffice/tree';
87+
import '@umbraco-cms/backoffice/ufm';
88+
import '@umbraco-cms/backoffice/user-group';
89+
import '@umbraco-cms/backoffice/user-permission';
90+
import '@umbraco-cms/backoffice/user';
91+
import '@umbraco-cms/backoffice/utils';
92+
import '@umbraco-cms/backoffice/validation';
93+
import '@umbraco-cms/backoffice/variant';
94+
import '@umbraco-cms/backoffice/webhook';
95+
import '@umbraco-cms/backoffice/workspace';
96+
import '@umbraco-cms/backoffice/external/backend-api';
97+
import '@umbraco-cms/backoffice/external/base64-js';
98+
import '@umbraco-cms/backoffice/external/diff';
99+
import '@umbraco-cms/backoffice/external/dompurify';
100+
import '@umbraco-cms/backoffice/external/lit';
101+
import '@umbraco-cms/backoffice/external/marked';
102+
import '@umbraco-cms/backoffice/external/monaco-editor';
103+
import '@umbraco-cms/backoffice/external/openid';
104+
import '@umbraco-cms/backoffice/external/router-slot';
105+
import '@umbraco-cms/backoffice/external/rxjs';
106+
import '@umbraco-cms/backoffice/external/tinymce';
107+
import '@umbraco-cms/backoffice/external/uui';
108+
import '@umbraco-cms/backoffice/external/uuid';

src/json-schema/tsconfig.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "../../tsconfig.json",
3+
"include": ["./*.ts", "./**/*.ts", "./**/*.json", "./**/*.js"],
4+
"exclude": ["./**/*.test.ts", "./**/*.stories.ts", "tsconfig.json", "rollup.config.js"]
5+
6+
}

src/packages/core/extension-registry/umbraco-package.ts renamed to src/json-schema/umbraco-package-schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import './models/index.js';
1+
import './all-packages.js';
22

33
/**
44
* Umbraco package manifest JSON

0 commit comments

Comments
 (0)