@kardalum/plugin-sdk 0.15.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 +49 -1
- package/README.md +10 -0
- package/dist/admin-section-registry.d.ts +14 -5
- package/dist/admin-section-registry.js +14 -4
- package/dist/built-in-value-schemas.js +1 -1
- package/dist/built-ins.js +2 -2
- package/dist/capabilities.d.ts +8 -78
- package/dist/capabilities.js +23 -322
- package/dist/host-entry.d.ts +1 -1
- package/dist/host-entry.js +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +13 -12
- package/dist/license-verdict-keys.d.ts +4 -3
- package/dist/license-verdict-keys.js +6 -5
- package/dist/manifest-entry.d.ts +3 -3
- package/dist/manifest-entry.js +2 -2
- package/dist/manifest-schema.d.ts +113 -56
- package/dist/manifest-schema.js +192 -295
- package/dist/manifest.d.ts +145 -112
- package/dist/manifest.js +13 -36
- package/dist/media/media-picker.js +21 -12
- package/dist/media/upload-error.d.ts +1 -1
- package/dist/media/upload-error.js +1 -1
- package/dist/plugin-context.d.ts +7 -0
- package/dist/plugin-context.js +7 -0
- package/dist/plugin-screen-context.d.ts +44 -3
- package/dist/plugin-screen-context.js +27 -2
- package/dist/read-all-pages.d.ts +23 -0
- package/dist/read-all-pages.js +30 -0
- package/dist/richtext/block-panel.js +6 -6
- package/dist/richtext/insert-menu.js +4 -4
- 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/content-list-view.js +2 -2
- package/dist/views/html-view.js +1 -1
- package/dist/views/image-view.js +24 -39
- package/dist/views/rich-text-view.js +3 -3
- package/node_modules/@kardalum/api-schemas/dist/api-error.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/api-error.schema.js +19 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +43 -25
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +60 -8
- 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 +33 -2
- 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.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +18 -13
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +2 -2
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-path.js +11 -7
- 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.d.ts +1 -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 +143 -57
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +110 -60
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +67 -40
- package/node_modules/@kardalum/api-schemas/dist/index.js +35 -19
- 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/management-multipart.schema.d.ts +73 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.js +104 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +356 -16
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +93 -10
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +38 -30
- package/node_modules/@kardalum/api-schemas/dist/media-rendition.schema.js +2 -2
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +1 -1
- 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 +69 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +76 -9
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +84 -24
- 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 +69 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +59 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +597 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +503 -0
- 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 +82 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +228 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +33 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +28 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +11 -3
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +17 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +58 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +198 -0
- 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.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +23 -4
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +4 -4
- package/node_modules/@kardalum/api-schemas/dist/role.schema.d.ts +17 -0
- package/node_modules/@kardalum/api-schemas/dist/role.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +44 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +97 -0
- 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 +36 -6
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +17 -5
- package/node_modules/@kardalum/api-schemas/dist/sites.schema.d.ts +52 -33
- package/node_modules/@kardalum/api-schemas/dist/sites.schema.js +195 -56
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +19 -3
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.js +16 -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 +47 -7
- 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 +15 -3
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +8 -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 +96 -0
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +66 -0
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +103 -0
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +346 -0
- 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 +11 -2
- package/node_modules/@kardalum/plugin-package/dist/index.js +8 -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 +3 -0
- package/node_modules/@kardalum/plugin-package/dist/reference-entry.js +7 -0
- package/node_modules/@kardalum/plugin-package/dist/sample-content.d.ts +38 -1
- package/node_modules/@kardalum/plugin-package/dist/sample-content.js +84 -16
- 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/dist/types.d.ts +4 -6
- package/node_modules/@kardalum/plugin-package/dist/types.js +15 -1
- package/node_modules/@kardalum/plugin-package/package.json +9 -2
- package/node_modules/@kardalum/ui/dist/components/checkbox.js +2 -2
- package/node_modules/@kardalum/ui/dist/components/dropdown-menu.js +2 -2
- package/node_modules/@kardalum/ui/dist/components/property-field.js +4 -1
- package/node_modules/@kardalum/ui/package.json +1 -1
- package/package.json +6 -6
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,14 +1,14 @@
|
|
|
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, 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
|
-
export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, 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";
|
|
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, 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
|
-
export { PluginValueProvider, PluginSettingsProvider, PluginApiProvider, ContentHostProvider, usePluginValue, usePluginSettings, usePluginSettingsValue, usePluginApi, useContentHost, type PluginFetch, type ContentHost, type ContentHostPage, type ContentHostDocumentType, } from "./plugin-context.js";
|
|
11
|
-
export { PluginScreenProvider, usePluginScreen, type PluginScreenContext, } from "./plugin-screen-context.js";
|
|
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";
|
|
11
|
+
export { PluginScreenProvider, PluginTranslateProvider, usePluginScreen, usePluginTranslate, type PluginScreenContext, type PluginTranslate, } from "./plugin-screen-context.js";
|
|
12
12
|
export { SimpleStorageValueProvider } from "./simple-storage-value-provider.js";
|
|
13
13
|
export { EntitlementGate, useEntitlement, type EntitlementStatus, type UseEntitlementResult, } from "./entitlement-gate.js";
|
|
14
14
|
export type { Entitlement, EntitlementErrorCode, EntitlementVerdict, PluginTaskContext } from "./entitlement-types.js";
|
package/dist/index.js
CHANGED
|
@@ -5,8 +5,8 @@ export { slotLabel } from "./manifest.js";
|
|
|
5
5
|
// install screen, marketplace review and the generated reference page
|
|
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
|
-
export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, deriveCapabilities, isActionGated, } from "./capabilities.js";
|
|
9
|
-
export { BUILT_IN_RAIL_SECTIONS, CMSPluginSchema, DataTypePluginSchema, validatePluginManifest, } from "./manifest-schema.js";
|
|
8
|
+
export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, PROMISED_CAPABILITY_SENTENCE, deriveCapabilities, isActionGated, } from "./capabilities.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
|
|
@@ -14,10 +14,11 @@ export { registerDataType, getDataType, listDataTypes } from "./registry.js";
|
|
|
14
14
|
// `@kardalum/plugin-sdk/host` subpath (host-entry.ts). Federation shares
|
|
15
15
|
// the bare package name only, not that subpath, so a plugin that imports it
|
|
16
16
|
// anyway registers into its own bundled copy, never the host's registry.
|
|
17
|
-
export { PluginValueProvider, PluginSettingsProvider, PluginApiProvider, ContentHostProvider, usePluginValue, usePluginSettings, usePluginSettingsValue, usePluginApi, useContentHost, } from "./plugin-context.js";
|
|
17
|
+
export { PluginValueProvider, PluginSettingsProvider, PluginApiProvider, ContentHostProvider, usePluginValue, usePluginSettings, usePluginSettingsValue, usePluginApi, useContentHost, MANAGE_API, } from "./plugin-context.js";
|
|
18
18
|
// S280 (spec D7): what a plugin screen (a section, its rail entries, a rail
|
|
19
|
-
// entry in a built-in section) learns about where it is rendered.
|
|
20
|
-
|
|
19
|
+
// entry in a built-in section) learns about where it is rendered. S291: the
|
|
20
|
+
// plugin's t for views outside a screen (a data type's views).
|
|
21
|
+
export { PluginScreenProvider, PluginTranslateProvider, usePluginScreen, usePluginTranslate, } from "./plugin-screen-context.js";
|
|
21
22
|
export { SimpleStorageValueProvider } from "./simple-storage-value-provider.js";
|
|
22
23
|
// S284b: the entitlement in a view. The verifier for plugin SERVER code is
|
|
23
24
|
// the separate `@kardalum/plugin-sdk/entitlement` subpath (it needs
|
|
@@ -50,17 +51,17 @@ export { MediaFileProvider, useMediaFile, useMediaFileReplace, } from "./views/f
|
|
|
50
51
|
export { MediaRenditionProvider, useMediaRendition, isRenditionIneligible, RENDITION_INELIGIBLE_TYPES, } from "./views/crop-view.js";
|
|
51
52
|
// The "Aa Style ▾" listbox body, extracted out of rich-text-view.tsx (S197
|
|
52
53
|
// Task 11) so the on-page bubble toolbar (apps/admin-ui) can reuse the
|
|
53
|
-
// exact same widget instead of forking it
|
|
54
|
+
// exact same widget instead of forking it: same reasoning as MediaPicker.
|
|
54
55
|
export { StyleListbox } from "./richtext/style-listbox.js";
|
|
55
|
-
// Block insert menu + param panel (S197 Task 3)
|
|
56
|
+
// Block insert menu + param panel (S197 Task 3), exported for the same
|
|
56
57
|
// reason MediaPicker is: the later on-page mount reuses these rather than
|
|
57
58
|
// forking its own.
|
|
58
59
|
export { BlockInsertMenu, defaultBlockParams, useBlockListings, } from "./richtext/insert-menu.js";
|
|
59
60
|
export { BlockPanel, BlockPreviewPopover, BlockParamFields, } from "./richtext/block-panel.js";
|
|
60
61
|
// The SDK's curated re-export of @kardalum/ui. @kardalum/ui is published
|
|
61
62
|
// (not private) because @kardalum/plugin-sdk has a runtime dependency on
|
|
62
|
-
// it
|
|
63
|
-
// 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
|
|
64
65
|
// still imports @kardalum/ui directly, a documented TEMPORARY shortcut valid
|
|
65
66
|
// only because built-ins are compiled into the same admin bundle. Google
|
|
66
67
|
// Maps (Session 74) is a separate package on the real public SDK surface, so
|
|
@@ -72,7 +73,7 @@ export { PropertyField,
|
|
|
72
73
|
// An input view is handed to PropertyField as a COMPONENT, so the
|
|
73
74
|
// field's <label> has no child element to point at. Spreading this hook
|
|
74
75
|
// onto the view's own control is how a third-party data type gets an
|
|
75
|
-
// accessible name (WCAG 4.1.2)
|
|
76
|
+
// accessible name (WCAG 4.1.2), see the datatype plugin contract docs.
|
|
76
77
|
usePropertyFieldControl, } from "@kardalum/ui";
|
|
77
78
|
export { Input } from "@kardalum/ui";
|
|
78
79
|
export { Button } from "@kardalum/ui";
|
|
@@ -80,13 +81,13 @@ export { Switch } from "@kardalum/ui";
|
|
|
80
81
|
export { Badge } from "@kardalum/ui";
|
|
81
82
|
export { cn } from "@kardalum/ui";
|
|
82
83
|
// S197 final-review fix F5: this used to end with a bare
|
|
83
|
-
// `import "./built-ins.js"` side effect
|
|
84
|
+
// `import "./built-ins.js"` side effect: importing ANYTHING from this
|
|
84
85
|
// package incidentally registered the six built-in datatypes, whether the
|
|
85
86
|
// consumer wanted that or not. That made this entry point permanently
|
|
86
87
|
// heavy (TipTap always, CodeMirror/lezer since S197 Task 8's HTML
|
|
87
88
|
// datatype), which every first-party plugin's Module Federation `shared`
|
|
88
89
|
// config (pointing at this exact bare specifier) then packaged a dead-
|
|
89
|
-
// weight fallback copy of into its own artifact
|
|
90
|
+
// weight fallback copy of into its own artifact, see
|
|
90
91
|
// `register-built-ins.ts`'s own doc comment for the full story. Built-in
|
|
91
92
|
// registration is now that separate, explicitly-imported subpath
|
|
92
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.
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
*/
|
|
17
18
|
export const LICENSE_VERDICT_PUBLIC_KEYS = [
|
|
18
19
|
{
|
|
19
|
-
keyId: "
|
|
20
|
-
publicKey: "
|
|
20
|
+
keyId: "e72c11dbcdf71e68",
|
|
21
|
+
publicKey: "MCowBQYDK2VwAyEA5k/u12E1qUYgQRR4+sjtdmBoYieQdXyunB//groWtCo=",
|
|
21
22
|
},
|
|
22
23
|
];
|
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, 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
|
-
export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, 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";
|
|
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, 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
|
@@ -8,6 +8,6 @@ export { VIEW_BEARING_CONTRIBUTIONS, declaresClientBundle, slotLabel } from "./m
|
|
|
8
8
|
// The derived capability list (S268 Task 5). Pure data in, pure data
|
|
9
9
|
// out: no React, no zod, so every non-browser reader of the manifest
|
|
10
10
|
// contract can compute it.
|
|
11
|
-
export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, deriveCapabilities, isActionGated, } from "./capabilities.js";
|
|
12
|
-
export { ASSERTION_KINDS, AssertionsSchema, BUILT_IN_RAIL_SECTIONS, CMSPluginSchema, CONTRIBUTION_KEYS, DataTypePluginSchema, formatIssues, validatePluginManifest, } from "./manifest-schema.js";
|
|
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, DATABASE_DIALECTS, DataTypePluginSchema, PLUGIN_TYPES, TIER1_DIALECTS, formatIssues, validatePluginManifest, } from "./manifest-schema.js";
|
|
13
13
|
export { definePlugin, PluginDefinitionError } from "./define-plugin.js";
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { ComponentType } from "react";
|
|
2
2
|
import type { JSONSchema7 } from "json-schema";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import
|
|
4
|
+
import { API_ROUTE_ACCESS_TIERS, API_ROUTE_METHODS, DATABASE_DIALECTS, PLUGIN_TYPES, STORAGE_TYPES, TEMPLATE_KINDS, TIER1_DIALECTS } from "@kardalum/api-schemas";
|
|
5
|
+
import type { DatabaseDialect, HookHandler, PluginAssertions, PluginContributions, PluginManifest } from "./manifest.js";
|
|
6
|
+
export { API_ROUTE_ACCESS_TIERS, DATABASE_DIALECTS, PLUGIN_TYPES, STORAGE_TYPES, TEMPLATE_KINDS, TIER1_DIALECTS };
|
|
7
|
+
export { API_ROUTE_METHODS };
|
|
8
|
+
export declare const DATATYPE_ENTRY_TYPES: readonly ["datatype"];
|
|
5
9
|
export declare const AssertionsSchema: z.ZodObject<{
|
|
6
10
|
externalNetwork: z.ZodOptional<z.ZodObject<{
|
|
7
11
|
reason: z.ZodString;
|
|
@@ -22,6 +26,7 @@ export declare const AssertionsSchema: z.ZodObject<{
|
|
|
22
26
|
* schema gives the mirror something to be pinned against.
|
|
23
27
|
*/
|
|
24
28
|
export declare const ASSERTION_KINDS: (keyof PluginAssertions)[];
|
|
29
|
+
export declare const HOOK_EVENTS: readonly ["content:beforeSave", "content:afterSave", "content:beforePublish", "content:afterPublish", "content:afterTrash", "content:afterRestore", "content:beforeDelete", "media:afterUpload", "user:afterLogin", "api:beforeResponse"];
|
|
25
30
|
export declare const DataTypePluginSchema: z.ZodObject<{
|
|
26
31
|
id: z.ZodString;
|
|
27
32
|
name: z.ZodString;
|
|
@@ -94,17 +99,17 @@ export declare const CMSPluginSchema: z.ZodObject<{
|
|
|
94
99
|
}, z.core.$strict>>>;
|
|
95
100
|
adminSections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
96
101
|
id: z.ZodString;
|
|
97
|
-
label: z.ZodObject<{
|
|
102
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
98
103
|
en: z.ZodString;
|
|
99
|
-
}, z.core.$catchall<z.ZodString
|
|
104
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
100
105
|
icon: z.ZodString;
|
|
101
106
|
action: z.ZodString;
|
|
102
107
|
view: z.ZodCustom<ComponentType, ComponentType>;
|
|
103
108
|
rail: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
104
109
|
id: z.ZodString;
|
|
105
|
-
label: z.ZodObject<{
|
|
110
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
106
111
|
en: z.ZodString;
|
|
107
|
-
}, z.core.$catchall<z.ZodString
|
|
112
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
108
113
|
icon: z.ZodOptional<z.ZodString>;
|
|
109
114
|
action: z.ZodString;
|
|
110
115
|
view: z.ZodCustom<ComponentType, ComponentType>;
|
|
@@ -115,20 +120,22 @@ export declare const CMSPluginSchema: z.ZodObject<{
|
|
|
115
120
|
id: z.ZodString;
|
|
116
121
|
section: z.ZodEnum<{
|
|
117
122
|
media: "media";
|
|
118
|
-
settings: "settings";
|
|
119
123
|
content: "content";
|
|
124
|
+
settings: "settings";
|
|
120
125
|
users: "users";
|
|
121
126
|
}>;
|
|
122
|
-
label: z.ZodObject<{
|
|
127
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
123
128
|
en: z.ZodString;
|
|
124
|
-
}, z.core.$catchall<z.ZodString
|
|
129
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
125
130
|
icon: z.ZodOptional<z.ZodString>;
|
|
126
131
|
action: z.ZodString;
|
|
127
132
|
view: z.ZodCustom<ComponentType, ComponentType>;
|
|
128
133
|
}, z.core.$strict>>>;
|
|
129
134
|
dashboardWidgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
130
135
|
id: z.ZodString;
|
|
131
|
-
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>]>;
|
|
132
139
|
view: z.ZodCustom<ComponentType, ComponentType>;
|
|
133
140
|
action: z.ZodString;
|
|
134
141
|
}, z.core.$strict>>>;
|
|
@@ -148,9 +155,10 @@ export declare const CMSPluginSchema: z.ZodObject<{
|
|
|
148
155
|
}>>;
|
|
149
156
|
action: z.ZodOptional<z.ZodString>;
|
|
150
157
|
schema: z.ZodOptional<z.ZodObject<{
|
|
151
|
-
body: z.ZodOptional<z.
|
|
152
|
-
querystring: z.ZodOptional<z.
|
|
153
|
-
params: z.ZodOptional<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>>>>>;
|
|
154
162
|
}, z.core.$strict>>;
|
|
155
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>;
|
|
156
164
|
}, z.core.$strict>>>;
|
|
@@ -168,37 +176,24 @@ export declare const CMSPluginSchema: z.ZodObject<{
|
|
|
168
176
|
}> & z.core.$partial, z.ZodCustom<HookHandler, HookHandler>>>;
|
|
169
177
|
scheduledTasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
170
178
|
id: z.ZodString;
|
|
171
|
-
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>]>;
|
|
172
182
|
cron: z.ZodString;
|
|
173
183
|
run: z.ZodCustom<(context?: import("./entitlement-types.js").PluginTaskContext) => void | Promise<void>, (context?: import("./entitlement-types.js").PluginTaskContext) => void | Promise<void>>;
|
|
174
184
|
}, z.core.$strict>>>;
|
|
175
185
|
mediaProcessors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
176
186
|
id: z.ZodString;
|
|
177
|
-
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>]>;
|
|
178
190
|
process: z.ZodCustom<(file: unknown) => unknown | Promise<unknown>, (file: unknown) => unknown | Promise<unknown>>;
|
|
179
191
|
}, z.core.$strict>>>;
|
|
180
|
-
settingsPages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
181
|
-
id: z.ZodString;
|
|
182
|
-
name: z.ZodString;
|
|
183
|
-
view: z.ZodCustom<ComponentType, ComponentType>;
|
|
184
|
-
action: z.ZodString;
|
|
185
|
-
}, z.core.$strict>>>;
|
|
186
|
-
contentTreeActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
187
|
-
id: z.ZodString;
|
|
188
|
-
label: z.ZodString;
|
|
189
|
-
onSelect: z.ZodCustom<(nodeId: string) => void | Promise<void>, (nodeId: string) => void | Promise<void>>;
|
|
190
|
-
action: z.ZodString;
|
|
191
|
-
}, z.core.$strict>>>;
|
|
192
|
-
editorToolbar: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
193
|
-
id: z.ZodString;
|
|
194
|
-
label: z.ZodString;
|
|
195
|
-
icon: z.ZodString;
|
|
196
|
-
onClick: z.ZodCustom<() => void | Promise<void>, () => void | Promise<void>>;
|
|
197
|
-
action: z.ZodString;
|
|
198
|
-
}, z.core.$strict>>>;
|
|
199
192
|
exposedServices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
200
193
|
id: z.ZodString;
|
|
201
|
-
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>]>;
|
|
202
197
|
service: z.ZodUnknown;
|
|
203
198
|
}, z.core.$strict>>>;
|
|
204
199
|
serializers: z.ZodOptional<z.ZodObject<{
|
|
@@ -310,20 +305,13 @@ export declare const CMSPluginSchema: z.ZodObject<{
|
|
|
310
305
|
repository: z.ZodOptional<z.ZodString>;
|
|
311
306
|
}, z.core.$strict>>;
|
|
312
307
|
}, z.core.$strict>;
|
|
313
|
-
id: z.ZodString;
|
|
314
|
-
name: z.ZodString;
|
|
315
|
-
version: z.ZodString;
|
|
316
|
-
description: z.ZodString;
|
|
317
|
-
author: z.ZodString;
|
|
318
|
-
license: z.ZodString;
|
|
319
308
|
price: z.ZodOptional<z.ZodNumber>;
|
|
320
309
|
signature: z.ZodOptional<z.ZodString>;
|
|
321
|
-
cmsVersion: z.ZodString;
|
|
322
310
|
pluginDependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
323
311
|
databaseCompatibility: z.ZodObject<{
|
|
324
312
|
storageType: z.ZodEnum<{
|
|
325
|
-
structured: "structured";
|
|
326
313
|
simple: "simple";
|
|
314
|
+
structured: "structured";
|
|
327
315
|
}>;
|
|
328
316
|
supported: z.ZodArray<z.ZodEnum<{
|
|
329
317
|
postgresql: "postgresql";
|
|
@@ -354,28 +342,28 @@ export declare const CMSPluginSchema: z.ZodObject<{
|
|
|
354
342
|
up: z.ZodCustom<(ctx: import("./manifest.js").PluginMigrationContext) => void | Promise<void>, (ctx: import("./manifest.js").PluginMigrationContext) => void | Promise<void>>;
|
|
355
343
|
down: z.ZodCustom<(ctx: import("./manifest.js").PluginMigrationContext) => void | Promise<void>, (ctx: import("./manifest.js").PluginMigrationContext) => void | Promise<void>>;
|
|
356
344
|
}, z.core.$strict>>>;
|
|
357
|
-
onInstall: z.ZodOptional<z.ZodCustom<() => void | Promise<void>, () => void | Promise<void>>>;
|
|
345
|
+
onInstall: z.ZodOptional<z.ZodCustom<(ctx: import("./manifest.js").PluginInstallContext) => void | Promise<void>, (ctx: import("./manifest.js").PluginInstallContext) => void | Promise<void>>>;
|
|
358
346
|
onUninstall: z.ZodOptional<z.ZodCustom<() => void | Promise<void>, () => void | Promise<void>>>;
|
|
359
347
|
onActivate: z.ZodOptional<z.ZodCustom<() => void | Promise<void>, () => void | Promise<void>>>;
|
|
360
348
|
onDeactivate: z.ZodOptional<z.ZodCustom<() => void | Promise<void>, () => void | Promise<void>>>;
|
|
361
|
-
onUpdate: z.ZodOptional<z.ZodCustom<(ctx:
|
|
362
|
-
fromVersion: string;
|
|
363
|
-
}) => void | Promise<void>, (ctx: {
|
|
364
|
-
fromVersion: string;
|
|
365
|
-
}) => void | Promise<void>>>;
|
|
349
|
+
onUpdate: z.ZodOptional<z.ZodCustom<(ctx: import("./manifest.js").PluginUpdateContext) => void | Promise<void>, (ctx: import("./manifest.js").PluginUpdateContext) => void | Promise<void>>>;
|
|
366
350
|
migrationHooks: z.ZodOptional<z.ZodObject<{
|
|
367
|
-
beforeMigration: z.ZodOptional<z.ZodCustom<(from:
|
|
368
|
-
transformRow: z.ZodOptional<z.ZodCustom<(table: string, row: Record<string, unknown>, from:
|
|
369
|
-
afterMigration: z.ZodOptional<z.ZodCustom<(from:
|
|
370
|
-
validateMigration: z.ZodOptional<z.ZodCustom<(from:
|
|
351
|
+
beforeMigration: z.ZodOptional<z.ZodCustom<(from: DatabaseDialect, to: DatabaseDialect) => void | Promise<void>, (from: DatabaseDialect, to: DatabaseDialect) => void | Promise<void>>>;
|
|
352
|
+
transformRow: z.ZodOptional<z.ZodCustom<(table: string, row: Record<string, unknown>, from: DatabaseDialect, to: DatabaseDialect) => Record<string, unknown> | Promise<Record<string, unknown>>, (table: string, row: Record<string, unknown>, from: DatabaseDialect, to: DatabaseDialect) => Record<string, unknown> | Promise<Record<string, unknown>>>>;
|
|
353
|
+
afterMigration: z.ZodOptional<z.ZodCustom<(from: DatabaseDialect, to: DatabaseDialect) => void | Promise<void>, (from: DatabaseDialect, to: DatabaseDialect) => void | Promise<void>>>;
|
|
354
|
+
validateMigration: z.ZodOptional<z.ZodCustom<(from: DatabaseDialect, to: DatabaseDialect) => import("./manifest.js").PluginMigrationValidation | Promise<import("./manifest.js").PluginMigrationValidation>, (from: DatabaseDialect, to: DatabaseDialect) => import("./manifest.js").PluginMigrationValidation | Promise<import("./manifest.js").PluginMigrationValidation>>>;
|
|
371
355
|
}, z.core.$strict>>;
|
|
372
356
|
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
373
357
|
id: z.ZodString;
|
|
374
|
-
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>]>;
|
|
375
361
|
}, z.core.$strip>>>;
|
|
376
362
|
roles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
377
363
|
id: z.ZodString;
|
|
378
|
-
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>]>;
|
|
379
367
|
actions: z.ZodArray<z.ZodString>;
|
|
380
368
|
}, z.core.$strip>>>;
|
|
381
369
|
docs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -389,6 +377,75 @@ export declare const CMSPluginSchema: z.ZodObject<{
|
|
|
389
377
|
path: z.ZodString;
|
|
390
378
|
title: z.ZodString;
|
|
391
379
|
}, z.core.$strict>>>;
|
|
380
|
+
docsLanguage: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodString>>;
|
|
381
|
+
install: z.ZodOptional<z.ZodObject<{
|
|
382
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
383
|
+
id: z.ZodString;
|
|
384
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
385
|
+
en: z.ZodString;
|
|
386
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
387
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
388
|
+
en: z.ZodString;
|
|
389
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
390
|
+
options: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
391
|
+
kind: z.ZodLiteral<"boolean">;
|
|
392
|
+
default: z.ZodBoolean;
|
|
393
|
+
id: z.ZodString;
|
|
394
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
395
|
+
en: z.ZodString;
|
|
396
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
397
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
398
|
+
en: z.ZodString;
|
|
399
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
400
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
401
|
+
kind: z.ZodLiteral<"select">;
|
|
402
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
403
|
+
id: z.ZodString;
|
|
404
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
405
|
+
en: z.ZodString;
|
|
406
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
407
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
408
|
+
en: z.ZodString;
|
|
409
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
410
|
+
}, z.core.$strict>>;
|
|
411
|
+
default: z.ZodOptional<z.ZodString>;
|
|
412
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
413
|
+
id: z.ZodString;
|
|
414
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
415
|
+
en: z.ZodString;
|
|
416
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
417
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
418
|
+
en: z.ZodString;
|
|
419
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
420
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
421
|
+
kind: z.ZodLiteral<"multiSelect">;
|
|
422
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
423
|
+
id: z.ZodString;
|
|
424
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
425
|
+
en: z.ZodString;
|
|
426
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
427
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
428
|
+
en: z.ZodString;
|
|
429
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
430
|
+
}, z.core.$strict>>;
|
|
431
|
+
default: z.ZodArray<z.ZodString>;
|
|
432
|
+
id: z.ZodString;
|
|
433
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
434
|
+
en: z.ZodString;
|
|
435
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
436
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
437
|
+
en: z.ZodString;
|
|
438
|
+
}, z.core.$catchall<z.ZodString>>, unknown>>;
|
|
439
|
+
}, z.core.$strict>], "kind">>;
|
|
440
|
+
}, z.core.$strict>>;
|
|
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;
|
|
392
449
|
}, z.core.$strict>;
|
|
393
450
|
export declare function formatIssues(issues: z.core.$ZodIssue[]): string[];
|
|
394
451
|
export type ValidatePluginManifestResult = {
|
|
@@ -402,7 +459,7 @@ export type ValidatePluginManifestResult = {
|
|
|
402
459
|
* Validate an untrusted value as a plugin manifest. The registry's
|
|
403
460
|
* install() (Session 62) and `kardalum plugin validate` (Month 7) both go
|
|
404
461
|
* through this: errors come back as readable `path: message` strings
|
|
405
|
-
* (e.g. `contributions
|
|
406
|
-
* 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).
|
|
407
464
|
*/
|
|
408
465
|
export declare function validatePluginManifest(value: unknown): ValidatePluginManifestResult;
|