@kardalum/plugin-sdk 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/dist/admin-section-registry.d.ts +14 -5
- package/dist/admin-section-registry.js +14 -4
- package/dist/capabilities.js +0 -3
- package/dist/host-entry.d.ts +1 -1
- package/dist/host-entry.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -8
- package/dist/license-verdict-keys.d.ts +4 -3
- package/dist/license-verdict-keys.js +4 -7
- package/dist/manifest-entry.d.ts +2 -2
- package/dist/manifest-entry.js +1 -1
- package/dist/manifest-schema.d.ts +51 -62
- package/dist/manifest-schema.js +97 -249
- package/dist/manifest.d.ts +41 -73
- package/dist/manifest.js +13 -36
- package/dist/plugin-screen-context.d.ts +11 -1
- package/dist/richtext/block-panel.js +2 -2
- package/dist/richtext/insert-menu.js +1 -1
- package/dist/richtext/style-listbox.js +4 -4
- package/dist/tokens/tokens.css +1 -0
- package/dist/tokens/tokens.json +2 -1
- package/dist/type-equality.d.ts +2 -0
- package/dist/type-equality.js +1 -0
- package/dist/views/html-view.js +1 -1
- package/dist/views/rich-text-view.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.d.ts +90 -0
- package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.js +32 -1
- package/node_modules/@kardalum/api-schemas/dist/asset.schema.d.ts +22 -1
- package/node_modules/@kardalum/api-schemas/dist/asset.schema.js +50 -15
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +204 -0
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +134 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +6 -5
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +2 -2
- package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.js +2 -1
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +41 -5
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +23 -9
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +36 -20
- package/node_modules/@kardalum/api-schemas/dist/index.js +21 -11
- package/node_modules/@kardalum/api-schemas/dist/install-warnings.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/install-warnings.schema.js +8 -0
- package/node_modules/@kardalum/api-schemas/dist/issue-list.d.ts +6 -0
- package/node_modules/@kardalum/api-schemas/dist/issue-list.js +6 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +101 -62
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +15 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +6 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +8 -6
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +1 -16
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +3 -19
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +13 -15
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +17 -7
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +18 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +97 -85
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +35 -68
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.d.ts +60 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.js +116 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +9 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +22 -7
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +13 -6
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +7 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +4 -3
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +14 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +37 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-fields.d.ts +64 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-fields.js +134 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-template-payload.d.ts +74 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-template-payload.js +132 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-vocabulary.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-vocabulary.js +15 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +12 -3
- package/node_modules/@kardalum/api-schemas/dist/role.schema.d.ts +11 -0
- package/node_modules/@kardalum/api-schemas/dist/role.schema.js +7 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +11 -2
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +21 -3
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +126 -0
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.js +70 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +6 -6
- package/node_modules/@kardalum/api-schemas/dist/sites.schema.d.ts +44 -25
- package/node_modules/@kardalum/api-schemas/dist/sites.schema.js +187 -48
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +15 -3
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/strict-url.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/strict-url.js +31 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +105 -1
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +43 -3
- package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +30 -2
- package/node_modules/@kardalum/api-schemas/dist/template.schema.js +19 -5
- package/node_modules/@kardalum/api-schemas/dist/trash-cursor.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-cursor.schema.js +29 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/whoami-api.schema.d.ts +19 -0
- package/node_modules/@kardalum/api-schemas/dist/whoami-api.schema.js +22 -0
- package/node_modules/@kardalum/api-schemas/package.json +2 -2
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +1 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +2 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +1 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +3 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +2 -1
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/README.md +4 -1
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +6 -21
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +13 -8
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +4 -4
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +9 -14
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +4 -0
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +25 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.d.ts +25 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.js +203 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.js +73 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.d.ts +5 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +60 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/icon-names.generated.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/icon-names.generated.js +2052 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/icons.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/icons.js +51 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +8 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +7 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +119 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.d.ts +14 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.js +21 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/locales.d.ts +5 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/locales.js +148 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/package-files.d.ts +5 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/package-files.js +76 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.d.ts +22 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +133 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +90 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/support.d.ts +24 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/support.js +55 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.d.ts +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.js +158 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +53 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/types.js +1 -0
- package/node_modules/@kardalum/plugin-package/dist/docs-contract.d.ts +3 -2
- package/node_modules/@kardalum/plugin-package/dist/docs-contract.js +4 -2
- package/node_modules/@kardalum/plugin-package/dist/extract.d.ts +92 -3
- package/node_modules/@kardalum/plugin-package/dist/extract.js +251 -41
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +9 -2
- package/node_modules/@kardalum/plugin-package/dist/index.js +7 -2
- package/node_modules/@kardalum/plugin-package/dist/manifest-entry.d.ts +5 -0
- package/node_modules/@kardalum/plugin-package/dist/manifest-entry.js +20 -0
- package/node_modules/@kardalum/plugin-package/dist/reference-entry.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/reference-entry.js +1 -0
- package/node_modules/@kardalum/plugin-package/dist/sample-content.d.ts +21 -3
- package/node_modules/@kardalum/plugin-package/dist/sample-content.js +37 -9
- package/node_modules/@kardalum/plugin-package/dist/shipped-files.d.ts +39 -0
- package/node_modules/@kardalum/plugin-package/dist/shipped-files.js +133 -0
- package/node_modules/@kardalum/plugin-package/dist/shipped-locales.d.ts +7 -0
- package/node_modules/@kardalum/plugin-package/dist/shipped-locales.js +27 -0
- package/node_modules/@kardalum/plugin-package/package.json +4 -2
- package/node_modules/@kardalum/ui/dist/components/dropdown-menu.js +2 -2
- package/node_modules/@kardalum/ui/package.json +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,44 @@ Subpaths are noted per entry. `.` is the package index; `./manifest` is the
|
|
|
8
8
|
server-safe manifest contract subpath, which pulls in no React and no
|
|
9
9
|
`@kardalum/ui`.
|
|
10
10
|
|
|
11
|
+
## 0.17.0
|
|
12
|
+
|
|
13
|
+
The licence verdict key set shrinks to one, three manifest contributions that
|
|
14
|
+
no admin screen hosted are gone, and display names can be per-language maps.
|
|
15
|
+
|
|
16
|
+
### Removed
|
|
17
|
+
|
|
18
|
+
- The licence verdict key `a4c4a883bf1392a6` from `LICENSE_VERDICT_PUBLIC_KEYS`
|
|
19
|
+
(`./entitlement`). The list now holds `e72c11dbcdf71e68` alone, so a verdict
|
|
20
|
+
signed with the retired key no longer verifies.
|
|
21
|
+
- `settingsPages`, `contentTreeActions` and `editorToolbar` from
|
|
22
|
+
`PluginContributions` and the manifest schema (`.` and `./manifest`), with
|
|
23
|
+
their types `SettingsPageContribution`, `ContentTreeActionContribution` and
|
|
24
|
+
`EditorToolbarContribution`. A manifest that declares one now fails
|
|
25
|
+
validation. The `admin.settingsPage`, `admin.contentTreeAction` and
|
|
26
|
+
`admin.editorToolbarItem` capability labels went with them.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- The display name of an action, a role, a dashboard widget, a scheduled task,
|
|
31
|
+
a media processor and an exposed service may be a plain string or a map of
|
|
32
|
+
language code to text with `en` required (`.` and `./manifest`). Existing
|
|
33
|
+
string names stay valid.
|
|
34
|
+
- `PluginScreenContext.slot` (`.`) is a union that gains
|
|
35
|
+
`{ kind: "widget"; sectionId: null; entryId: null; widgetId: string }`, the
|
|
36
|
+
slot of a dashboard widget on the admin's Home page. `navigate` is a no-op
|
|
37
|
+
for a widget.
|
|
38
|
+
- A manifest whose `dashboardWidgets` repeat an id fails validation, as
|
|
39
|
+
sections and rail entries already did (`./manifest`).
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
|
|
43
|
+
- `DATABASE_DIALECTS`, `PLUGIN_TYPES` and `TIER1_DIALECTS` (`.` and
|
|
44
|
+
`./manifest`), the vocabulary the manifest schema checks against.
|
|
45
|
+
- `listDashboardWidgets` and the `RegisteredDashboardWidget` type (`./host`),
|
|
46
|
+
host-only: the Home page's list of registered widgets. `registerPluginSlots`
|
|
47
|
+
now registers a manifest's `dashboardWidgets` too.
|
|
48
|
+
|
|
11
49
|
## 0.15.0 and 0.16.0 (after 0.14.0, the last release under the former scope)
|
|
12
50
|
|
|
13
51
|
The plugin manifest is no longer a discriminated union on `type`. One
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AdminSectionContribution, BuiltInRailEntryContribution, BuiltInRailSection, PluginManifest } from "./manifest.js";
|
|
1
|
+
import type { AdminSectionContribution, BuiltInRailEntryContribution, BuiltInRailSection, DashboardWidgetContribution, PluginManifest } from "./manifest.js";
|
|
2
2
|
/** @internal A section in the host's registry, with the plugin it came from. */
|
|
3
3
|
export interface RegisteredSection {
|
|
4
4
|
pluginId: string;
|
|
@@ -9,12 +9,18 @@ export interface RegisteredRailEntry {
|
|
|
9
9
|
pluginId: string;
|
|
10
10
|
entry: BuiltInRailEntryContribution;
|
|
11
11
|
}
|
|
12
|
+
/** @internal A dashboard widget in the host's registry, with its plugin
|
|
13
|
+
* (S313b, W8). The Home page lists them in registration order. */
|
|
14
|
+
export interface RegisteredDashboardWidget {
|
|
15
|
+
pluginId: string;
|
|
16
|
+
widget: DashboardWidgetContribution;
|
|
17
|
+
}
|
|
12
18
|
/**
|
|
13
19
|
* Register every slot a plugin's manifest declares: its top-level sections
|
|
14
|
-
* (each with its own rail)
|
|
15
|
-
* Replaces `registerAdminSection`. Throws on a second
|
|
16
|
-
* same plugin id, slots or not, so a caller that boots a
|
|
17
|
-
* out rather than doubling its entries in the app bar.
|
|
20
|
+
* (each with its own rail), its rail entries in built-in sections and its
|
|
21
|
+
* dashboard widgets. Replaces `registerAdminSection`. Throws on a second
|
|
22
|
+
* registration of the same plugin id, slots or not, so a caller that boots a
|
|
23
|
+
* plugin twice finds out rather than doubling its entries in the app bar.
|
|
18
24
|
*
|
|
19
25
|
* @internal Host-only: the admin calls it with a validated manifest.
|
|
20
26
|
*/
|
|
@@ -29,6 +35,9 @@ export declare function listPluginSections(): RegisteredSection[];
|
|
|
29
35
|
export declare function listRailEntries(section: BuiltInRailSection): RegisteredRailEntry[];
|
|
30
36
|
/** @internal Host-only lookup of one plugin's entry in a built-in rail. */
|
|
31
37
|
export declare function getRailEntry(section: BuiltInRailSection, pluginId: string, entryId: string): RegisteredRailEntry | undefined;
|
|
38
|
+
/** @internal Every registered dashboard widget, in registration order. A
|
|
39
|
+
* copy: changing it changes nothing registered. */
|
|
40
|
+
export declare function listDashboardWidgets(): RegisteredDashboardWidget[];
|
|
32
41
|
/** @internal Clears every registered slot and plugin id. Tests only: the
|
|
33
42
|
* admin registers once per page load. */
|
|
34
43
|
export declare function resetPluginSlotsForTests(): void;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
const registeredPlugins = new Set();
|
|
2
2
|
const sections = [];
|
|
3
3
|
const railEntries = [];
|
|
4
|
+
const dashboardWidgets = [];
|
|
4
5
|
/**
|
|
5
6
|
* Register every slot a plugin's manifest declares: its top-level sections
|
|
6
|
-
* (each with its own rail)
|
|
7
|
-
* Replaces `registerAdminSection`. Throws on a second
|
|
8
|
-
* same plugin id, slots or not, so a caller that boots a
|
|
9
|
-
* out rather than doubling its entries in the app bar.
|
|
7
|
+
* (each with its own rail), its rail entries in built-in sections and its
|
|
8
|
+
* dashboard widgets. Replaces `registerAdminSection`. Throws on a second
|
|
9
|
+
* registration of the same plugin id, slots or not, so a caller that boots a
|
|
10
|
+
* plugin twice finds out rather than doubling its entries in the app bar.
|
|
10
11
|
*
|
|
11
12
|
* @internal Host-only: the admin calls it with a validated manifest.
|
|
12
13
|
*/
|
|
@@ -21,6 +22,9 @@ export function registerPluginSlots(pluginId, manifest) {
|
|
|
21
22
|
for (const entry of manifest.contributions.railEntries ?? []) {
|
|
22
23
|
railEntries.push({ pluginId, entry });
|
|
23
24
|
}
|
|
25
|
+
for (const widget of manifest.contributions.dashboardWidgets ?? []) {
|
|
26
|
+
dashboardWidgets.push({ pluginId, widget });
|
|
27
|
+
}
|
|
24
28
|
}
|
|
25
29
|
/** @internal Host-only lookup of one plugin's section by its id. */
|
|
26
30
|
export function getPluginSection(pluginId, sectionId) {
|
|
@@ -40,10 +44,16 @@ export function listRailEntries(section) {
|
|
|
40
44
|
export function getRailEntry(section, pluginId, entryId) {
|
|
41
45
|
return railEntries.find((registered) => registered.entry.section === section && registered.pluginId === pluginId && registered.entry.id === entryId);
|
|
42
46
|
}
|
|
47
|
+
/** @internal Every registered dashboard widget, in registration order. A
|
|
48
|
+
* copy: changing it changes nothing registered. */
|
|
49
|
+
export function listDashboardWidgets() {
|
|
50
|
+
return [...dashboardWidgets];
|
|
51
|
+
}
|
|
43
52
|
/** @internal Clears every registered slot and plugin id. Tests only: the
|
|
44
53
|
* admin registers once per page load. */
|
|
45
54
|
export function resetPluginSlotsForTests() {
|
|
46
55
|
registeredPlugins.clear();
|
|
47
56
|
sections.length = 0;
|
|
48
57
|
railEntries.length = 0;
|
|
58
|
+
dashboardWidgets.length = 0;
|
|
49
59
|
}
|
package/dist/capabilities.js
CHANGED
|
@@ -35,9 +35,6 @@ export const CAPABILITY_LABELS = {
|
|
|
35
35
|
"admin.section": { operator: "Admin sections", shopper: "Adds admin screens" },
|
|
36
36
|
"admin.railEntry": { operator: "Admin rail entries", shopper: "Adds screens to built-in sections" },
|
|
37
37
|
"admin.dashboardWidget": { operator: "Dashboard widgets", shopper: "Adds dashboard widgets" },
|
|
38
|
-
"admin.settingsPage": { operator: "Settings pages", shopper: "Adds a settings page" },
|
|
39
|
-
"admin.contentTreeAction": { operator: "Content tree actions", shopper: "Adds content tree actions" },
|
|
40
|
-
"admin.editorToolbarItem": { operator: "Editor toolbar items", shopper: "Adds editor toolbar buttons" },
|
|
41
38
|
"render.template": { operator: "Render templates", shopper: "Ships render templates" },
|
|
42
39
|
"render.asset": { operator: "Editable assets", shopper: "Ships editable assets" },
|
|
43
40
|
"theme.tokens": { operator: "Theme tokens", shopper: "Restyles the admin" },
|
package/dist/host-entry.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { registerPluginSlots, getPluginSection, listPluginSections, listRailEntries, getRailEntry, resetPluginSlotsForTests, type RegisteredSection, type RegisteredRailEntry, } from "./admin-section-registry.js";
|
|
1
|
+
export { registerPluginSlots, getPluginSection, listPluginSections, listRailEntries, getRailEntry, listDashboardWidgets, resetPluginSlotsForTests, type RegisteredSection, type RegisteredRailEntry, type RegisteredDashboardWidget, } from "./admin-section-registry.js";
|
package/dist/host-entry.js
CHANGED
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
//
|
|
9
9
|
// Not a stable public API: everything here is @internal and may change in
|
|
10
10
|
// any release without notice.
|
|
11
|
-
export { registerPluginSlots, getPluginSection, listPluginSections, listRailEntries, getRailEntry, resetPluginSlotsForTests, } from "./admin-section-registry.js";
|
|
11
|
+
export { registerPluginSlots, getPluginSection, listPluginSections, listRailEntries, getRailEntry, listDashboardWidgets, resetPluginSlotsForTests, } from "./admin-section-registry.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export type { DataTypePlugin, DataTypePluginViews } from "./data-type-plugin.js";
|
|
2
2
|
export type { IconName } from "./icon-name.js";
|
|
3
3
|
export type { DataTypeIssue, DataTypeValidateContext, DataTypeValidateHook, DataTypeValidatorEntry, DataTypeValidatorLookup, } from "./datatype-validation.js";
|
|
4
|
-
export type { PluginType, DatabaseDialect, DatabaseCompatibility, PluginAssertion, PluginAssertions, PluginMigrationContext, PluginMigration, PluginMigrationValidation, PluginMigrationHooks, PluginInstallContext, PluginUpdateContext, PluginInstallDeclaration, InstallStep, InstallOption, InstallChoice, ResolvedInstallAnswers, HookEvent, HookHandler, PluginHooks, ContentLifecycleHookPayload, PluginHookContext, AdminSectionContribution, BuiltInRailEntryContribution, BuiltInRailSection, RailEntryContribution, SlotLabel, DashboardWidgetContribution, ApiRouteContribution, ScheduledTaskContribution, MediaProcessorContribution,
|
|
4
|
+
export type { PluginType, DatabaseDialect, DatabaseCompatibility, PluginAssertion, PluginAssertions, PluginMigrationContext, PluginMigration, PluginMigrationValidation, PluginMigrationHooks, PluginInstallContext, PluginUpdateContext, PluginInstallDeclaration, InstallStep, InstallOption, InstallChoice, ResolvedInstallAnswers, HookEvent, HookHandler, PluginHooks, ContentLifecycleHookPayload, PluginHookContext, AdminSectionContribution, BuiltInRailEntryContribution, BuiltInRailSection, RailEntryContribution, SlotLabel, DashboardWidgetContribution, ApiRouteContribution, ScheduledTaskContribution, MediaProcessorContribution, ExposedServiceContribution, BundledTemplateContribution, SerializerContext, CustomFormatContribution, SerializerContribution, PluginContributions, PluginManifestBase, PluginManifest, } from "./manifest.js";
|
|
5
5
|
export { slotLabel } from "./manifest.js";
|
|
6
6
|
export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, PROMISED_CAPABILITY_SENTENCE, deriveCapabilities, isActionGated, type Capability, type CapabilityAudience, type CapabilityLabels, type CapabilityMediation, type CapabilityPayload, } from "./capabilities.js";
|
|
7
|
-
export { BUILT_IN_RAIL_SECTIONS, CMSPluginSchema, DataTypePluginSchema, validatePluginManifest, type ValidatePluginManifestResult, } from "./manifest-schema.js";
|
|
7
|
+
export { BUILT_IN_RAIL_SECTIONS, DATABASE_DIALECTS, PLUGIN_TYPES, TIER1_DIALECTS, CMSPluginSchema, DataTypePluginSchema, validatePluginManifest, type ValidatePluginManifestResult, } from "./manifest-schema.js";
|
|
8
8
|
export { definePlugin, PluginDefinitionError } from "./define-plugin.js";
|
|
9
9
|
export { registerDataType, getDataType, listDataTypes } from "./registry.js";
|
|
10
10
|
export { PluginValueProvider, PluginSettingsProvider, PluginApiProvider, ContentHostProvider, usePluginValue, usePluginSettings, usePluginSettingsValue, usePluginApi, useContentHost, MANAGE_API, type PluginFetch, type ContentHost, type ContentHostPage, type ContentHostDocumentType, } from "./plugin-context.js";
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ export { slotLabel } from "./manifest.js";
|
|
|
6
6
|
// all read one source. Exported from the package index as well as the
|
|
7
7
|
// ./manifest subpath because the admin UI renders it.
|
|
8
8
|
export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, PROMISED_CAPABILITY_SENTENCE, deriveCapabilities, isActionGated, } from "./capabilities.js";
|
|
9
|
-
export { BUILT_IN_RAIL_SECTIONS, CMSPluginSchema, DataTypePluginSchema, validatePluginManifest, } from "./manifest-schema.js";
|
|
9
|
+
export { BUILT_IN_RAIL_SECTIONS, DATABASE_DIALECTS, PLUGIN_TYPES, TIER1_DIALECTS, CMSPluginSchema, DataTypePluginSchema, validatePluginManifest, } from "./manifest-schema.js";
|
|
10
10
|
export { definePlugin, PluginDefinitionError } from "./define-plugin.js";
|
|
11
11
|
export { registerDataType, getDataType, listDataTypes } from "./registry.js";
|
|
12
12
|
// The slot registry (spec D8) is not exported here: the host registers a
|
|
@@ -51,17 +51,17 @@ export { MediaFileProvider, useMediaFile, useMediaFileReplace, } from "./views/f
|
|
|
51
51
|
export { MediaRenditionProvider, useMediaRendition, isRenditionIneligible, RENDITION_INELIGIBLE_TYPES, } from "./views/crop-view.js";
|
|
52
52
|
// The "Aa Style ▾" listbox body, extracted out of rich-text-view.tsx (S197
|
|
53
53
|
// Task 11) so the on-page bubble toolbar (apps/admin-ui) can reuse the
|
|
54
|
-
// exact same widget instead of forking it
|
|
54
|
+
// exact same widget instead of forking it: same reasoning as MediaPicker.
|
|
55
55
|
export { StyleListbox } from "./richtext/style-listbox.js";
|
|
56
|
-
// Block insert menu + param panel (S197 Task 3)
|
|
56
|
+
// Block insert menu + param panel (S197 Task 3), exported for the same
|
|
57
57
|
// reason MediaPicker is: the later on-page mount reuses these rather than
|
|
58
58
|
// forking its own.
|
|
59
59
|
export { BlockInsertMenu, defaultBlockParams, useBlockListings, } from "./richtext/insert-menu.js";
|
|
60
60
|
export { BlockPanel, BlockPreviewPopover, BlockParamFields, } from "./richtext/block-panel.js";
|
|
61
61
|
// The SDK's curated re-export of @kardalum/ui. @kardalum/ui is published
|
|
62
62
|
// (not private) because @kardalum/plugin-sdk has a runtime dependency on
|
|
63
|
-
// it
|
|
64
|
-
// is the first consumer to actually need it
|
|
63
|
+
// it: a registry install of the SDK would be unresolvable otherwise. This
|
|
64
|
+
// is the first consumer to actually need it: built-ins.tsx
|
|
65
65
|
// still imports @kardalum/ui directly, a documented TEMPORARY shortcut valid
|
|
66
66
|
// only because built-ins are compiled into the same admin bundle. Google
|
|
67
67
|
// Maps (Session 74) is a separate package on the real public SDK surface, so
|
|
@@ -73,7 +73,7 @@ export { PropertyField,
|
|
|
73
73
|
// An input view is handed to PropertyField as a COMPONENT, so the
|
|
74
74
|
// field's <label> has no child element to point at. Spreading this hook
|
|
75
75
|
// onto the view's own control is how a third-party data type gets an
|
|
76
|
-
// accessible name (WCAG 4.1.2)
|
|
76
|
+
// accessible name (WCAG 4.1.2), see the datatype plugin contract docs.
|
|
77
77
|
usePropertyFieldControl, } from "@kardalum/ui";
|
|
78
78
|
export { Input } from "@kardalum/ui";
|
|
79
79
|
export { Button } from "@kardalum/ui";
|
|
@@ -81,13 +81,13 @@ export { Switch } from "@kardalum/ui";
|
|
|
81
81
|
export { Badge } from "@kardalum/ui";
|
|
82
82
|
export { cn } from "@kardalum/ui";
|
|
83
83
|
// S197 final-review fix F5: this used to end with a bare
|
|
84
|
-
// `import "./built-ins.js"` side effect
|
|
84
|
+
// `import "./built-ins.js"` side effect: importing ANYTHING from this
|
|
85
85
|
// package incidentally registered the six built-in datatypes, whether the
|
|
86
86
|
// consumer wanted that or not. That made this entry point permanently
|
|
87
87
|
// heavy (TipTap always, CodeMirror/lezer since S197 Task 8's HTML
|
|
88
88
|
// datatype), which every first-party plugin's Module Federation `shared`
|
|
89
89
|
// config (pointing at this exact bare specifier) then packaged a dead-
|
|
90
|
-
// weight fallback copy of into its own artifact
|
|
90
|
+
// weight fallback copy of into its own artifact, see
|
|
91
91
|
// `register-built-ins.ts`'s own doc comment for the full story. Built-in
|
|
92
92
|
// registration is now that separate, explicitly-imported subpath
|
|
93
93
|
// (`@kardalum/plugin-sdk/register-built-ins`): apps/admin-ui's
|
|
@@ -5,9 +5,10 @@ import type { TrustedKey } from "@kardalum/plugin-package";
|
|
|
5
5
|
* `useEntitlement` (browser) both verify against this list unless a caller
|
|
6
6
|
* passes its own `trustedKeys`, which is how the tests inject a test key.
|
|
7
7
|
*
|
|
8
|
-
* It holds the
|
|
9
|
-
*
|
|
10
|
-
* apps/server/src/plugins/trusted-signing-keys.ts. The
|
|
8
|
+
* It holds the licence verdict key `e72c11dbcdf71e68` (S304b), the same
|
|
9
|
+
* list as the host's SHIPPED_LICENSE_VERDICT_KEYS in
|
|
10
|
+
* apps/server/src/plugins/trusted-signing-keys.ts. The S284b key
|
|
11
|
+
* `a4c4a883bf1392a6` was retired in S314h. The two lists must name the
|
|
11
12
|
* same keys, because the plugin checks the verdict the host stored; the
|
|
12
13
|
* server's trusted-keys.test.ts imports this list and fails if they differ.
|
|
13
14
|
* The package signing key is deliberately not here.
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
* `useEntitlement` (browser) both verify against this list unless a caller
|
|
5
5
|
* passes its own `trustedKeys`, which is how the tests inject a test key.
|
|
6
6
|
*
|
|
7
|
-
* It holds the
|
|
8
|
-
*
|
|
9
|
-
* apps/server/src/plugins/trusted-signing-keys.ts. The
|
|
7
|
+
* It holds the licence verdict key `e72c11dbcdf71e68` (S304b), the same
|
|
8
|
+
* list as the host's SHIPPED_LICENSE_VERDICT_KEYS in
|
|
9
|
+
* apps/server/src/plugins/trusted-signing-keys.ts. The S284b key
|
|
10
|
+
* `a4c4a883bf1392a6` was retired in S314h. The two lists must name the
|
|
10
11
|
* same keys, because the plugin checks the verdict the host stored; the
|
|
11
12
|
* server's trusted-keys.test.ts imports this list and fails if they differ.
|
|
12
13
|
* The package signing key is deliberately not here.
|
|
@@ -15,10 +16,6 @@
|
|
|
15
16
|
* loading @kardalum/plugin-package.
|
|
16
17
|
*/
|
|
17
18
|
export const LICENSE_VERDICT_PUBLIC_KEYS = [
|
|
18
|
-
{
|
|
19
|
-
keyId: "a4c4a883bf1392a6",
|
|
20
|
-
publicKey: "MCowBQYDK2VwAyEA5GCT1TohzY/oOnB0xZ+7pnvCddka2IBFoJNmmYGu9PI=",
|
|
21
|
-
},
|
|
22
19
|
{
|
|
23
20
|
keyId: "e72c11dbcdf71e68",
|
|
24
21
|
publicKey: "MCowBQYDK2VwAyEA5k/u12E1qUYgQRR4+sjtdmBoYieQdXyunB//groWtCo=",
|
package/dist/manifest-entry.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export type { DataTypePlugin, DataTypePluginViews } from "./data-type-plugin.js";
|
|
2
|
-
export type { PluginType, DatabaseDialect, DatabaseCompatibility, PluginAssertion, PluginAssertions, PluginMigrationContext, PluginMigration, PluginMigrationValidation, PluginMigrationHooks, PluginInstallContext, PluginUpdateContext, PluginInstallDeclaration, InstallStep, InstallOption, InstallChoice, ResolvedInstallAnswers, HookEvent, HookHandler, PluginHooks, ContentLifecycleHookPayload, PluginHookContext, AdminSectionContribution, BuiltInRailEntryContribution, BuiltInRailSection, RailEntryContribution, SlotLabel, DashboardWidgetContribution, ApiRouteContribution, ScheduledTaskContribution, MediaProcessorContribution,
|
|
2
|
+
export type { PluginType, DatabaseDialect, DatabaseCompatibility, PluginAssertion, PluginAssertions, PluginMigrationContext, PluginMigration, PluginMigrationValidation, PluginMigrationHooks, PluginInstallContext, PluginUpdateContext, PluginInstallDeclaration, InstallStep, InstallOption, InstallChoice, ResolvedInstallAnswers, HookEvent, HookHandler, PluginHooks, ContentLifecycleHookPayload, PluginHookContext, AdminSectionContribution, BuiltInRailEntryContribution, BuiltInRailSection, RailEntryContribution, SlotLabel, DashboardWidgetContribution, ApiRouteContribution, ScheduledTaskContribution, MediaProcessorContribution, ExposedServiceContribution, BundledTemplateContribution, SerializerContext, CustomFormatContribution, SerializerContribution, PluginContributions, ViewBearingContribution, PluginManifestBase, PluginManifest, } from "./manifest.js";
|
|
3
3
|
export { VIEW_BEARING_CONTRIBUTIONS, declaresClientBundle, slotLabel } from "./manifest.js";
|
|
4
4
|
export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, PROMISED_CAPABILITY_SENTENCE, deriveCapabilities, isActionGated, type Capability, type CapabilityAudience, type CapabilityLabels, type CapabilityMediation, type CapabilityPayload, } from "./capabilities.js";
|
|
5
|
-
export { ASSERTION_KINDS, AssertionsSchema, BUILT_IN_RAIL_SECTIONS, CMSPluginSchema, CONTRIBUTION_KEYS, DataTypePluginSchema, formatIssues, validatePluginManifest, type ValidatePluginManifestResult, } from "./manifest-schema.js";
|
|
5
|
+
export { ASSERTION_KINDS, AssertionsSchema, BUILT_IN_RAIL_SECTIONS, CMSPluginSchema, CONTRIBUTION_KEYS, DATABASE_DIALECTS, DataTypePluginSchema, PLUGIN_TYPES, TIER1_DIALECTS, formatIssues, validatePluginManifest, type ValidatePluginManifestResult, } from "./manifest-schema.js";
|
|
6
6
|
export type { PluginColumnType, PluginColumnSchema, PluginIndexSchema, PluginTableSchema, StructuredQueryBuilder, StructuredStorageTransaction, ScopedStructuredStorage, PublishedContent, PluginApiRouteContext, } from "./structured-storage-types.js";
|
|
7
7
|
export type { Entitlement, EntitlementErrorCode, EntitlementVerdict, PluginTaskContext } from "./entitlement-types.js";
|
|
8
8
|
export { definePlugin, PluginDefinitionError } from "./define-plugin.js";
|
package/dist/manifest-entry.js
CHANGED
|
@@ -9,5 +9,5 @@ export { VIEW_BEARING_CONTRIBUTIONS, declaresClientBundle, slotLabel } from "./m
|
|
|
9
9
|
// out: no React, no zod, so every non-browser reader of the manifest
|
|
10
10
|
// contract can compute it.
|
|
11
11
|
export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, PROMISED_CAPABILITY_SENTENCE, deriveCapabilities, isActionGated, } from "./capabilities.js";
|
|
12
|
-
export { ASSERTION_KINDS, AssertionsSchema, BUILT_IN_RAIL_SECTIONS, CMSPluginSchema, CONTRIBUTION_KEYS, DataTypePluginSchema, formatIssues, validatePluginManifest, } from "./manifest-schema.js";
|
|
12
|
+
export { ASSERTION_KINDS, AssertionsSchema, BUILT_IN_RAIL_SECTIONS, CMSPluginSchema, CONTRIBUTION_KEYS, DATABASE_DIALECTS, DataTypePluginSchema, PLUGIN_TYPES, TIER1_DIALECTS, formatIssues, validatePluginManifest, } from "./manifest-schema.js";
|
|
13
13
|
export { definePlugin, PluginDefinitionError } from "./define-plugin.js";
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import type { ComponentType } from "react";
|
|
2
2
|
import type { JSONSchema7 } from "json-schema";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import { API_ROUTE_METHODS } from "@kardalum/api-schemas";
|
|
4
|
+
import { API_ROUTE_ACCESS_TIERS, API_ROUTE_METHODS, DATABASE_DIALECTS, PLUGIN_TYPES, STORAGE_TYPES, TEMPLATE_KINDS, TIER1_DIALECTS } from "@kardalum/api-schemas";
|
|
5
5
|
import type { DatabaseDialect, HookHandler, PluginAssertions, PluginContributions, PluginManifest } from "./manifest.js";
|
|
6
|
-
export
|
|
7
|
-
export declare const STORAGE_TYPES: readonly ["simple", "structured"];
|
|
6
|
+
export { API_ROUTE_ACCESS_TIERS, DATABASE_DIALECTS, PLUGIN_TYPES, STORAGE_TYPES, TEMPLATE_KINDS, TIER1_DIALECTS };
|
|
8
7
|
export { API_ROUTE_METHODS };
|
|
9
|
-
export declare const API_ROUTE_ACCESS_TIERS: readonly ["admin", "apiKey", "public"];
|
|
10
|
-
export declare const TEMPLATE_KINDS: readonly ["page", "layout", "partial"];
|
|
11
|
-
export declare const PLUGIN_TYPES: readonly ["datatype", "section", "template", "theme", "integration", "utility", "bundle"];
|
|
12
8
|
export declare const DATATYPE_ENTRY_TYPES: readonly ["datatype"];
|
|
13
9
|
export declare const AssertionsSchema: z.ZodObject<{
|
|
14
10
|
externalNetwork: z.ZodOptional<z.ZodObject<{
|
|
@@ -103,17 +99,17 @@ export declare const CMSPluginSchema: z.ZodObject<{
|
|
|
103
99
|
}, z.core.$strict>>>;
|
|
104
100
|
adminSections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
105
101
|
id: z.ZodString;
|
|
106
|
-
label: z.ZodObject<{
|
|
102
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
107
103
|
en: z.ZodString;
|
|
108
|
-
}, z.core.$catchall<z.ZodString
|
|
104
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
109
105
|
icon: z.ZodString;
|
|
110
106
|
action: z.ZodString;
|
|
111
107
|
view: z.ZodCustom<ComponentType, ComponentType>;
|
|
112
108
|
rail: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
113
109
|
id: z.ZodString;
|
|
114
|
-
label: z.ZodObject<{
|
|
110
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
115
111
|
en: z.ZodString;
|
|
116
|
-
}, z.core.$catchall<z.ZodString
|
|
112
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
117
113
|
icon: z.ZodOptional<z.ZodString>;
|
|
118
114
|
action: z.ZodString;
|
|
119
115
|
view: z.ZodCustom<ComponentType, ComponentType>;
|
|
@@ -128,16 +124,18 @@ export declare const CMSPluginSchema: z.ZodObject<{
|
|
|
128
124
|
settings: "settings";
|
|
129
125
|
users: "users";
|
|
130
126
|
}>;
|
|
131
|
-
label: z.ZodObject<{
|
|
127
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
132
128
|
en: z.ZodString;
|
|
133
|
-
}, z.core.$catchall<z.ZodString
|
|
129
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
134
130
|
icon: z.ZodOptional<z.ZodString>;
|
|
135
131
|
action: z.ZodString;
|
|
136
132
|
view: z.ZodCustom<ComponentType, ComponentType>;
|
|
137
133
|
}, z.core.$strict>>>;
|
|
138
134
|
dashboardWidgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
139
135
|
id: z.ZodString;
|
|
140
|
-
name: z.ZodString
|
|
136
|
+
name: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
137
|
+
en: z.ZodString;
|
|
138
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
141
139
|
view: z.ZodCustom<ComponentType, ComponentType>;
|
|
142
140
|
action: z.ZodString;
|
|
143
141
|
}, z.core.$strict>>>;
|
|
@@ -157,10 +155,10 @@ export declare const CMSPluginSchema: z.ZodObject<{
|
|
|
157
155
|
}>>;
|
|
158
156
|
action: z.ZodOptional<z.ZodString>;
|
|
159
157
|
schema: z.ZodOptional<z.ZodObject<{
|
|
160
|
-
body: z.ZodOptional<z.
|
|
161
|
-
querystring: z.ZodOptional<z.
|
|
162
|
-
params: z.ZodOptional<z.
|
|
163
|
-
response: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
158
|
+
body: z.ZodOptional<z.ZodInstanceOf<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
159
|
+
querystring: z.ZodOptional<z.ZodInstanceOf<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
160
|
+
params: z.ZodOptional<z.ZodInstanceOf<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
161
|
+
response: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodInstanceOf<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>>;
|
|
164
162
|
}, z.core.$strict>>;
|
|
165
163
|
handler: z.ZodCustom<(request: unknown, reply: unknown, context: import("./structured-storage-types.js").PluginApiRouteContext) => unknown, (request: unknown, reply: unknown, context: import("./structured-storage-types.js").PluginApiRouteContext) => unknown>;
|
|
166
164
|
}, z.core.$strict>>>;
|
|
@@ -178,37 +176,24 @@ export declare const CMSPluginSchema: z.ZodObject<{
|
|
|
178
176
|
}> & z.core.$partial, z.ZodCustom<HookHandler, HookHandler>>>;
|
|
179
177
|
scheduledTasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
180
178
|
id: z.ZodString;
|
|
181
|
-
name: z.ZodString
|
|
179
|
+
name: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
180
|
+
en: z.ZodString;
|
|
181
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
182
182
|
cron: z.ZodString;
|
|
183
183
|
run: z.ZodCustom<(context?: import("./entitlement-types.js").PluginTaskContext) => void | Promise<void>, (context?: import("./entitlement-types.js").PluginTaskContext) => void | Promise<void>>;
|
|
184
184
|
}, z.core.$strict>>>;
|
|
185
185
|
mediaProcessors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
186
186
|
id: z.ZodString;
|
|
187
|
-
name: z.ZodString
|
|
187
|
+
name: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
188
|
+
en: z.ZodString;
|
|
189
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
188
190
|
process: z.ZodCustom<(file: unknown) => unknown | Promise<unknown>, (file: unknown) => unknown | Promise<unknown>>;
|
|
189
191
|
}, z.core.$strict>>>;
|
|
190
|
-
settingsPages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
191
|
-
id: z.ZodString;
|
|
192
|
-
name: z.ZodString;
|
|
193
|
-
view: z.ZodCustom<ComponentType, ComponentType>;
|
|
194
|
-
action: z.ZodString;
|
|
195
|
-
}, z.core.$strict>>>;
|
|
196
|
-
contentTreeActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
197
|
-
id: z.ZodString;
|
|
198
|
-
label: z.ZodString;
|
|
199
|
-
onSelect: z.ZodCustom<(nodeId: string) => void | Promise<void>, (nodeId: string) => void | Promise<void>>;
|
|
200
|
-
action: z.ZodString;
|
|
201
|
-
}, z.core.$strict>>>;
|
|
202
|
-
editorToolbar: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
203
|
-
id: z.ZodString;
|
|
204
|
-
label: z.ZodString;
|
|
205
|
-
icon: z.ZodString;
|
|
206
|
-
onClick: z.ZodCustom<() => void | Promise<void>, () => void | Promise<void>>;
|
|
207
|
-
action: z.ZodString;
|
|
208
|
-
}, z.core.$strict>>>;
|
|
209
192
|
exposedServices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
210
193
|
id: z.ZodString;
|
|
211
|
-
name: z.ZodString
|
|
194
|
+
name: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
195
|
+
en: z.ZodString;
|
|
196
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
212
197
|
service: z.ZodUnknown;
|
|
213
198
|
}, z.core.$strict>>>;
|
|
214
199
|
serializers: z.ZodOptional<z.ZodObject<{
|
|
@@ -320,15 +305,8 @@ export declare const CMSPluginSchema: z.ZodObject<{
|
|
|
320
305
|
repository: z.ZodOptional<z.ZodString>;
|
|
321
306
|
}, z.core.$strict>>;
|
|
322
307
|
}, z.core.$strict>;
|
|
323
|
-
id: z.ZodString;
|
|
324
|
-
name: z.ZodString;
|
|
325
|
-
version: z.ZodString;
|
|
326
|
-
description: z.ZodString;
|
|
327
|
-
author: z.ZodString;
|
|
328
|
-
license: z.ZodString;
|
|
329
308
|
price: z.ZodOptional<z.ZodNumber>;
|
|
330
309
|
signature: z.ZodOptional<z.ZodString>;
|
|
331
|
-
cmsVersion: z.ZodString;
|
|
332
310
|
pluginDependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
333
311
|
databaseCompatibility: z.ZodObject<{
|
|
334
312
|
storageType: z.ZodEnum<{
|
|
@@ -377,11 +355,15 @@ export declare const CMSPluginSchema: z.ZodObject<{
|
|
|
377
355
|
}, z.core.$strict>>;
|
|
378
356
|
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
379
357
|
id: z.ZodString;
|
|
380
|
-
label: z.ZodString
|
|
358
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
359
|
+
en: z.ZodString;
|
|
360
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
381
361
|
}, z.core.$strip>>>;
|
|
382
362
|
roles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
383
363
|
id: z.ZodString;
|
|
384
|
-
label: z.ZodString
|
|
364
|
+
label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
|
|
365
|
+
en: z.ZodString;
|
|
366
|
+
}, z.core.$catchall<z.ZodString>>, unknown>]>;
|
|
385
367
|
actions: z.ZodArray<z.ZodString>;
|
|
386
368
|
}, z.core.$strip>>>;
|
|
387
369
|
docs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -401,62 +383,69 @@ export declare const CMSPluginSchema: z.ZodObject<{
|
|
|
401
383
|
id: z.ZodString;
|
|
402
384
|
label: z.ZodPreprocess<z.ZodObject<{
|
|
403
385
|
en: z.ZodString;
|
|
404
|
-
}, z.core.$catchall<z.ZodString
|
|
386
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
405
387
|
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
406
388
|
en: z.ZodString;
|
|
407
|
-
}, z.core.$catchall<z.ZodString
|
|
389
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
408
390
|
options: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
409
391
|
kind: z.ZodLiteral<"boolean">;
|
|
410
392
|
default: z.ZodBoolean;
|
|
411
393
|
id: z.ZodString;
|
|
412
394
|
label: z.ZodPreprocess<z.ZodObject<{
|
|
413
395
|
en: z.ZodString;
|
|
414
|
-
}, z.core.$catchall<z.ZodString
|
|
396
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
415
397
|
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
416
398
|
en: z.ZodString;
|
|
417
|
-
}, z.core.$catchall<z.ZodString
|
|
399
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
418
400
|
}, z.core.$strict>, z.ZodObject<{
|
|
419
401
|
kind: z.ZodLiteral<"select">;
|
|
420
402
|
choices: z.ZodArray<z.ZodObject<{
|
|
421
403
|
id: z.ZodString;
|
|
422
404
|
label: z.ZodPreprocess<z.ZodObject<{
|
|
423
405
|
en: z.ZodString;
|
|
424
|
-
}, z.core.$catchall<z.ZodString
|
|
406
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
425
407
|
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
426
408
|
en: z.ZodString;
|
|
427
|
-
}, z.core.$catchall<z.ZodString
|
|
409
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
428
410
|
}, z.core.$strict>>;
|
|
429
411
|
default: z.ZodOptional<z.ZodString>;
|
|
430
412
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
431
413
|
id: z.ZodString;
|
|
432
414
|
label: z.ZodPreprocess<z.ZodObject<{
|
|
433
415
|
en: z.ZodString;
|
|
434
|
-
}, z.core.$catchall<z.ZodString
|
|
416
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
435
417
|
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
436
418
|
en: z.ZodString;
|
|
437
|
-
}, z.core.$catchall<z.ZodString
|
|
419
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
438
420
|
}, z.core.$strict>, z.ZodObject<{
|
|
439
421
|
kind: z.ZodLiteral<"multiSelect">;
|
|
440
422
|
choices: z.ZodArray<z.ZodObject<{
|
|
441
423
|
id: z.ZodString;
|
|
442
424
|
label: z.ZodPreprocess<z.ZodObject<{
|
|
443
425
|
en: z.ZodString;
|
|
444
|
-
}, z.core.$catchall<z.ZodString
|
|
426
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
445
427
|
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
446
428
|
en: z.ZodString;
|
|
447
|
-
}, z.core.$catchall<z.ZodString
|
|
429
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
448
430
|
}, z.core.$strict>>;
|
|
449
431
|
default: z.ZodArray<z.ZodString>;
|
|
450
432
|
id: z.ZodString;
|
|
451
433
|
label: z.ZodPreprocess<z.ZodObject<{
|
|
452
434
|
en: z.ZodString;
|
|
453
|
-
}, z.core.$catchall<z.ZodString
|
|
435
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
454
436
|
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
455
437
|
en: z.ZodString;
|
|
456
|
-
}, z.core.$catchall<z.ZodString
|
|
438
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
457
439
|
}, z.core.$strict>], "kind">>;
|
|
458
440
|
}, z.core.$strict>>;
|
|
459
441
|
}, z.core.$strict>>;
|
|
442
|
+
id: z.ZodString;
|
|
443
|
+
version: z.ZodString;
|
|
444
|
+
name: z.ZodString;
|
|
445
|
+
description: z.ZodString;
|
|
446
|
+
author: z.ZodString;
|
|
447
|
+
license: z.ZodString;
|
|
448
|
+
cmsVersion: z.ZodString;
|
|
460
449
|
}, z.core.$strict>;
|
|
461
450
|
export declare function formatIssues(issues: z.core.$ZodIssue[]): string[];
|
|
462
451
|
export type ValidatePluginManifestResult = {
|
|
@@ -470,7 +459,7 @@ export type ValidatePluginManifestResult = {
|
|
|
470
459
|
* Validate an untrusted value as a plugin manifest. The registry's
|
|
471
460
|
* install() (Session 62) and `kardalum plugin validate` (Month 7) both go
|
|
472
461
|
* through this: errors come back as readable `path: message` strings
|
|
473
|
-
* (e.g. `contributions
|
|
474
|
-
* contract does not define).
|
|
462
|
+
* (e.g. `contributions: Unrecognized key: "adminSection"` for a key this
|
|
463
|
+
* contract does not define, listed before any issue it causes).
|
|
475
464
|
*/
|
|
476
465
|
export declare function validatePluginManifest(value: unknown): ValidatePluginManifestResult;
|