@forumone/throughline 0.0.0-stage → 1.0.0-next.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 +584 -0
- package/LICENSE +21 -0
- package/README.md +351 -2
- package/bin/payload-cli.mjs +443 -0
- package/bin/throughline-payload.mjs +6 -0
- package/dist/access/coreCollections.d.ts +18 -0
- package/dist/access/coreCollections.d.ts.map +1 -0
- package/dist/access/coreCollections.js +56 -0
- package/dist/access/coreCollections.js.map +1 -0
- package/dist/approvals/collection.d.ts +21 -0
- package/dist/approvals/collection.d.ts.map +1 -0
- package/dist/approvals/collection.js +99 -0
- package/dist/approvals/collection.js.map +1 -0
- package/dist/approvals/endpoints/action.d.ts +31 -0
- package/dist/approvals/endpoints/action.d.ts.map +1 -0
- package/dist/approvals/endpoints/action.js +205 -0
- package/dist/approvals/endpoints/action.js.map +1 -0
- package/dist/approvals/index.d.ts +19 -0
- package/dist/approvals/index.d.ts.map +1 -0
- package/dist/approvals/index.js +13 -0
- package/dist/approvals/index.js.map +1 -0
- package/dist/approvals/jobs/expire-stale-approvals.d.ts +14 -0
- package/dist/approvals/jobs/expire-stale-approvals.d.ts.map +1 -0
- package/dist/approvals/jobs/expire-stale-approvals.js +101 -0
- package/dist/approvals/jobs/expire-stale-approvals.js.map +1 -0
- package/dist/approvals/options.d.ts +76 -0
- package/dist/approvals/options.d.ts.map +1 -0
- package/dist/approvals/options.js +47 -0
- package/dist/approvals/options.js.map +1 -0
- package/dist/approvals/plugin.d.ts +4 -0
- package/dist/approvals/plugin.d.ts.map +1 -0
- package/dist/approvals/plugin.js +92 -0
- package/dist/approvals/plugin.js.map +1 -0
- package/dist/approvals/resolver.d.ts +18 -0
- package/dist/approvals/resolver.d.ts.map +1 -0
- package/dist/approvals/resolver.js +57 -0
- package/dist/approvals/resolver.js.map +1 -0
- package/dist/approvals/symbol.d.ts +12 -0
- package/dist/approvals/symbol.d.ts.map +1 -0
- package/dist/approvals/symbol.js +12 -0
- package/dist/approvals/symbol.js.map +1 -0
- package/dist/approvals/tokens.d.ts +48 -0
- package/dist/approvals/tokens.d.ts.map +1 -0
- package/dist/approvals/tokens.js +123 -0
- package/dist/approvals/tokens.js.map +1 -0
- package/dist/approvals/tools/descriptors.d.ts +26 -0
- package/dist/approvals/tools/descriptors.d.ts.map +1 -0
- package/dist/approvals/tools/descriptors.js +35 -0
- package/dist/approvals/tools/descriptors.js.map +1 -0
- package/dist/approvals/tools/get-approval-status.d.ts +11 -0
- package/dist/approvals/tools/get-approval-status.d.ts.map +1 -0
- package/dist/approvals/tools/get-approval-status.js +94 -0
- package/dist/approvals/tools/get-approval-status.js.map +1 -0
- package/dist/approvals/tools/index.d.ts +7 -0
- package/dist/approvals/tools/index.d.ts.map +1 -0
- package/dist/approvals/tools/index.js +7 -0
- package/dist/approvals/tools/index.js.map +1 -0
- package/dist/approvals/tools/list-my-requests.d.ts +11 -0
- package/dist/approvals/tools/list-my-requests.d.ts.map +1 -0
- package/dist/approvals/tools/list-my-requests.js +55 -0
- package/dist/approvals/tools/list-my-requests.js.map +1 -0
- package/dist/approvals/tools/list-pending-approvals.d.ts +11 -0
- package/dist/approvals/tools/list-pending-approvals.d.ts.map +1 -0
- package/dist/approvals/tools/list-pending-approvals.js +53 -0
- package/dist/approvals/tools/list-pending-approvals.js.map +1 -0
- package/dist/approvals/tools/request-approval.d.ts +13 -0
- package/dist/approvals/tools/request-approval.d.ts.map +1 -0
- package/dist/approvals/tools/request-approval.js +123 -0
- package/dist/approvals/tools/request-approval.js.map +1 -0
- package/dist/approvals/tools/respond-to-approval.d.ts +13 -0
- package/dist/approvals/tools/respond-to-approval.d.ts.map +1 -0
- package/dist/approvals/tools/respond-to-approval.js +98 -0
- package/dist/approvals/tools/respond-to-approval.js.map +1 -0
- package/dist/audit/collection.d.ts +22 -0
- package/dist/audit/collection.d.ts.map +1 -0
- package/dist/audit/collection.js +109 -0
- package/dist/audit/collection.js.map +1 -0
- package/dist/audit/index.d.ts +16 -0
- package/dist/audit/index.d.ts.map +1 -0
- package/dist/audit/index.js +11 -0
- package/dist/audit/index.js.map +1 -0
- package/dist/audit/jobs/audit-event-echo.d.ts +14 -0
- package/dist/audit/jobs/audit-event-echo.d.ts.map +1 -0
- package/dist/audit/jobs/audit-event-echo.js +61 -0
- package/dist/audit/jobs/audit-event-echo.js.map +1 -0
- package/dist/audit/plugin.d.ts +20 -0
- package/dist/audit/plugin.d.ts.map +1 -0
- package/dist/audit/plugin.js +55 -0
- package/dist/audit/plugin.js.map +1 -0
- package/dist/audit/query/formatting/index.d.ts +40 -0
- package/dist/audit/query/formatting/index.d.ts.map +1 -0
- package/dist/audit/query/formatting/index.js +73 -0
- package/dist/audit/query/formatting/index.js.map +1 -0
- package/dist/audit/query/options.d.ts +34 -0
- package/dist/audit/query/options.d.ts.map +1 -0
- package/dist/audit/query/options.js +8 -0
- package/dist/audit/query/options.js.map +1 -0
- package/dist/audit/query/plugin.d.ts +11 -0
- package/dist/audit/query/plugin.d.ts.map +1 -0
- package/dist/audit/query/plugin.js +68 -0
- package/dist/audit/query/plugin.js.map +1 -0
- package/dist/audit/query/tools/access.d.ts +9 -0
- package/dist/audit/query/tools/access.d.ts.map +1 -0
- package/dist/audit/query/tools/access.js +14 -0
- package/dist/audit/query/tools/access.js.map +1 -0
- package/dist/audit/query/tools/descriptors.d.ts +26 -0
- package/dist/audit/query/tools/descriptors.d.ts.map +1 -0
- package/dist/audit/query/tools/descriptors.js +35 -0
- package/dist/audit/query/tools/descriptors.js.map +1 -0
- package/dist/audit/query/tools/get-change-history.d.ts +23 -0
- package/dist/audit/query/tools/get-change-history.d.ts.map +1 -0
- package/dist/audit/query/tools/get-change-history.js +44 -0
- package/dist/audit/query/tools/get-change-history.js.map +1 -0
- package/dist/audit/query/tools/get-recent-failures.d.ts +23 -0
- package/dist/audit/query/tools/get-recent-failures.d.ts.map +1 -0
- package/dist/audit/query/tools/get-recent-failures.js +56 -0
- package/dist/audit/query/tools/get-recent-failures.js.map +1 -0
- package/dist/audit/query/tools/index.d.ts +13 -0
- package/dist/audit/query/tools/index.d.ts.map +1 -0
- package/dist/audit/query/tools/index.js +8 -0
- package/dist/audit/query/tools/index.js.map +1 -0
- package/dist/audit/query/tools/query-audit.d.ts +53 -0
- package/dist/audit/query/tools/query-audit.d.ts.map +1 -0
- package/dist/audit/query/tools/query-audit.js +78 -0
- package/dist/audit/query/tools/query-audit.js.map +1 -0
- package/dist/audit/query/tools/what-changed-in-range.d.ts +23 -0
- package/dist/audit/query/tools/what-changed-in-range.d.ts.map +1 -0
- package/dist/audit/query/tools/what-changed-in-range.js +86 -0
- package/dist/audit/query/tools/what-changed-in-range.js.map +1 -0
- package/dist/audit/query/tools/who-changed-what.d.ts +38 -0
- package/dist/audit/query/tools/who-changed-what.d.ts.map +1 -0
- package/dist/audit/query/tools/who-changed-what.js +66 -0
- package/dist/audit/query/tools/who-changed-what.js.map +1 -0
- package/dist/audit/types.d.ts +11 -0
- package/dist/audit/types.d.ts.map +1 -0
- package/dist/audit/types.js +45 -0
- package/dist/audit/types.js.map +1 -0
- package/dist/audit/writer.d.ts +50 -0
- package/dist/audit/writer.d.ts.map +1 -0
- package/dist/audit/writer.js +101 -0
- package/dist/audit/writer.js.map +1 -0
- package/dist/cache-tags.d.ts +31 -0
- package/dist/cache-tags.d.ts.map +1 -0
- package/dist/cache-tags.js +53 -0
- package/dist/cache-tags.js.map +1 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +7 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/manifest-source.d.ts +17 -0
- package/dist/components/manifest-source.d.ts.map +1 -0
- package/dist/components/manifest-source.js +60 -0
- package/dist/components/manifest-source.js.map +1 -0
- package/dist/components/matching/index.d.ts +3 -0
- package/dist/components/matching/index.d.ts.map +1 -0
- package/dist/components/matching/index.js +2 -0
- package/dist/components/matching/index.js.map +1 -0
- package/dist/components/matching/tfidf.d.ts +13 -0
- package/dist/components/matching/tfidf.d.ts.map +1 -0
- package/dist/components/matching/tfidf.js +118 -0
- package/dist/components/matching/tfidf.js.map +1 -0
- package/dist/components/matching/types.d.ts +22 -0
- package/dist/components/matching/types.d.ts.map +1 -0
- package/dist/components/matching/types.js +2 -0
- package/dist/components/matching/types.js.map +1 -0
- package/dist/components/options.d.ts +136 -0
- package/dist/components/options.d.ts.map +1 -0
- package/dist/components/options.js +40 -0
- package/dist/components/options.js.map +1 -0
- package/dist/components/plugin.d.ts +4 -0
- package/dist/components/plugin.d.ts.map +1 -0
- package/dist/components/plugin.js +95 -0
- package/dist/components/plugin.js.map +1 -0
- package/dist/components/tools/descriptors.d.ts +34 -0
- package/dist/components/tools/descriptors.d.ts.map +1 -0
- package/dist/components/tools/descriptors.js +43 -0
- package/dist/components/tools/descriptors.js.map +1 -0
- package/dist/components/tools/find-anti-pattern.d.ts +9 -0
- package/dist/components/tools/find-anti-pattern.d.ts.map +1 -0
- package/dist/components/tools/find-anti-pattern.js +31 -0
- package/dist/components/tools/find-anti-pattern.js.map +1 -0
- package/dist/components/tools/get-contract.d.ts +4 -0
- package/dist/components/tools/get-contract.d.ts.map +1 -0
- package/dist/components/tools/get-contract.js +19 -0
- package/dist/components/tools/get-contract.js.map +1 -0
- package/dist/components/tools/get-tokens.d.ts +4 -0
- package/dist/components/tools/get-tokens.d.ts.map +1 -0
- package/dist/components/tools/get-tokens.js +19 -0
- package/dist/components/tools/get-tokens.js.map +1 -0
- package/dist/components/tools/get-variants.d.ts +4 -0
- package/dist/components/tools/get-variants.d.ts.map +1 -0
- package/dist/components/tools/get-variants.js +19 -0
- package/dist/components/tools/get-variants.js.map +1 -0
- package/dist/components/tools/index.d.ts +9 -0
- package/dist/components/tools/index.d.ts.map +1 -0
- package/dist/components/tools/index.js +9 -0
- package/dist/components/tools/index.js.map +1 -0
- package/dist/components/tools/list-components.d.ts +4 -0
- package/dist/components/tools/list-components.d.ts.map +1 -0
- package/dist/components/tools/list-components.js +25 -0
- package/dist/components/tools/list-components.js.map +1 -0
- package/dist/components/tools/suggest-for-intent.d.ts +12 -0
- package/dist/components/tools/suggest-for-intent.d.ts.map +1 -0
- package/dist/components/tools/suggest-for-intent.js +83 -0
- package/dist/components/tools/suggest-for-intent.js.map +1 -0
- package/dist/components/tools/validate-composition.d.ts +9 -0
- package/dist/components/tools/validate-composition.d.ts.map +1 -0
- package/dist/components/tools/validate-composition.js +31 -0
- package/dist/components/tools/validate-composition.js.map +1 -0
- package/dist/components/validation/composition.d.ts +38 -0
- package/dist/components/validation/composition.d.ts.map +1 -0
- package/dist/components/validation/composition.js +135 -0
- package/dist/components/validation/composition.js.map +1 -0
- package/dist/editorial/calendar/ContentCalendarReport.d.ts +9 -0
- package/dist/editorial/calendar/ContentCalendarReport.d.ts.map +1 -0
- package/dist/editorial/calendar/ContentCalendarReport.js +47 -0
- package/dist/editorial/calendar/ContentCalendarReport.js.map +1 -0
- package/dist/editorial/calendar/ContentCalendarView.d.ts +3 -0
- package/dist/editorial/calendar/ContentCalendarView.d.ts.map +1 -0
- package/dist/editorial/calendar/ContentCalendarView.js +36 -0
- package/dist/editorial/calendar/ContentCalendarView.js.map +1 -0
- package/dist/editorial/calendar/calendar.d.ts +30 -0
- package/dist/editorial/calendar/calendar.d.ts.map +1 -0
- package/dist/editorial/calendar/calendar.js +23 -0
- package/dist/editorial/calendar/calendar.js.map +1 -0
- package/dist/editorial/calendar/find.d.ts +41 -0
- package/dist/editorial/calendar/find.d.ts.map +1 -0
- package/dist/editorial/calendar/find.js +108 -0
- package/dist/editorial/calendar/find.js.map +1 -0
- package/dist/editorial/calendar/month.d.ts +45 -0
- package/dist/editorial/calendar/month.d.ts.map +1 -0
- package/dist/editorial/calendar/month.js +120 -0
- package/dist/editorial/calendar/month.js.map +1 -0
- package/dist/editorial/calendar/tool.d.ts +50 -0
- package/dist/editorial/calendar/tool.d.ts.map +1 -0
- package/dist/editorial/calendar/tool.js +68 -0
- package/dist/editorial/calendar/tool.js.map +1 -0
- package/dist/editorial/config.d.ts +25 -0
- package/dist/editorial/config.d.ts.map +1 -0
- package/dist/editorial/config.js +12 -0
- package/dist/editorial/config.js.map +1 -0
- package/dist/editorial/health/ContentHealthReport.d.ts +7 -0
- package/dist/editorial/health/ContentHealthReport.d.ts.map +1 -0
- package/dist/editorial/health/ContentHealthReport.js +29 -0
- package/dist/editorial/health/ContentHealthReport.js.map +1 -0
- package/dist/editorial/health/ContentHealthView.d.ts +3 -0
- package/dist/editorial/health/ContentHealthView.d.ts.map +1 -0
- package/dist/editorial/health/ContentHealthView.js +29 -0
- package/dist/editorial/health/ContentHealthView.js.map +1 -0
- package/dist/editorial/health/HealthSummary.d.ts +6 -0
- package/dist/editorial/health/HealthSummary.d.ts.map +1 -0
- package/dist/editorial/health/HealthSummary.js +39 -0
- package/dist/editorial/health/HealthSummary.js.map +1 -0
- package/dist/editorial/health/checks.d.ts +104 -0
- package/dist/editorial/health/checks.d.ts.map +1 -0
- package/dist/editorial/health/checks.js +188 -0
- package/dist/editorial/health/checks.js.map +1 -0
- package/dist/editorial/health/find.d.ts +43 -0
- package/dist/editorial/health/find.d.ts.map +1 -0
- package/dist/editorial/health/find.js +97 -0
- package/dist/editorial/health/find.js.map +1 -0
- package/dist/editorial/health/tool.d.ts +53 -0
- package/dist/editorial/health/tool.d.ts.map +1 -0
- package/dist/editorial/health/tool.js +80 -0
- package/dist/editorial/health/tool.js.map +1 -0
- package/dist/editorial/index.d.ts +25 -0
- package/dist/editorial/index.d.ts.map +1 -0
- package/dist/editorial/index.js +15 -0
- package/dist/editorial/index.js.map +1 -0
- package/dist/editorial/palette/CommandPalette.d.ts +15 -0
- package/dist/editorial/palette/CommandPalette.d.ts.map +1 -0
- package/dist/editorial/palette/CommandPalette.js +319 -0
- package/dist/editorial/palette/CommandPalette.js.map +1 -0
- package/dist/editorial/palette/ReportsNav.d.ts +5 -0
- package/dist/editorial/palette/ReportsNav.d.ts.map +1 -0
- package/dist/editorial/palette/ReportsNav.js +31 -0
- package/dist/editorial/palette/ReportsNav.js.map +1 -0
- package/dist/editorial/palette/search.d.ts +18 -0
- package/dist/editorial/palette/search.d.ts.map +1 -0
- package/dist/editorial/palette/search.js +41 -0
- package/dist/editorial/palette/search.js.map +1 -0
- package/dist/editorial/palette/sources.d.ts +64 -0
- package/dist/editorial/palette/sources.d.ts.map +1 -0
- package/dist/editorial/palette/sources.js +103 -0
- package/dist/editorial/palette/sources.js.map +1 -0
- package/dist/editorial/palette/styles.d.ts +2 -0
- package/dist/editorial/palette/styles.d.ts.map +1 -0
- package/dist/editorial/palette/styles.js +76 -0
- package/dist/editorial/palette/styles.js.map +1 -0
- package/dist/editorial/palette/tool.d.ts +31 -0
- package/dist/editorial/palette/tool.d.ts.map +1 -0
- package/dist/editorial/palette/tool.js +63 -0
- package/dist/editorial/palette/tool.js.map +1 -0
- package/dist/editorial/plugin.d.ts +76 -0
- package/dist/editorial/plugin.d.ts.map +1 -0
- package/dist/editorial/plugin.js +186 -0
- package/dist/editorial/plugin.js.map +1 -0
- package/dist/editorial/relativeTime.d.ts +3 -0
- package/dist/editorial/relativeTime.d.ts.map +1 -0
- package/dist/editorial/relativeTime.js +27 -0
- package/dist/editorial/relativeTime.js.map +1 -0
- package/dist/editorial/styles.d.ts +2 -0
- package/dist/editorial/styles.d.ts.map +1 -0
- package/dist/editorial/styles.js +191 -0
- package/dist/editorial/styles.js.map +1 -0
- package/dist/editorial/work/YourWork.d.ts +13 -0
- package/dist/editorial/work/YourWork.d.ts.map +1 -0
- package/dist/editorial/work/YourWork.js +40 -0
- package/dist/editorial/work/YourWork.js.map +1 -0
- package/dist/editorial/work/tool.d.ts +45 -0
- package/dist/editorial/work/tool.d.ts.map +1 -0
- package/dist/editorial/work/tool.js +54 -0
- package/dist/editorial/work/tool.js.map +1 -0
- package/dist/editorial/work/work.d.ts +31 -0
- package/dist/editorial/work/work.d.ts.map +1 -0
- package/dist/editorial/work/work.js +68 -0
- package/dist/editorial/work/work.js.map +1 -0
- package/dist/email/client.d.ts +78 -0
- package/dist/email/client.d.ts.map +1 -0
- package/dist/email/client.js +63 -0
- package/dist/email/client.js.map +1 -0
- package/dist/email/functions/_shared.d.ts +17 -0
- package/dist/email/functions/_shared.d.ts.map +1 -0
- package/dist/email/functions/_shared.js +40 -0
- package/dist/email/functions/_shared.js.map +1 -0
- package/dist/email/functions/index.d.ts +7 -0
- package/dist/email/functions/index.d.ts.map +1 -0
- package/dist/email/functions/index.js +4 -0
- package/dist/email/functions/index.js.map +1 -0
- package/dist/email/functions/notify-approval-decision.d.ts +34 -0
- package/dist/email/functions/notify-approval-decision.d.ts.map +1 -0
- package/dist/email/functions/notify-approval-decision.js +77 -0
- package/dist/email/functions/notify-approval-decision.js.map +1 -0
- package/dist/email/functions/notify-approval-expired.d.ts +32 -0
- package/dist/email/functions/notify-approval-expired.d.ts.map +1 -0
- package/dist/email/functions/notify-approval-expired.js +54 -0
- package/dist/email/functions/notify-approval-expired.js.map +1 -0
- package/dist/email/functions/notify-approval-request.d.ts +35 -0
- package/dist/email/functions/notify-approval-request.d.ts.map +1 -0
- package/dist/email/functions/notify-approval-request.js +89 -0
- package/dist/email/functions/notify-approval-request.js.map +1 -0
- package/dist/email/index.d.ts +17 -0
- package/dist/email/index.d.ts.map +1 -0
- package/dist/email/index.js +12 -0
- package/dist/email/index.js.map +1 -0
- package/dist/email/options.d.ts +100 -0
- package/dist/email/options.d.ts.map +1 -0
- package/dist/email/options.js +55 -0
- package/dist/email/options.js.map +1 -0
- package/dist/email/plugin.d.ts +28 -0
- package/dist/email/plugin.d.ts.map +1 -0
- package/dist/email/plugin.js +113 -0
- package/dist/email/plugin.js.map +1 -0
- package/dist/email/templates/ApprovalDecision.d.ts +15 -0
- package/dist/email/templates/ApprovalDecision.d.ts.map +1 -0
- package/dist/email/templates/ApprovalDecision.js +56 -0
- package/dist/email/templates/ApprovalDecision.js.map +1 -0
- package/dist/email/templates/ApprovalExpired.d.ts +10 -0
- package/dist/email/templates/ApprovalExpired.d.ts.map +1 -0
- package/dist/email/templates/ApprovalExpired.js +8 -0
- package/dist/email/templates/ApprovalExpired.js.map +1 -0
- package/dist/email/templates/ApprovalRequest.d.ts +24 -0
- package/dist/email/templates/ApprovalRequest.d.ts.map +1 -0
- package/dist/email/templates/ApprovalRequest.js +58 -0
- package/dist/email/templates/ApprovalRequest.js.map +1 -0
- package/dist/email/templates/_layout.d.ts +17 -0
- package/dist/email/templates/_layout.d.ts.map +1 -0
- package/dist/email/templates/_layout.js +39 -0
- package/dist/email/templates/_layout.js.map +1 -0
- package/dist/email/templates/index.d.ts +9 -0
- package/dist/email/templates/index.d.ts.map +1 -0
- package/dist/email/templates/index.js +5 -0
- package/dist/email/templates/index.js.map +1 -0
- package/dist/email/tokens.d.ts +39 -0
- package/dist/email/tokens.d.ts.map +1 -0
- package/dist/email/tokens.js +17 -0
- package/dist/email/tokens.js.map +1 -0
- package/dist/env/index.d.ts +54 -0
- package/dist/env/index.d.ts.map +1 -0
- package/dist/env/index.js +113 -0
- package/dist/env/index.js.map +1 -0
- package/dist/events/inngest.d.ts +24 -0
- package/dist/events/inngest.d.ts.map +1 -0
- package/dist/events/inngest.js +24 -0
- package/dist/events/inngest.js.map +1 -0
- package/dist/events/taxonomy.d.ts +84 -0
- package/dist/events/taxonomy.d.ts.map +1 -0
- package/dist/events/taxonomy.js +10 -0
- package/dist/events/taxonomy.js.map +1 -0
- package/dist/events/vercel.d.ts +47 -0
- package/dist/events/vercel.d.ts.map +1 -0
- package/dist/events/vercel.js +69 -0
- package/dist/events/vercel.js.map +1 -0
- package/dist/exports/client.d.ts +24 -0
- package/dist/exports/client.d.ts.map +1 -0
- package/dist/exports/client.js +21 -0
- package/dist/exports/client.js.map +1 -0
- package/dist/exports/rsc.d.ts +17 -0
- package/dist/exports/rsc.d.ts.map +1 -0
- package/dist/exports/rsc.js +19 -0
- package/dist/exports/rsc.js.map +1 -0
- package/dist/fields/CharacterCountField.d.ts +4 -0
- package/dist/fields/CharacterCountField.d.ts.map +1 -0
- package/dist/fields/CharacterCountField.js +94 -0
- package/dist/fields/CharacterCountField.js.map +1 -0
- package/dist/fields/characterCount.d.ts +15 -0
- package/dist/fields/characterCount.d.ts.map +1 -0
- package/dist/fields/characterCount.js +92 -0
- package/dist/fields/characterCount.js.map +1 -0
- package/dist/fields/checkSlug.d.ts +62 -0
- package/dist/fields/checkSlug.d.ts.map +1 -0
- package/dist/fields/checkSlug.js +119 -0
- package/dist/fields/checkSlug.js.map +1 -0
- package/dist/fields/index.d.ts +9 -0
- package/dist/fields/index.d.ts.map +1 -0
- package/dist/fields/index.js +9 -0
- package/dist/fields/index.js.map +1 -0
- package/dist/fields/mapFields.d.ts +13 -0
- package/dist/fields/mapFields.d.ts.map +1 -0
- package/dist/fields/mapFields.js +32 -0
- package/dist/fields/mapFields.js.map +1 -0
- package/dist/fields/publishing.d.ts +33 -0
- package/dist/fields/publishing.d.ts.map +1 -0
- package/dist/fields/publishing.js +81 -0
- package/dist/fields/publishing.js.map +1 -0
- package/dist/fields/revisedAt.d.ts +15 -0
- package/dist/fields/revisedAt.d.ts.map +1 -0
- package/dist/fields/revisedAt.js +79 -0
- package/dist/fields/revisedAt.js.map +1 -0
- package/dist/fields/slug.d.ts +21 -0
- package/dist/fields/slug.d.ts.map +1 -0
- package/dist/fields/slug.js +102 -0
- package/dist/fields/slug.js.map +1 -0
- package/dist/fields/unlisted.d.ts +13 -0
- package/dist/fields/unlisted.d.ts.map +1 -0
- package/dist/fields/unlisted.js +35 -0
- package/dist/fields/unlisted.js.map +1 -0
- package/dist/fields/usedBy.d.ts +12 -0
- package/dist/fields/usedBy.d.ts.map +1 -0
- package/dist/fields/usedBy.js +36 -0
- package/dist/fields/usedBy.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/admin/SyncButton.d.ts +27 -0
- package/dist/integrations/admin/SyncButton.d.ts.map +1 -0
- package/dist/integrations/admin/SyncButton.js +134 -0
- package/dist/integrations/admin/SyncButton.js.map +1 -0
- package/dist/integrations/admin/sync-client.d.ts +83 -0
- package/dist/integrations/admin/sync-client.d.ts.map +1 -0
- package/dist/integrations/admin/sync-client.js +121 -0
- package/dist/integrations/admin/sync-client.js.map +1 -0
- package/dist/integrations/collection.d.ts +26 -0
- package/dist/integrations/collection.d.ts.map +1 -0
- package/dist/integrations/collection.js +193 -0
- package/dist/integrations/collection.js.map +1 -0
- package/dist/integrations/endpoints/sync.d.ts +27 -0
- package/dist/integrations/endpoints/sync.d.ts.map +1 -0
- package/dist/integrations/endpoints/sync.js +90 -0
- package/dist/integrations/endpoints/sync.js.map +1 -0
- package/dist/integrations/index.d.ts +22 -0
- package/dist/integrations/index.d.ts.map +1 -0
- package/dist/integrations/index.js +15 -0
- package/dist/integrations/index.js.map +1 -0
- package/dist/integrations/integrations/index.d.ts +3 -0
- package/dist/integrations/integrations/index.d.ts.map +1 -0
- package/dist/integrations/integrations/index.js +2 -0
- package/dist/integrations/integrations/index.js.map +1 -0
- package/dist/integrations/integrations/webhook/config-fields.d.ts +33 -0
- package/dist/integrations/integrations/webhook/config-fields.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/config-fields.js +54 -0
- package/dist/integrations/integrations/webhook/config-fields.js.map +1 -0
- package/dist/integrations/integrations/webhook/functions.d.ts +24 -0
- package/dist/integrations/integrations/webhook/functions.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/functions.js +139 -0
- package/dist/integrations/integrations/webhook/functions.js.map +1 -0
- package/dist/integrations/integrations/webhook/healthcheck.d.ts +10 -0
- package/dist/integrations/integrations/webhook/healthcheck.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/healthcheck.js +26 -0
- package/dist/integrations/integrations/webhook/healthcheck.js.map +1 -0
- package/dist/integrations/integrations/webhook/hmac.d.ts +11 -0
- package/dist/integrations/integrations/webhook/hmac.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/hmac.js +25 -0
- package/dist/integrations/integrations/webhook/hmac.js.map +1 -0
- package/dist/integrations/integrations/webhook/index.d.ts +6 -0
- package/dist/integrations/integrations/webhook/index.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/index.js +47 -0
- package/dist/integrations/integrations/webhook/index.js.map +1 -0
- package/dist/integrations/integrations/webhook/payload.d.ts +9 -0
- package/dist/integrations/integrations/webhook/payload.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/payload.js +19 -0
- package/dist/integrations/integrations/webhook/payload.js.map +1 -0
- package/dist/integrations/jobs/healthcheck.d.ts +24 -0
- package/dist/integrations/jobs/healthcheck.d.ts.map +1 -0
- package/dist/integrations/jobs/healthcheck.js +133 -0
- package/dist/integrations/jobs/healthcheck.js.map +1 -0
- package/dist/integrations/options.d.ts +54 -0
- package/dist/integrations/options.d.ts.map +1 -0
- package/dist/integrations/options.js +8 -0
- package/dist/integrations/options.js.map +1 -0
- package/dist/integrations/plugin.d.ts +51 -0
- package/dist/integrations/plugin.d.ts.map +1 -0
- package/dist/integrations/plugin.js +215 -0
- package/dist/integrations/plugin.js.map +1 -0
- package/dist/integrations/registry.d.ts +27 -0
- package/dist/integrations/registry.d.ts.map +1 -0
- package/dist/integrations/registry.js +39 -0
- package/dist/integrations/registry.js.map +1 -0
- package/dist/integrations/sync/manual-sync.d.ts +70 -0
- package/dist/integrations/sync/manual-sync.d.ts.map +1 -0
- package/dist/integrations/sync/manual-sync.js +91 -0
- package/dist/integrations/sync/manual-sync.js.map +1 -0
- package/dist/integrations/sync/problems.d.ts +31 -0
- package/dist/integrations/sync/problems.d.ts.map +1 -0
- package/dist/integrations/sync/problems.js +40 -0
- package/dist/integrations/sync/problems.js.map +1 -0
- package/dist/integrations/sync/status.d.ts +15 -0
- package/dist/integrations/sync/status.d.ts.map +1 -0
- package/dist/integrations/sync/status.js +31 -0
- package/dist/integrations/sync/status.js.map +1 -0
- package/dist/integrations/tools/access.d.ts +5 -0
- package/dist/integrations/tools/access.d.ts.map +1 -0
- package/dist/integrations/tools/access.js +14 -0
- package/dist/integrations/tools/access.js.map +1 -0
- package/dist/integrations/tools/descriptors.d.ts +26 -0
- package/dist/integrations/tools/descriptors.d.ts.map +1 -0
- package/dist/integrations/tools/descriptors.js +35 -0
- package/dist/integrations/tools/descriptors.js.map +1 -0
- package/dist/integrations/tools/get-integration-status.d.ts +17 -0
- package/dist/integrations/tools/get-integration-status.d.ts.map +1 -0
- package/dist/integrations/tools/get-integration-status.js +41 -0
- package/dist/integrations/tools/get-integration-status.js.map +1 -0
- package/dist/integrations/tools/index.d.ts +13 -0
- package/dist/integrations/tools/index.d.ts.map +1 -0
- package/dist/integrations/tools/index.js +8 -0
- package/dist/integrations/tools/index.js.map +1 -0
- package/dist/integrations/tools/list-integration-types.d.ts +10 -0
- package/dist/integrations/tools/list-integration-types.d.ts.map +1 -0
- package/dist/integrations/tools/list-integration-types.js +22 -0
- package/dist/integrations/tools/list-integration-types.js.map +1 -0
- package/dist/integrations/tools/list-integrations.d.ts +20 -0
- package/dist/integrations/tools/list-integrations.d.ts.map +1 -0
- package/dist/integrations/tools/list-integrations.js +49 -0
- package/dist/integrations/tools/list-integrations.js.map +1 -0
- package/dist/integrations/tools/test-integration.d.ts +19 -0
- package/dist/integrations/tools/test-integration.d.ts.map +1 -0
- package/dist/integrations/tools/test-integration.js +51 -0
- package/dist/integrations/tools/test-integration.js.map +1 -0
- package/dist/integrations/tools/trigger-sync.d.ts +26 -0
- package/dist/integrations/tools/trigger-sync.d.ts.map +1 -0
- package/dist/integrations/tools/trigger-sync.js +44 -0
- package/dist/integrations/tools/trigger-sync.js.map +1 -0
- package/dist/integrations/types.d.ts +183 -0
- package/dist/integrations/types.d.ts.map +1 -0
- package/dist/integrations/types.js +2 -0
- package/dist/integrations/types.js.map +1 -0
- package/dist/jobs/define.d.ts +17 -0
- package/dist/jobs/define.d.ts.map +1 -0
- package/dist/jobs/define.js +39 -0
- package/dist/jobs/define.js.map +1 -0
- package/dist/jobs/failure-handler.d.ts +39 -0
- package/dist/jobs/failure-handler.d.ts.map +1 -0
- package/dist/jobs/failure-handler.js +62 -0
- package/dist/jobs/failure-handler.js.map +1 -0
- package/dist/jobs/index.d.ts +28 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js +7 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/inngest/adapter.d.ts +39 -0
- package/dist/jobs/inngest/adapter.d.ts.map +1 -0
- package/dist/jobs/inngest/adapter.js +81 -0
- package/dist/jobs/inngest/adapter.js.map +1 -0
- package/dist/jobs/inngest/index.d.ts +15 -0
- package/dist/jobs/inngest/index.d.ts.map +1 -0
- package/dist/jobs/inngest/index.js +13 -0
- package/dist/jobs/inngest/index.js.map +1 -0
- package/dist/jobs/options.d.ts +18 -0
- package/dist/jobs/options.d.ts.map +1 -0
- package/dist/jobs/options.js +12 -0
- package/dist/jobs/options.js.map +1 -0
- package/dist/jobs/payload/adapter.d.ts +33 -0
- package/dist/jobs/payload/adapter.d.ts.map +1 -0
- package/dist/jobs/payload/adapter.js +257 -0
- package/dist/jobs/payload/adapter.js.map +1 -0
- package/dist/jobs/payload/index.d.ts +8 -0
- package/dist/jobs/payload/index.d.ts.map +1 -0
- package/dist/jobs/payload/index.js +7 -0
- package/dist/jobs/payload/index.js.map +1 -0
- package/dist/jobs/sender.d.ts +4 -0
- package/dist/jobs/sender.d.ts.map +1 -0
- package/dist/jobs/sender.js +19 -0
- package/dist/jobs/sender.js.map +1 -0
- package/dist/jobs/types.d.ts +105 -0
- package/dist/jobs/types.d.ts.map +1 -0
- package/dist/jobs/types.js +2 -0
- package/dist/jobs/types.js.map +1 -0
- package/dist/jobs/workflow-types.d.ts +280 -0
- package/dist/jobs/workflow-types.d.ts.map +1 -0
- package/dist/jobs/workflow-types.js +22 -0
- package/dist/jobs/workflow-types.js.map +1 -0
- package/dist/logger/index.d.ts +9 -0
- package/dist/logger/index.d.ts.map +1 -0
- package/dist/logger/index.js +41 -0
- package/dist/logger/index.js.map +1 -0
- package/dist/mcp/api-key-access.d.ts +50 -0
- package/dist/mcp/api-key-access.d.ts.map +1 -0
- package/dist/mcp/api-key-access.js +94 -0
- package/dist/mcp/api-key-access.js.map +1 -0
- package/dist/mcp/audit-context.d.ts +39 -0
- package/dist/mcp/audit-context.d.ts.map +1 -0
- package/dist/mcp/audit-context.js +36 -0
- package/dist/mcp/audit-context.js.map +1 -0
- package/dist/mcp/audit-server.d.ts +13 -0
- package/dist/mcp/audit-server.d.ts.map +1 -0
- package/dist/mcp/audit-server.js +68 -0
- package/dist/mcp/audit-server.js.map +1 -0
- package/dist/mcp/collector.d.ts +51 -0
- package/dist/mcp/collector.d.ts.map +1 -0
- package/dist/mcp/collector.js +96 -0
- package/dist/mcp/collector.js.map +1 -0
- package/dist/mcp/envelope.d.ts +22 -0
- package/dist/mcp/envelope.d.ts.map +1 -0
- package/dist/mcp/envelope.js +22 -0
- package/dist/mcp/envelope.js.map +1 -0
- package/dist/mcp/index.d.ts +12 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +8 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/meta.d.ts +74 -0
- package/dist/mcp/meta.d.ts.map +1 -0
- package/dist/mcp/meta.js +27 -0
- package/dist/mcp/meta.js.map +1 -0
- package/dist/mcp/payload-mcp.d.ts +68 -0
- package/dist/mcp/payload-mcp.d.ts.map +1 -0
- package/dist/mcp/payload-mcp.js +175 -0
- package/dist/mcp/payload-mcp.js.map +1 -0
- package/dist/media/hooks.d.ts +70 -0
- package/dist/media/hooks.d.ts.map +1 -0
- package/dist/media/hooks.js +200 -0
- package/dist/media/hooks.js.map +1 -0
- package/dist/media/index.d.ts +8 -0
- package/dist/media/index.d.ts.map +1 -0
- package/dist/media/index.js +7 -0
- package/dist/media/index.js.map +1 -0
- package/dist/media/svg.d.ts +17 -0
- package/dist/media/svg.d.ts.map +1 -0
- package/dist/media/svg.js +241 -0
- package/dist/media/svg.js.map +1 -0
- package/dist/media/uploadKey.d.ts +25 -0
- package/dist/media/uploadKey.d.ts.map +1 -0
- package/dist/media/uploadKey.js +70 -0
- package/dist/media/uploadKey.js.map +1 -0
- package/dist/observability/collection.d.ts +13 -0
- package/dist/observability/collection.d.ts.map +1 -0
- package/dist/observability/collection.js +76 -0
- package/dist/observability/collection.js.map +1 -0
- package/dist/observability/index.d.ts +10 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +6 -0
- package/dist/observability/index.js.map +1 -0
- package/dist/observability/plugin.d.ts +24 -0
- package/dist/observability/plugin.d.ts.map +1 -0
- package/dist/observability/plugin.js +59 -0
- package/dist/observability/plugin.js.map +1 -0
- package/dist/observability/report.d.ts +175 -0
- package/dist/observability/report.d.ts.map +1 -0
- package/dist/observability/report.js +274 -0
- package/dist/observability/report.js.map +1 -0
- package/dist/observability/tool.d.ts +33 -0
- package/dist/observability/tool.d.ts.map +1 -0
- package/dist/observability/tool.js +75 -0
- package/dist/observability/tool.js.map +1 -0
- package/dist/observability/writer.d.ts +24 -0
- package/dist/observability/writer.d.ts.map +1 -0
- package/dist/observability/writer.js +72 -0
- package/dist/observability/writer.js.map +1 -0
- package/dist/plugin-contract/admin.d.ts +45 -0
- package/dist/plugin-contract/admin.d.ts.map +1 -0
- package/dist/plugin-contract/admin.js +12 -0
- package/dist/plugin-contract/admin.js.map +1 -0
- package/dist/plugin-contract/env.d.ts +29 -0
- package/dist/plugin-contract/env.d.ts.map +1 -0
- package/dist/plugin-contract/env.js +2 -0
- package/dist/plugin-contract/env.js.map +1 -0
- package/dist/plugin-contract/index.d.ts +39 -0
- package/dist/plugin-contract/index.d.ts.map +1 -0
- package/dist/plugin-contract/index.js +5 -0
- package/dist/plugin-contract/index.js.map +1 -0
- package/dist/plugin-contract/mcp.d.ts +51 -0
- package/dist/plugin-contract/mcp.d.ts.map +1 -0
- package/dist/plugin-contract/mcp.js +2 -0
- package/dist/plugin-contract/mcp.js.map +1 -0
- package/dist/plugin-contract/registry.d.ts +23 -0
- package/dist/plugin-contract/registry.d.ts.map +1 -0
- package/dist/plugin-contract/registry.js +51 -0
- package/dist/plugin-contract/registry.js.map +1 -0
- package/dist/publishing/admin/PublishButton.d.ts +22 -0
- package/dist/publishing/admin/PublishButton.d.ts.map +1 -0
- package/dist/publishing/admin/PublishButton.js +164 -0
- package/dist/publishing/admin/PublishButton.js.map +1 -0
- package/dist/publishing/admin/SchedulePublishField.d.ts +24 -0
- package/dist/publishing/admin/SchedulePublishField.d.ts.map +1 -0
- package/dist/publishing/admin/SchedulePublishField.js +160 -0
- package/dist/publishing/admin/SchedulePublishField.js.map +1 -0
- package/dist/publishing/admin/UnpublishButton.d.ts +15 -0
- package/dist/publishing/admin/UnpublishButton.d.ts.map +1 -0
- package/dist/publishing/admin/UnpublishButton.js +90 -0
- package/dist/publishing/admin/UnpublishButton.js.map +1 -0
- package/dist/publishing/admin/publishing-client.d.ts +105 -0
- package/dist/publishing/admin/publishing-client.d.ts.map +1 -0
- package/dist/publishing/admin/publishing-client.js +139 -0
- package/dist/publishing/admin/publishing-client.js.map +1 -0
- package/dist/publishing/admin/schedule-state.d.ts +30 -0
- package/dist/publishing/admin/schedule-state.d.ts.map +1 -0
- package/dist/publishing/admin/schedule-state.js +39 -0
- package/dist/publishing/admin/schedule-state.js.map +1 -0
- package/dist/publishing/checks/alt-text.d.ts +17 -0
- package/dist/publishing/checks/alt-text.d.ts.map +1 -0
- package/dist/publishing/checks/alt-text.js +63 -0
- package/dist/publishing/checks/alt-text.js.map +1 -0
- package/dist/publishing/checks/heading-hierarchy.d.ts +11 -0
- package/dist/publishing/checks/heading-hierarchy.d.ts.map +1 -0
- package/dist/publishing/checks/heading-hierarchy.js +32 -0
- package/dist/publishing/checks/heading-hierarchy.js.map +1 -0
- package/dist/publishing/checks/index.d.ts +6 -0
- package/dist/publishing/checks/index.d.ts.map +1 -0
- package/dist/publishing/checks/index.js +13 -0
- package/dist/publishing/checks/index.js.map +1 -0
- package/dist/publishing/checks/link-labels.d.ts +9 -0
- package/dist/publishing/checks/link-labels.d.ts.map +1 -0
- package/dist/publishing/checks/link-labels.js +44 -0
- package/dist/publishing/checks/link-labels.js.map +1 -0
- package/dist/publishing/endpoints/admin.d.ts +19 -0
- package/dist/publishing/endpoints/admin.d.ts.map +1 -0
- package/dist/publishing/endpoints/admin.js +112 -0
- package/dist/publishing/endpoints/admin.js.map +1 -0
- package/dist/publishing/events.d.ts +16 -0
- package/dist/publishing/events.d.ts.map +1 -0
- package/dist/publishing/events.js +30 -0
- package/dist/publishing/events.js.map +1 -0
- package/dist/publishing/hooks/block-status-writes.d.ts +52 -0
- package/dist/publishing/hooks/block-status-writes.d.ts.map +1 -0
- package/dist/publishing/hooks/block-status-writes.js +242 -0
- package/dist/publishing/hooks/block-status-writes.js.map +1 -0
- package/dist/publishing/hooks/draft-writes.d.ts +32 -0
- package/dist/publishing/hooks/draft-writes.d.ts.map +1 -0
- package/dist/publishing/hooks/draft-writes.js +76 -0
- package/dist/publishing/hooks/draft-writes.js.map +1 -0
- package/dist/publishing/hooks/schedule-events.d.ts +26 -0
- package/dist/publishing/hooks/schedule-events.d.ts.map +1 -0
- package/dist/publishing/hooks/schedule-events.js +54 -0
- package/dist/publishing/hooks/schedule-events.js.map +1 -0
- package/dist/publishing/index.d.ts +35 -0
- package/dist/publishing/index.d.ts.map +1 -0
- package/dist/publishing/index.js +32 -0
- package/dist/publishing/index.js.map +1 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.d.ts +24 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.d.ts.map +1 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.js +114 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.js.map +1 -0
- package/dist/publishing/jobs/next-revalidate.d.ts +43 -0
- package/dist/publishing/jobs/next-revalidate.d.ts.map +1 -0
- package/dist/publishing/jobs/next-revalidate.js +42 -0
- package/dist/publishing/jobs/next-revalidate.js.map +1 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.d.ts +24 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.d.ts.map +1 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.js +136 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.js.map +1 -0
- package/dist/publishing/jobs/revalidate-on-publish.d.ts +24 -0
- package/dist/publishing/jobs/revalidate-on-publish.d.ts.map +1 -0
- package/dist/publishing/jobs/revalidate-on-publish.js +78 -0
- package/dist/publishing/jobs/revalidate-on-publish.js.map +1 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.d.ts +80 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.d.ts.map +1 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.js +116 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.js.map +1 -0
- package/dist/publishing/options.d.ts +100 -0
- package/dist/publishing/options.d.ts.map +1 -0
- package/dist/publishing/options.js +56 -0
- package/dist/publishing/options.js.map +1 -0
- package/dist/publishing/pipeline/index.d.ts +20 -0
- package/dist/publishing/pipeline/index.d.ts.map +1 -0
- package/dist/publishing/pipeline/index.js +88 -0
- package/dist/publishing/pipeline/index.js.map +1 -0
- package/dist/publishing/pipeline/steps/accessibility.d.ts +13 -0
- package/dist/publishing/pipeline/steps/accessibility.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/accessibility.js +37 -0
- package/dist/publishing/pipeline/steps/accessibility.js.map +1 -0
- package/dist/publishing/pipeline/steps/approval.d.ts +14 -0
- package/dist/publishing/pipeline/steps/approval.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/approval.js +54 -0
- package/dist/publishing/pipeline/steps/approval.js.map +1 -0
- package/dist/publishing/pipeline/steps/composition.d.ts +14 -0
- package/dist/publishing/pipeline/steps/composition.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/composition.js +63 -0
- package/dist/publishing/pipeline/steps/composition.js.map +1 -0
- package/dist/publishing/pipeline/steps/embargo.d.ts +12 -0
- package/dist/publishing/pipeline/steps/embargo.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/embargo.js +41 -0
- package/dist/publishing/pipeline/steps/embargo.js.map +1 -0
- package/dist/publishing/pipeline/steps/execute.d.ts +52 -0
- package/dist/publishing/pipeline/steps/execute.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/execute.js +161 -0
- package/dist/publishing/pipeline/steps/execute.js.map +1 -0
- package/dist/publishing/pipeline/steps/exist.d.ts +9 -0
- package/dist/publishing/pipeline/steps/exist.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/exist.js +31 -0
- package/dist/publishing/pipeline/steps/exist.js.map +1 -0
- package/dist/publishing/pipeline/steps/required-fields.d.ts +9 -0
- package/dist/publishing/pipeline/steps/required-fields.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/required-fields.js +63 -0
- package/dist/publishing/pipeline/steps/required-fields.js.map +1 -0
- package/dist/publishing/pipeline/types.d.ts +72 -0
- package/dist/publishing/pipeline/types.d.ts.map +1 -0
- package/dist/publishing/pipeline/types.js +2 -0
- package/dist/publishing/pipeline/types.js.map +1 -0
- package/dist/publishing/plugin.d.ts +4 -0
- package/dist/publishing/plugin.d.ts.map +1 -0
- package/dist/publishing/plugin.js +196 -0
- package/dist/publishing/plugin.js.map +1 -0
- package/dist/publishing/service.d.ts +149 -0
- package/dist/publishing/service.d.ts.map +1 -0
- package/dist/publishing/service.js +474 -0
- package/dist/publishing/service.js.map +1 -0
- package/dist/publishing/tools/actor.d.ts +32 -0
- package/dist/publishing/tools/actor.d.ts.map +1 -0
- package/dist/publishing/tools/actor.js +40 -0
- package/dist/publishing/tools/actor.js.map +1 -0
- package/dist/publishing/tools/descriptors.d.ts +26 -0
- package/dist/publishing/tools/descriptors.d.ts.map +1 -0
- package/dist/publishing/tools/descriptors.js +38 -0
- package/dist/publishing/tools/descriptors.js.map +1 -0
- package/dist/publishing/tools/get-publish-status.d.ts +12 -0
- package/dist/publishing/tools/get-publish-status.d.ts.map +1 -0
- package/dist/publishing/tools/get-publish-status.js +45 -0
- package/dist/publishing/tools/get-publish-status.js.map +1 -0
- package/dist/publishing/tools/index.d.ts +7 -0
- package/dist/publishing/tools/index.d.ts.map +1 -0
- package/dist/publishing/tools/index.js +7 -0
- package/dist/publishing/tools/index.js.map +1 -0
- package/dist/publishing/tools/publish.d.ts +14 -0
- package/dist/publishing/tools/publish.d.ts.map +1 -0
- package/dist/publishing/tools/publish.js +35 -0
- package/dist/publishing/tools/publish.js.map +1 -0
- package/dist/publishing/tools/rollback.d.ts +11 -0
- package/dist/publishing/tools/rollback.d.ts.map +1 -0
- package/dist/publishing/tools/rollback.js +98 -0
- package/dist/publishing/tools/rollback.js.map +1 -0
- package/dist/publishing/tools/schedule-publish.d.ts +20 -0
- package/dist/publishing/tools/schedule-publish.d.ts.map +1 -0
- package/dist/publishing/tools/schedule-publish.js +49 -0
- package/dist/publishing/tools/schedule-publish.js.map +1 -0
- package/dist/publishing/tools/unpublish.d.ts +14 -0
- package/dist/publishing/tools/unpublish.d.ts.map +1 -0
- package/dist/publishing/tools/unpublish.js +29 -0
- package/dist/publishing/tools/unpublish.js.map +1 -0
- package/dist/references/UsedOnPanel.d.ts +3 -0
- package/dist/references/UsedOnPanel.d.ts.map +1 -0
- package/dist/references/UsedOnPanel.js +47 -0
- package/dist/references/UsedOnPanel.js.map +1 -0
- package/dist/references/find.d.ts +46 -0
- package/dist/references/find.d.ts.map +1 -0
- package/dist/references/find.js +142 -0
- package/dist/references/find.js.map +1 -0
- package/dist/references/guards.d.ts +32 -0
- package/dist/references/guards.d.ts.map +1 -0
- package/dist/references/guards.js +76 -0
- package/dist/references/guards.js.map +1 -0
- package/dist/references/index.d.ts +11 -0
- package/dist/references/index.d.ts.map +1 -0
- package/dist/references/index.js +6 -0
- package/dist/references/index.js.map +1 -0
- package/dist/references/plugin.d.ts +51 -0
- package/dist/references/plugin.d.ts.map +1 -0
- package/dist/references/plugin.js +111 -0
- package/dist/references/plugin.js.map +1 -0
- package/dist/references/tools.d.ts +54 -0
- package/dist/references/tools.d.ts.map +1 -0
- package/dist/references/tools.js +124 -0
- package/dist/references/tools.js.map +1 -0
- package/dist/references/walk.d.ts +43 -0
- package/dist/references/walk.d.ts.map +1 -0
- package/dist/references/walk.js +214 -0
- package/dist/references/walk.js.map +1 -0
- package/dist/testing/anonymousAccess.d.ts +111 -0
- package/dist/testing/anonymousAccess.d.ts.map +1 -0
- package/dist/testing/anonymousAccess.js +185 -0
- package/dist/testing/anonymousAccess.js.map +1 -0
- package/dist/testing/describeAnonymousAccess.d.ts +26 -0
- package/dist/testing/describeAnonymousAccess.d.ts.map +1 -0
- package/dist/testing/describeAnonymousAccess.js +76 -0
- package/dist/testing/describeAnonymousAccess.js.map +1 -0
- package/dist/testing/index.d.ts +11 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +9 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/utils/content-hash.d.ts +31 -0
- package/dist/utils/content-hash.d.ts.map +1 -0
- package/dist/utils/content-hash.js +94 -0
- package/dist/utils/content-hash.js.map +1 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/relationships.d.ts +17 -0
- package/dist/utils/relationships.d.ts.map +1 -0
- package/dist/utils/relationships.js +26 -0
- package/dist/utils/relationships.js.map +1 -0
- package/dist/utils/sha256.d.ts +10 -0
- package/dist/utils/sha256.d.ts.map +1 -0
- package/dist/utils/sha256.js +16 -0
- package/dist/utils/sha256.js.map +1 -0
- package/dist/utils/zod-issues.d.ts +19 -0
- package/dist/utils/zod-issues.d.ts.map +1 -0
- package/dist/utils/zod-issues.js +22 -0
- package/dist/utils/zod-issues.js.map +1 -0
- package/package.json +180 -3
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Walks the document tree looking for image-shaped objects (anything with
|
|
3
|
+
* a `url` or `filename` property whose `mimeType`, if present, starts with
|
|
4
|
+
* `image/`). Flags any whose `alt` is missing or empty.
|
|
5
|
+
*
|
|
6
|
+
* Skips an upload's `sizes` map: Payload's generated derivatives carry
|
|
7
|
+
* `filename` and `mimeType` but never `alt`, which lives on the parent
|
|
8
|
+
* document. They are renditions of an image already checked, not images in
|
|
9
|
+
* their own right — walking into them reports one false failure per
|
|
10
|
+
* configured `imageSize`.
|
|
11
|
+
*
|
|
12
|
+
* Heuristic, not exhaustive. A host can add checks via `accessibilityChecks`
|
|
13
|
+
* and switch a built-in off via `disableAccessibilityChecks`.
|
|
14
|
+
*/
|
|
15
|
+
export const altTextCheck = {
|
|
16
|
+
name: 'alt-text',
|
|
17
|
+
run(doc) {
|
|
18
|
+
const issues = [];
|
|
19
|
+
walkForImages(doc, (image, path) => {
|
|
20
|
+
const alt = image['alt'];
|
|
21
|
+
if (typeof alt !== 'string' || alt.trim() === '') {
|
|
22
|
+
issues.push({
|
|
23
|
+
field: path,
|
|
24
|
+
message: `Image at "${path}" is missing alt text`,
|
|
25
|
+
severity: 'error',
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return issues;
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
function walkForImages(value, visit, path = '') {
|
|
33
|
+
if (!value || typeof value !== 'object')
|
|
34
|
+
return;
|
|
35
|
+
if (Array.isArray(value)) {
|
|
36
|
+
for (let i = 0; i < value.length; i++) {
|
|
37
|
+
walkForImages(value[i], visit, `${path}[${i}]`);
|
|
38
|
+
}
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const obj = value;
|
|
42
|
+
const isImage = looksLikeImage(obj);
|
|
43
|
+
if (isImage) {
|
|
44
|
+
visit(obj, path || '(root)');
|
|
45
|
+
}
|
|
46
|
+
for (const key of Object.keys(obj)) {
|
|
47
|
+
// An image's own derivatives are not separate images.
|
|
48
|
+
if (isImage && key === 'sizes')
|
|
49
|
+
continue;
|
|
50
|
+
walkForImages(obj[key], visit, path ? `${path}.${key}` : key);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function looksLikeImage(obj) {
|
|
54
|
+
// Require an explicit image marker: a `filename` (Payload media uploads
|
|
55
|
+
// always have one) or an `image/*` mimeType. A bare `{ url }` is too
|
|
56
|
+
// ambiguous — it's just as likely to be a link, so we leave that to the
|
|
57
|
+
// link-labels check.
|
|
58
|
+
const mime = obj['mimeType'];
|
|
59
|
+
if (typeof mime === 'string')
|
|
60
|
+
return mime.startsWith('image/');
|
|
61
|
+
return typeof obj['filename'] === 'string';
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=alt-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alt-text.js","sourceRoot":"","sources":["../../../src/publishing/checks/alt-text.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,YAAY,GAAuB;IAC9C,IAAI,EAAE,UAAU;IAChB,GAAG,CAAC,GAAG;QACL,MAAM,MAAM,GAAyB,EAAE,CAAA;QACvC,aAAa,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YACjC,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,CAAA;YACxB,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;gBACjD,MAAM,CAAC,IAAI,CAAC;oBACV,KAAK,EAAE,IAAI;oBACX,OAAO,EAAE,aAAa,IAAI,uBAAuB;oBACjD,QAAQ,EAAE,OAAO;iBAClB,CAAC,CAAA;YACJ,CAAC;QACH,CAAC,CAAC,CAAA;QACF,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AAED,SAAS,aAAa,CACpB,KAAc,EACd,KAA6D,EAC7D,IAAI,GAAG,EAAE;IAET,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAM;IAE/C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;QACjD,CAAC;QACD,OAAM;IACR,CAAC;IAED,MAAM,GAAG,GAAG,KAAgC,CAAA;IAC5C,MAAM,OAAO,GAAG,cAAc,CAAC,GAAG,CAAC,CAAA;IACnC,IAAI,OAAO,EAAE,CAAC;QACZ,KAAK,CAAC,GAAG,EAAE,IAAI,IAAI,QAAQ,CAAC,CAAA;IAC9B,CAAC;IAED,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACnC,sDAAsD;QACtD,IAAI,OAAO,IAAI,GAAG,KAAK,OAAO;YAAE,SAAQ;QACxC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;IAC/D,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CAAC,GAA4B;IAClD,wEAAwE;IACxE,qEAAqE;IACrE,wEAAwE;IACxE,qBAAqB;IACrB,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAA;IAC5B,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;IAC9D,OAAO,OAAO,GAAG,CAAC,UAAU,CAAC,KAAK,QAAQ,CAAA;AAC5C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AccessibilityCheck } from '../options.js';
|
|
2
|
+
/**
|
|
3
|
+
* Structural heading-hierarchy check. Without rendering the page we can't
|
|
4
|
+
* fully audit heading levels, but we can flag the most common structural
|
|
5
|
+
* mistake: multiple Hero blocks (each becomes an h1 in the reference DS).
|
|
6
|
+
*
|
|
7
|
+
* Block types are matched case-insensitively against `'hero'` since the
|
|
8
|
+
* `blockType` field is by convention lower-cased in Payload.
|
|
9
|
+
*/
|
|
10
|
+
export declare const headingHierarchyCheck: AccessibilityCheck;
|
|
11
|
+
//# sourceMappingURL=heading-hierarchy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading-hierarchy.d.ts","sourceRoot":"","sources":["../../../src/publishing/checks/heading-hierarchy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAsB,MAAM,eAAe,CAAA;AAE3E;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,EAAE,kBAuBnC,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structural heading-hierarchy check. Without rendering the page we can't
|
|
3
|
+
* fully audit heading levels, but we can flag the most common structural
|
|
4
|
+
* mistake: multiple Hero blocks (each becomes an h1 in the reference DS).
|
|
5
|
+
*
|
|
6
|
+
* Block types are matched case-insensitively against `'hero'` since the
|
|
7
|
+
* `blockType` field is by convention lower-cased in Payload.
|
|
8
|
+
*/
|
|
9
|
+
export const headingHierarchyCheck = {
|
|
10
|
+
name: 'heading-hierarchy',
|
|
11
|
+
run(doc, collection) {
|
|
12
|
+
const issues = [];
|
|
13
|
+
const layoutValue = doc[collection.layoutField];
|
|
14
|
+
if (!Array.isArray(layoutValue))
|
|
15
|
+
return issues;
|
|
16
|
+
const heroCount = layoutValue.filter((block) => {
|
|
17
|
+
if (!block || typeof block !== 'object')
|
|
18
|
+
return false;
|
|
19
|
+
const blockType = block['blockType'];
|
|
20
|
+
return typeof blockType === 'string' && blockType.toLowerCase() === 'hero';
|
|
21
|
+
}).length;
|
|
22
|
+
if (heroCount > 1) {
|
|
23
|
+
issues.push({
|
|
24
|
+
field: collection.layoutField,
|
|
25
|
+
message: `Page has ${heroCount} Hero blocks but should have exactly one (each Hero becomes an h1)`,
|
|
26
|
+
severity: 'error',
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return issues;
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=heading-hierarchy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading-hierarchy.js","sourceRoot":"","sources":["../../../src/publishing/checks/heading-hierarchy.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAuB;IACvD,IAAI,EAAE,mBAAmB;IACzB,GAAG,CAAC,GAAG,EAAE,UAAU;QACjB,MAAM,MAAM,GAAyB,EAAE,CAAA;QACvC,MAAM,WAAW,GAAG,GAAG,CAAC,UAAU,CAAC,WAAW,CAAC,CAAA;QAC/C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC;YAAE,OAAO,MAAM,CAAA;QAE9C,MAAM,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;YAC7C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;gBAAE,OAAO,KAAK,CAAA;YACrD,MAAM,SAAS,GAAI,KAAiC,CAAC,WAAW,CAAC,CAAA;YACjE,OAAO,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,WAAW,EAAE,KAAK,MAAM,CAAA;QAC5E,CAAC,CAAC,CAAC,MAAM,CAAA;QAET,IAAI,SAAS,GAAG,CAAC,EAAE,CAAC;YAClB,MAAM,CAAC,IAAI,CAAC;gBACV,KAAK,EAAE,UAAU,CAAC,WAAW;gBAC7B,OAAO,EAAE,YAAY,SAAS,oEAAoE;gBAClG,QAAQ,EAAE,OAAO;aAClB,CAAC,CAAA;QACJ,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { altTextCheck } from './alt-text.js';
|
|
2
|
+
export { headingHierarchyCheck } from './heading-hierarchy.js';
|
|
3
|
+
export { linkLabelsCheck } from './link-labels.js';
|
|
4
|
+
/** Built-in accessibility checks the pipeline runs before any user-supplied ones. */
|
|
5
|
+
export declare const BUILT_IN_ACCESSIBILITY_CHECKS: readonly [import("../options.js").AccessibilityCheck, import("../options.js").AccessibilityCheck, import("../options.js").AccessibilityCheck];
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/publishing/checks/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAElD,qFAAqF;AACrF,eAAO,MAAM,6BAA6B,+IAIhC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { altTextCheck } from './alt-text.js';
|
|
2
|
+
import { headingHierarchyCheck } from './heading-hierarchy.js';
|
|
3
|
+
import { linkLabelsCheck } from './link-labels.js';
|
|
4
|
+
export { altTextCheck } from './alt-text.js';
|
|
5
|
+
export { headingHierarchyCheck } from './heading-hierarchy.js';
|
|
6
|
+
export { linkLabelsCheck } from './link-labels.js';
|
|
7
|
+
/** Built-in accessibility checks the pipeline runs before any user-supplied ones. */
|
|
8
|
+
export const BUILT_IN_ACCESSIBILITY_CHECKS = [
|
|
9
|
+
altTextCheck,
|
|
10
|
+
headingHierarchyCheck,
|
|
11
|
+
linkLabelsCheck,
|
|
12
|
+
];
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/publishing/checks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAElD,qFAAqF;AACrF,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,YAAY;IACZ,qBAAqB;IACrB,eAAe;CACP,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AccessibilityCheck } from '../options.js';
|
|
2
|
+
/**
|
|
3
|
+
* Walks the document tree for objects with both `url` and `label` fields and
|
|
4
|
+
* flags any where the URL is non-empty but the label is missing or empty.
|
|
5
|
+
* "Click here"-style labels are not flagged (those need a content review,
|
|
6
|
+
* not a link-label check).
|
|
7
|
+
*/
|
|
8
|
+
export declare const linkLabelsCheck: AccessibilityCheck;
|
|
9
|
+
//# sourceMappingURL=link-labels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link-labels.d.ts","sourceRoot":"","sources":["../../../src/publishing/checks/link-labels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAsB,MAAM,eAAe,CAAA;AAE3E;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,kBAmB7B,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Walks the document tree for objects with both `url` and `label` fields and
|
|
3
|
+
* flags any where the URL is non-empty but the label is missing or empty.
|
|
4
|
+
* "Click here"-style labels are not flagged (those need a content review,
|
|
5
|
+
* not a link-label check).
|
|
6
|
+
*/
|
|
7
|
+
export const linkLabelsCheck = {
|
|
8
|
+
name: 'link-labels',
|
|
9
|
+
run(doc) {
|
|
10
|
+
const issues = [];
|
|
11
|
+
walkForLinks(doc, (link, path) => {
|
|
12
|
+
const url = link['url'];
|
|
13
|
+
const label = link['label'];
|
|
14
|
+
const hasUrl = typeof url === 'string' && url.trim() !== '';
|
|
15
|
+
const hasLabel = typeof label === 'string' && label.trim() !== '';
|
|
16
|
+
if (hasUrl && !hasLabel) {
|
|
17
|
+
issues.push({
|
|
18
|
+
field: path,
|
|
19
|
+
message: `Link at "${path}" has a URL but no label`,
|
|
20
|
+
severity: 'error',
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
return issues;
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
function walkForLinks(value, visit, path = '') {
|
|
28
|
+
if (!value || typeof value !== 'object')
|
|
29
|
+
return;
|
|
30
|
+
if (Array.isArray(value)) {
|
|
31
|
+
for (let i = 0; i < value.length; i++) {
|
|
32
|
+
walkForLinks(value[i], visit, `${path}[${i}]`);
|
|
33
|
+
}
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const obj = value;
|
|
37
|
+
if ('url' in obj && 'label' in obj) {
|
|
38
|
+
visit(obj, path || '(root)');
|
|
39
|
+
}
|
|
40
|
+
for (const key of Object.keys(obj)) {
|
|
41
|
+
walkForLinks(obj[key], visit, path ? `${path}.${key}` : key);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=link-labels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link-labels.js","sourceRoot":"","sources":["../../../src/publishing/checks/link-labels.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAuB;IACjD,IAAI,EAAE,aAAa;IACnB,GAAG,CAAC,GAAG;QACL,MAAM,MAAM,GAAyB,EAAE,CAAA;QACvC,YAAY,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;YAC/B,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAA;YACvB,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,CAAA;YAC3B,MAAM,MAAM,GAAG,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,CAAA;YAC3D,MAAM,QAAQ,GAAG,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAA;YACjE,IAAI,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACxB,MAAM,CAAC,IAAI,CAAC;oBACV,KAAK,EAAE,IAAI;oBACX,OAAO,EAAE,YAAY,IAAI,0BAA0B;oBACnD,QAAQ,EAAE,OAAO;iBAClB,CAAC,CAAA;YACJ,CAAC;QACH,CAAC,CAAC,CAAA;QACF,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AAED,SAAS,YAAY,CACnB,KAAc,EACd,KAA4D,EAC5D,IAAI,GAAG,EAAE;IAET,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAM;IAE/C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;QAChD,CAAC;QACD,OAAM;IACR,CAAC;IAED,MAAM,GAAG,GAAG,KAAgC,CAAA;IAC5C,IAAI,KAAK,IAAI,GAAG,IAAI,OAAO,IAAI,GAAG,EAAE,CAAC;QACnC,KAAK,CAAC,GAAG,EAAE,IAAI,IAAI,QAAQ,CAAC,CAAA;IAC9B,CAAC;IAED,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACnC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;IAC9D,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type Endpoint } from 'payload';
|
|
2
|
+
export interface CreateAdminEndpointsDeps {
|
|
3
|
+
/** Route prefix the plugin is mounted under, e.g. `/publishing`. */
|
|
4
|
+
routePrefix: string;
|
|
5
|
+
/** Collections registered as publishable; anything else is rejected. */
|
|
6
|
+
publishableSlugs: Set<string>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The admin's path into the pipeline.
|
|
10
|
+
*
|
|
11
|
+
* These endpoints authenticate off the Payload session cookie, so `req.user`
|
|
12
|
+
* is the logged-in editor — no API key in the editorial publish path, and
|
|
13
|
+
* the audit event records the person rather than a service principal. The
|
|
14
|
+
* write still goes through the pipeline, and still runs with
|
|
15
|
+
* `overrideAccess: false`, so neither the policy checks nor the collection's
|
|
16
|
+
* access control are skipped.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createAdminEndpoints(deps: CreateAdminEndpointsDeps): Endpoint[];
|
|
19
|
+
//# sourceMappingURL=admin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../src/publishing/endpoints/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,QAAQ,EAAuB,MAAM,SAAS,CAAA;AAatE,MAAM,WAAW,wBAAwB;IACvC,oEAAoE;IACpE,WAAW,EAAE,MAAM,CAAA;IACnB,wEAAwE;IACxE,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAC9B;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,wBAAwB,GAAG,QAAQ,EAAE,CAuB/E"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { APIError } from 'payload';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { getPublishingService, toAuthenticatedUser } from '../service.js';
|
|
4
|
+
const BodySchema = z.object({
|
|
5
|
+
collection: z.string().min(1),
|
|
6
|
+
id: z.union([z.string().min(1), z.number()]),
|
|
7
|
+
/** `schedule` only. */
|
|
8
|
+
publishAt: z.string().datetime({ offset: true }).optional(),
|
|
9
|
+
});
|
|
10
|
+
/**
|
|
11
|
+
* The admin's path into the pipeline.
|
|
12
|
+
*
|
|
13
|
+
* These endpoints authenticate off the Payload session cookie, so `req.user`
|
|
14
|
+
* is the logged-in editor — no API key in the editorial publish path, and
|
|
15
|
+
* the audit event records the person rather than a service principal. The
|
|
16
|
+
* write still goes through the pipeline, and still runs with
|
|
17
|
+
* `overrideAccess: false`, so neither the policy checks nor the collection's
|
|
18
|
+
* access control are skipped.
|
|
19
|
+
*/
|
|
20
|
+
export function createAdminEndpoints(deps) {
|
|
21
|
+
return [
|
|
22
|
+
{
|
|
23
|
+
path: `${deps.routePrefix}/publish`,
|
|
24
|
+
method: 'post',
|
|
25
|
+
handler: (req) => handle(req, deps, 'publish'),
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
path: `${deps.routePrefix}/unpublish`,
|
|
29
|
+
method: 'post',
|
|
30
|
+
handler: (req) => handle(req, deps, 'unpublish'),
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
path: `${deps.routePrefix}/schedule`,
|
|
34
|
+
method: 'post',
|
|
35
|
+
handler: (req) => handle(req, deps, 'schedule'),
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
path: `${deps.routePrefix}/unschedule`,
|
|
39
|
+
method: 'post',
|
|
40
|
+
handler: (req) => handle(req, deps, 'unschedule'),
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
}
|
|
44
|
+
async function handle(req, deps, action) {
|
|
45
|
+
if (!req.user) {
|
|
46
|
+
return json({ error: 'You must be logged in to publish.' }, 401);
|
|
47
|
+
}
|
|
48
|
+
let raw;
|
|
49
|
+
try {
|
|
50
|
+
raw = await req.json?.();
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return json({ error: 'Invalid JSON body.' }, 400);
|
|
54
|
+
}
|
|
55
|
+
const parsed = BodySchema.safeParse(raw);
|
|
56
|
+
if (!parsed.success) {
|
|
57
|
+
return json({ error: 'Expected a JSON body with `collection` and `id`.' }, 400);
|
|
58
|
+
}
|
|
59
|
+
const { collection, publishAt } = parsed.data;
|
|
60
|
+
const id = String(parsed.data.id);
|
|
61
|
+
if (action === 'schedule' && !publishAt) {
|
|
62
|
+
return json({ error: 'Expected `publishAt`, an ISO 8601 time, to schedule.' }, 400);
|
|
63
|
+
}
|
|
64
|
+
if (!deps.publishableSlugs.has(collection)) {
|
|
65
|
+
return json({
|
|
66
|
+
error: `Collection "${collection}" is not registered as publishable. Add it to publishingPlugin's collections option.`,
|
|
67
|
+
}, 400);
|
|
68
|
+
}
|
|
69
|
+
let service;
|
|
70
|
+
try {
|
|
71
|
+
service = getPublishingService(req.payload);
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
return json({ error: 'Publishing server not initialized.' }, 503);
|
|
75
|
+
}
|
|
76
|
+
const request = {
|
|
77
|
+
collection,
|
|
78
|
+
id,
|
|
79
|
+
actor: {
|
|
80
|
+
user: toAuthenticatedUser(req.user),
|
|
81
|
+
enforceAccessAs: req.user,
|
|
82
|
+
channel: 'admin',
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
try {
|
|
86
|
+
const result = action === 'publish'
|
|
87
|
+
? await service.publish(request)
|
|
88
|
+
: action === 'unpublish'
|
|
89
|
+
? await service.unpublish(request)
|
|
90
|
+
: action === 'schedule'
|
|
91
|
+
? await service.schedule({ ...request, publishAt: publishAt })
|
|
92
|
+
: await service.unschedule(request);
|
|
93
|
+
// A pipeline block is a real answer, not a transport failure: 200 with
|
|
94
|
+
// the diagnostic so the admin can render `failedAt` / `reason` /
|
|
95
|
+
// `issues` / `suggestion` rather than a generic error.
|
|
96
|
+
return json(result, 200);
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
if (error instanceof APIError) {
|
|
100
|
+
return json({ error: error.message }, error.status || 500);
|
|
101
|
+
}
|
|
102
|
+
req.payload.logger.error({ err: error }, `[publishing] admin ${action} failed for ${collection}/${id}`);
|
|
103
|
+
return json({ error: `Could not ${action} this document.` }, 500);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function json(body, status) {
|
|
107
|
+
return new Response(JSON.stringify(body), {
|
|
108
|
+
status,
|
|
109
|
+
headers: { 'content-type': 'application/json' },
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=admin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../../../src/publishing/endpoints/admin.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Inngest } from 'inngest';
|
|
2
|
+
type EventPayload = Parameters<Inngest['send']>[0];
|
|
3
|
+
/**
|
|
4
|
+
* Emits an Inngest event without letting a transport failure fail the action
|
|
5
|
+
* that already completed. Returns a warning message on failure, `null` on
|
|
6
|
+
* success.
|
|
7
|
+
*
|
|
8
|
+
* Publishing writes the document first and emits afterwards. The event is a
|
|
9
|
+
* consequence of the write, not a step in it — if the emission fails the
|
|
10
|
+
* document is still published. Throwing here would tell an editor their
|
|
11
|
+
* change didn't go live when it did, and the obvious response to that is to
|
|
12
|
+
* click Publish again on content that is already live.
|
|
13
|
+
*/
|
|
14
|
+
export declare function sendEventSafely(inngest: Inngest, event: EventPayload): Promise<string | null>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/publishing/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAElD;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,YAAY,GAClB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQxB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Emits an Inngest event without letting a transport failure fail the action
|
|
3
|
+
* that already completed. Returns a warning message on failure, `null` on
|
|
4
|
+
* success.
|
|
5
|
+
*
|
|
6
|
+
* Publishing writes the document first and emits afterwards. The event is a
|
|
7
|
+
* consequence of the write, not a step in it — if the emission fails the
|
|
8
|
+
* document is still published. Throwing here would tell an editor their
|
|
9
|
+
* change didn't go live when it did, and the obvious response to that is to
|
|
10
|
+
* click Publish again on content that is already live.
|
|
11
|
+
*/
|
|
12
|
+
export async function sendEventSafely(inngest, event) {
|
|
13
|
+
try {
|
|
14
|
+
await inngest.send(event);
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
const name = eventName(event);
|
|
19
|
+
return `The ${name} event could not be sent, so revalidation and integrations may not have run: ${describeError(error)}`;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function eventName(event) {
|
|
23
|
+
if (Array.isArray(event))
|
|
24
|
+
return event[0]?.name ?? 'publishing';
|
|
25
|
+
return event.name ?? 'publishing';
|
|
26
|
+
}
|
|
27
|
+
function describeError(error) {
|
|
28
|
+
return error instanceof Error ? error.message : String(error);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/publishing/events.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,OAAgB,EAChB,KAAmB;IAEnB,IAAI,CAAC;QACH,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACzB,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;QAC7B,OAAO,OAAO,IAAI,gFAAgF,aAAa,CAAC,KAAK,CAAC,EAAE,CAAA;IAC1H,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAAC,KAAmB;IACpC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,YAAY,CAAA;IAC/D,OAAQ,KAA2B,CAAC,IAAI,IAAI,YAAY,CAAA;AAC1D,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC/D,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { CollectionBeforeChangeHook } from 'payload';
|
|
2
|
+
/**
|
|
3
|
+
* The trust boundary. This `beforeChange` hook rejects every update that
|
|
4
|
+
* changes whether a document is live, unless the request explicitly carries
|
|
5
|
+
* the `bypassPublishingServer` context flag (set by the pipeline's
|
|
6
|
+
* `executeStep`).
|
|
7
|
+
*
|
|
8
|
+
* Without this hook, the Payload MCP could let Claude flip a document to
|
|
9
|
+
* `published` directly, sidestepping every check the publishing server
|
|
10
|
+
* exists to enforce. With it, the only sanctioned path is the pipeline.
|
|
11
|
+
*
|
|
12
|
+
* Three details of Payload's update pipeline shape this:
|
|
13
|
+
*
|
|
14
|
+
* 1. `data` is the existing document merged with the incoming changes, so
|
|
15
|
+
* `_status` is present on essentially every update — an ordinary field
|
|
16
|
+
* edit on a published document arrives carrying `_status: 'published'`.
|
|
17
|
+
* The presence of `_status` therefore means nothing on its own.
|
|
18
|
+
*
|
|
19
|
+
* 2. Payload injects `data._status = 'draft'` into every `draft: true`
|
|
20
|
+
* update before this hook runs, so a draft save of a published document
|
|
21
|
+
* arrives looking like an unpublish. `createRecordDraftWritesHook`
|
|
22
|
+
* captures the operation's real `draft` flag to tell them apart; both
|
|
23
|
+
* hooks must be installed together.
|
|
24
|
+
*
|
|
25
|
+
* 3. `originalDoc` is the *latest version*, not the live document. Once any
|
|
26
|
+
* draft version exists on a published document, `originalDoc._status` is
|
|
27
|
+
* `'draft'` while the document is still live — so comparing against it
|
|
28
|
+
* reads a genuine unpublish as a harmless no-op.
|
|
29
|
+
*
|
|
30
|
+
* So the question asked here is narrow and concrete: **would this write
|
|
31
|
+
* change what the public sees?** A draft write never does. A non-draft
|
|
32
|
+
* write does when it takes a live document down, or when it puts content
|
|
33
|
+
* live — including promoting a pending draft, which leaves `_status` on
|
|
34
|
+
* `published` throughout and so cannot be caught by comparing statuses
|
|
35
|
+
* alone.
|
|
36
|
+
*
|
|
37
|
+
* One non-draft `published` write over a pending draft is harmless: one
|
|
38
|
+
* whose content is exactly what is already live. That is Payload's own
|
|
39
|
+
* "Revert to published", which reads the live document and writes it back
|
|
40
|
+
* unchanged to discard the draft — the public sees nothing new, so there is
|
|
41
|
+
* nothing for the pipeline to check.
|
|
42
|
+
*
|
|
43
|
+
* Moving a document to the trash is the same question asked a different way.
|
|
44
|
+
* On a collection with `trash: true` it is an update that sets `deletedAt`,
|
|
45
|
+
* and every read then leaves the document out — so trashing a live document
|
|
46
|
+
* takes it off the site. `_status` stays `published` throughout, so without
|
|
47
|
+
* its own check it passed as an ordinary edit, and the page came down with no
|
|
48
|
+
* policy check, no `unpublished` event and nothing to drop the cached copy.
|
|
49
|
+
* It is refused while the document is live: unpublish, then trash.
|
|
50
|
+
*/
|
|
51
|
+
export declare function createBlockStatusWritesHook(): CollectionBeforeChangeHook;
|
|
52
|
+
//# sourceMappingURL=block-status-writes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-status-writes.d.ts","sourceRoot":"","sources":["../../../src/publishing/hooks/block-status-writes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAkB,MAAM,SAAS,CAAA;AAGzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,wBAAgB,2BAA2B,IAAI,0BAA0B,CA2DxE"}
|