@forumone/throughline 0.0.0 → 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 +352 -0
- 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 +183 -1
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { failureOptions } from '../../jobs/workflow-types.js';
|
|
2
|
+
import { defineJob } from '../../jobs/define.js';
|
|
3
|
+
import { jobPayload } from '../../jobs/options.js';
|
|
4
|
+
const DEFAULT_SCHEDULE = '*/5 * * * *';
|
|
5
|
+
const REASONING = 'Scheduled publish executed by workflow cron';
|
|
6
|
+
/**
|
|
7
|
+
* Cron-driven scheduled publish executor. Every tick (default: every 5
|
|
8
|
+
* minutes) the function looks for documents in any of the configured
|
|
9
|
+
* collections whose latest version is still a draft and whose
|
|
10
|
+
* `scheduledPublishAt` has passed, and calls `options.publish` for each.
|
|
11
|
+
*
|
|
12
|
+
* `publishAtScheduledTimeJob` does the same job on time and without
|
|
13
|
+
* polling. Run alongside it, this is the backstop — set `overdueByMs` and a
|
|
14
|
+
* slow schedule, and it only ever finds a document whose event went missing.
|
|
15
|
+
*
|
|
16
|
+
* `publish` must go through the publishing pipeline — see the option's own
|
|
17
|
+
* documentation for the wiring. That is what makes a scheduled publish get the
|
|
18
|
+
* same composition / accessibility / approval checks as an interactive one.
|
|
19
|
+
*
|
|
20
|
+
* A refusal is logged and does not throw; the document stays at
|
|
21
|
+
* `_status: draft` until an admin intervenes or a later tick succeeds.
|
|
22
|
+
* Throwing would retry indefinitely on a permanent error (a composition
|
|
23
|
+
* failure, say), which is wrong for cron-style work.
|
|
24
|
+
*/
|
|
25
|
+
export function executeScheduledPublishesJob(options) {
|
|
26
|
+
const schedule = options.schedule ?? DEFAULT_SCHEDULE;
|
|
27
|
+
return defineJob({
|
|
28
|
+
id: options.id ?? 'execute-scheduled-publishes',
|
|
29
|
+
/*
|
|
30
|
+
One at a time by default, because this reads then acts: `find-due-<slug>`
|
|
31
|
+
collects the documents whose scheduled time has passed, and the publish
|
|
32
|
+
loop runs after. Two overlapping runs both see the same due document and
|
|
33
|
+
both publish it — which for a pipeline that gates on approvals means two
|
|
34
|
+
audit trails for one act, and an `approval.granted` consumed twice.
|
|
35
|
+
|
|
36
|
+
The cost of the cap is nil: the poll finds nothing on almost every tick,
|
|
37
|
+
and a run that does find something is the only one that needs to.
|
|
38
|
+
*/
|
|
39
|
+
...failureOptions(options, 1),
|
|
40
|
+
on: { cron: schedule },
|
|
41
|
+
}, async ({ step, logger, payload: contextPayload }) => {
|
|
42
|
+
const payload = jobPayload(options.payload, contextPayload, options.id ?? 'execute-scheduled-publishes');
|
|
43
|
+
const dueBy = new Date(Date.now() - (options.overdueByMs ?? 0)).toISOString();
|
|
44
|
+
let publishedCount = 0;
|
|
45
|
+
let blockedCount = 0;
|
|
46
|
+
for (const config of options.collections) {
|
|
47
|
+
const statusField = config.statusField ?? '_status';
|
|
48
|
+
const scheduledField = config.scheduledField ?? 'scheduledPublishAt';
|
|
49
|
+
const due = await step.run(`find-due-${config.slug}`, async () => {
|
|
50
|
+
const result = await payload.find({
|
|
51
|
+
collection: config.slug,
|
|
52
|
+
where: {
|
|
53
|
+
and: [
|
|
54
|
+
{ [statusField]: { equals: 'draft' } },
|
|
55
|
+
{ [scheduledField]: { exists: true } },
|
|
56
|
+
{ [scheduledField]: { less_than_equal: dueBy } },
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
/*
|
|
60
|
+
The latest version, not the main row. A schedule is set by a draft
|
|
61
|
+
save, and Payload writes a draft save to the versions table alone —
|
|
62
|
+
so without this the poll read a column that the admin never wrote,
|
|
63
|
+
and only a schedule set over MCP, by a non-draft update, was ever
|
|
64
|
+
found. It is also what lets a revision of a live document be
|
|
65
|
+
scheduled: its latest version is a draft even while the main row
|
|
66
|
+
says `published`.
|
|
67
|
+
*/
|
|
68
|
+
draft: true,
|
|
69
|
+
limit: 100,
|
|
70
|
+
});
|
|
71
|
+
return result.docs.map((doc) => ({
|
|
72
|
+
id: String(doc['id']),
|
|
73
|
+
title: String(doc['title'] ?? doc['id']),
|
|
74
|
+
collection: config.slug,
|
|
75
|
+
}));
|
|
76
|
+
});
|
|
77
|
+
for (const doc of due) {
|
|
78
|
+
const outcome = await step.run(`publish-${config.slug}-${doc.id}`, async () => {
|
|
79
|
+
let result;
|
|
80
|
+
try {
|
|
81
|
+
result = await options.publish({
|
|
82
|
+
collection: doc.collection,
|
|
83
|
+
id: doc.id,
|
|
84
|
+
reasoning: REASONING,
|
|
85
|
+
}, { payload });
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
logger.error('Scheduled publish threw', {
|
|
89
|
+
document: doc.title,
|
|
90
|
+
error: error instanceof Error ? error.message : String(error),
|
|
91
|
+
});
|
|
92
|
+
return 'error';
|
|
93
|
+
}
|
|
94
|
+
if (!result.published) {
|
|
95
|
+
logger.warn('Scheduled publish blocked by policy', {
|
|
96
|
+
document: doc.title,
|
|
97
|
+
reason: result.reason,
|
|
98
|
+
});
|
|
99
|
+
return 'blocked';
|
|
100
|
+
}
|
|
101
|
+
logger.info('Scheduled publish succeeded', { document: doc.title });
|
|
102
|
+
return 'published';
|
|
103
|
+
});
|
|
104
|
+
if (outcome === 'published')
|
|
105
|
+
publishedCount += 1;
|
|
106
|
+
if (outcome === 'blocked')
|
|
107
|
+
blockedCount += 1;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
logger.info('Scheduled publish tick complete', { publishedCount, blockedCount });
|
|
111
|
+
return { publishedCount, blockedCount };
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=execute-scheduled-publishes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-scheduled-publishes.js","sourceRoot":"","sources":["../../../src/publishing/jobs/execute-scheduled-publishes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAEhD,OAAO,EAAE,UAAU,EAAmB,MAAM,uBAAuB,CAAA;AAGnE,MAAM,gBAAgB,GAAG,aAAa,CAAA;AACtC,MAAM,SAAS,GAAG,6CAA6C,CAAA;AAQ/D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,4BAA4B,CAC1C,OAAqD;IAErD,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,gBAAgB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AM,CAAC,IAAI,CAAC,qCAAqC,EAAE;4BACjD,QAAQ,EAAE,GAAG,CAAC,KAAK;4BACnB,MAAM,EAAE,MAAM,CAAC,MAAM;yBACtB,CAAC,CAAA;wBACF,OAAO,SAAS,CAAA;oBAClB,CAAC;oBAED,MAAM,CAAC,IAAI,CAAC,6BAA6B,EAAE,EAAE,QAAQ,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,CAAA;oBACnE,OAAO,WAAW,CAAA;gBACpB,CAAC,CACF,CAAA;gBACD,IAAI,OAAO,KAAK,WAAW;oBAAE,cAAc,IAAI,CAAC,CAAA;gBAChD,IAAI,OAAO,KAAK,SAAS;oBAAE,YAAY,IAAI,CAAC,CAAA;YAC9C,CAAC;QACH,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,iCAAiC,EAAE,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,CAAA;QAChF,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,CAAA;IACzC,CAAC,CACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type * as NextCacheModule from 'next/cache';
|
|
2
|
+
type NextCache = typeof NextCacheModule;
|
|
3
|
+
/**
|
|
4
|
+
* How stale a caller may find a tag after it is dropped: not at all.
|
|
5
|
+
*
|
|
6
|
+
* Next 16 made `revalidateTag`'s second argument required — it is a cache-life
|
|
7
|
+
* profile — and one-argument calls log a deprecation warning on every call.
|
|
8
|
+
* `{ expire: 0 }` is the immediate expiry the one-argument form used to mean,
|
|
9
|
+
* and it is what an editor pressing Publish or Save expects.
|
|
10
|
+
*
|
|
11
|
+
* Passed unconditionally rather than behind a version check. The peer range is
|
|
12
|
+
* `next >= 15`, and Next 15's `revalidateTag` takes one parameter and ignores a
|
|
13
|
+
* second, so the two-argument call is correct on both.
|
|
14
|
+
*
|
|
15
|
+
* `updateTag`, which Next offers as the other way out of the deprecation, is
|
|
16
|
+
* not usable here: it throws outside a Server Action, and these run in an
|
|
17
|
+
* Inngest step or in Payload's route handler.
|
|
18
|
+
*/
|
|
19
|
+
export declare const IMMEDIATE: {
|
|
20
|
+
readonly expire: 0;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* `next/cache`, loaded on first use.
|
|
24
|
+
*
|
|
25
|
+
* Dynamic so the package can be imported where Next is not installed (test
|
|
26
|
+
* runners, a non-Next frontend that passes its own revalidator). `next` is an
|
|
27
|
+
* optional peer.
|
|
28
|
+
*/
|
|
29
|
+
export declare function loadNextCache(): Promise<NextCache>;
|
|
30
|
+
/**
|
|
31
|
+
* Whether `error` is Next saying there is no request to revalidate for.
|
|
32
|
+
*
|
|
33
|
+
* Seeds, migrations and the Payload CLI write through the same hooks under
|
|
34
|
+
* `tsx` rather than inside a Next server. `revalidateTag` then throws
|
|
35
|
+
* `Invariant: static generation store missing in revalidateTag ...`. Nothing is
|
|
36
|
+
* stale in that case — there is no server to be stale — so it is the one
|
|
37
|
+
* failure that is not a fault.
|
|
38
|
+
*
|
|
39
|
+
* Matched on the message, the only stable surface Next gives it.
|
|
40
|
+
*/
|
|
41
|
+
export declare function isOutsideNextRequest(error: unknown): boolean;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=next-revalidate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next-revalidate.d.ts","sourceRoot":"","sources":["../../../src/publishing/jobs/next-revalidate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,eAAe,MAAM,YAAY,CAAA;AAElD,KAAK,SAAS,GAAG,OAAO,eAAe,CAAA;AAEvC;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,SAAS;;CAAyB,CAAA;AAE/C;;;;;;GAMG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,SAAS,CAAC,CAExD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE5D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How stale a caller may find a tag after it is dropped: not at all.
|
|
3
|
+
*
|
|
4
|
+
* Next 16 made `revalidateTag`'s second argument required — it is a cache-life
|
|
5
|
+
* profile — and one-argument calls log a deprecation warning on every call.
|
|
6
|
+
* `{ expire: 0 }` is the immediate expiry the one-argument form used to mean,
|
|
7
|
+
* and it is what an editor pressing Publish or Save expects.
|
|
8
|
+
*
|
|
9
|
+
* Passed unconditionally rather than behind a version check. The peer range is
|
|
10
|
+
* `next >= 15`, and Next 15's `revalidateTag` takes one parameter and ignores a
|
|
11
|
+
* second, so the two-argument call is correct on both.
|
|
12
|
+
*
|
|
13
|
+
* `updateTag`, which Next offers as the other way out of the deprecation, is
|
|
14
|
+
* not usable here: it throws outside a Server Action, and these run in an
|
|
15
|
+
* Inngest step or in Payload's route handler.
|
|
16
|
+
*/
|
|
17
|
+
export const IMMEDIATE = { expire: 0 };
|
|
18
|
+
/**
|
|
19
|
+
* `next/cache`, loaded on first use.
|
|
20
|
+
*
|
|
21
|
+
* Dynamic so the package can be imported where Next is not installed (test
|
|
22
|
+
* runners, a non-Next frontend that passes its own revalidator). `next` is an
|
|
23
|
+
* optional peer.
|
|
24
|
+
*/
|
|
25
|
+
export async function loadNextCache() {
|
|
26
|
+
return await import('next/cache');
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Whether `error` is Next saying there is no request to revalidate for.
|
|
30
|
+
*
|
|
31
|
+
* Seeds, migrations and the Payload CLI write through the same hooks under
|
|
32
|
+
* `tsx` rather than inside a Next server. `revalidateTag` then throws
|
|
33
|
+
* `Invariant: static generation store missing in revalidateTag ...`. Nothing is
|
|
34
|
+
* stale in that case — there is no server to be stale — so it is the one
|
|
35
|
+
* failure that is not a fault.
|
|
36
|
+
*
|
|
37
|
+
* Matched on the message, the only stable surface Next gives it.
|
|
38
|
+
*/
|
|
39
|
+
export function isOutsideNextRequest(error) {
|
|
40
|
+
return error instanceof Error && error.message.includes('static generation store missing');
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=next-revalidate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next-revalidate.js","sourceRoot":"","sources":["../../../src/publishing/jobs/next-revalidate.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,MAAM,EAAE,CAAC,EAAW,CAAA;AAE/C;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,OAAO,MAAM,MAAM,CAAC,YAAY,CAAC,CAAA;AACnC,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAc;IACjD,OAAO,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,iCAAiC,CAAC,CAAA;AAC5F,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Job } from '../../jobs/types.js';
|
|
2
|
+
import { type JobOptions } from '../../jobs/options.js';
|
|
3
|
+
import type { PublishAtScheduledTimeOptions } from '../../jobs/workflow-types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Publishes a document at the moment it was scheduled for, by sleeping until
|
|
6
|
+
* then — rather than polling for due documents.
|
|
7
|
+
*
|
|
8
|
+
* Triggered by `content/page.scheduled`, which the publishing plugin sends
|
|
9
|
+
* whenever a document's scheduled time changes to a new value. The event is a
|
|
10
|
+
* wake-up call and nothing more: **the document is the source of truth.** On
|
|
11
|
+
* waking, the run re-reads the document's latest version and publishes only if
|
|
12
|
+
* it still carries this exact time. So a reschedule, a cancellation, a manual
|
|
13
|
+
* publish in the meantime or an unpublish — each of which changes or clears
|
|
14
|
+
* the field — leaves the old run to wake, find nothing to do, and end. No
|
|
15
|
+
* cancellation event has to arrive for that to be correct, and a duplicate
|
|
16
|
+
* event cannot publish twice (the `idempotency` key drops the second anyway).
|
|
17
|
+
*
|
|
18
|
+
* `publish` must go through the publishing pipeline, exactly as for
|
|
19
|
+
* `executeScheduledPublishesJob`: a scheduled publish gets the same
|
|
20
|
+
* composition / accessibility / approval checks as an interactive one, and a
|
|
21
|
+
* refusal is logged, not retried.
|
|
22
|
+
*/
|
|
23
|
+
export declare function publishAtScheduledTimeJob(options: JobOptions<PublishAtScheduledTimeOptions>): Job;
|
|
24
|
+
//# sourceMappingURL=publish-at-scheduled-time.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-at-scheduled-time.d.ts","sourceRoot":"","sources":["../../../src/publishing/jobs/publish-at-scheduled-time.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAC9C,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,KAAK,EACV,6BAA6B,EAE9B,MAAM,8BAA8B,CAAA;AA8BrC;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,UAAU,CAAC,6BAA6B,CAAC,GAAG,GAAG,CAoGjG"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { failureOptions } from '../../jobs/workflow-types.js';
|
|
2
|
+
import { defineJob } from '../../jobs/define.js';
|
|
3
|
+
import { jobPayload } from '../../jobs/options.js';
|
|
4
|
+
const SCHEDULED_EVENT = 'content/page.scheduled';
|
|
5
|
+
const REASONING = 'Scheduled publish executed at its scheduled time';
|
|
6
|
+
/*
|
|
7
|
+
Six days, under the seven Inngest's free plan allows a single sleep.
|
|
8
|
+
|
|
9
|
+
A schedule further out than one hop is carried by a relay: the run sleeps a
|
|
10
|
+
hop, then re-sends the event and ends, so each leg is its own run. That also
|
|
11
|
+
keeps every run far inside the free plan's thirty-day run duration, which a
|
|
12
|
+
loop of sleeps inside one run would not — a post scheduled for next quarter
|
|
13
|
+
would simply be killed.
|
|
14
|
+
*/
|
|
15
|
+
const DEFAULT_MAX_SLEEP_MS = 6 * 24 * 60 * 60 * 1000;
|
|
16
|
+
/**
|
|
17
|
+
* Publishes a document at the moment it was scheduled for, by sleeping until
|
|
18
|
+
* then — rather than polling for due documents.
|
|
19
|
+
*
|
|
20
|
+
* Triggered by `content/page.scheduled`, which the publishing plugin sends
|
|
21
|
+
* whenever a document's scheduled time changes to a new value. The event is a
|
|
22
|
+
* wake-up call and nothing more: **the document is the source of truth.** On
|
|
23
|
+
* waking, the run re-reads the document's latest version and publishes only if
|
|
24
|
+
* it still carries this exact time. So a reschedule, a cancellation, a manual
|
|
25
|
+
* publish in the meantime or an unpublish — each of which changes or clears
|
|
26
|
+
* the field — leaves the old run to wake, find nothing to do, and end. No
|
|
27
|
+
* cancellation event has to arrive for that to be correct, and a duplicate
|
|
28
|
+
* event cannot publish twice (the `idempotency` key drops the second anyway).
|
|
29
|
+
*
|
|
30
|
+
* `publish` must go through the publishing pipeline, exactly as for
|
|
31
|
+
* `executeScheduledPublishesJob`: a scheduled publish gets the same
|
|
32
|
+
* composition / accessibility / approval checks as an interactive one, and a
|
|
33
|
+
* refusal is logged, not retried.
|
|
34
|
+
*/
|
|
35
|
+
export function publishAtScheduledTimeJob(options) {
|
|
36
|
+
const maxSleepMs = options.maxSleepMs ?? DEFAULT_MAX_SLEEP_MS;
|
|
37
|
+
const collections = new Map(options.collections.map((c) => [c.slug, c]));
|
|
38
|
+
return defineJob({
|
|
39
|
+
id: options.id ?? 'publish-at-scheduled-time',
|
|
40
|
+
/*
|
|
41
|
+
One run per schedule. The plugin sends once per change, but an MCP
|
|
42
|
+
schedule and the field hook seeing the same write, or a retried send,
|
|
43
|
+
would otherwise start two sleepers that both wake and both publish.
|
|
44
|
+
Inngest keeps this key for 24 hours, and a relay is six days after the
|
|
45
|
+
event that started its leg, so a relay is never mistaken for a duplicate.
|
|
46
|
+
*/
|
|
47
|
+
idempotency: { fields: ['collection', 'id', 'scheduledFor'] },
|
|
48
|
+
...failureOptions(options),
|
|
49
|
+
on: { event: SCHEDULED_EVENT },
|
|
50
|
+
}, async ({ event, step, logger, payload: contextPayload }) => {
|
|
51
|
+
const payload = jobPayload(options.payload, contextPayload, options.id ?? 'publish-at-scheduled-time');
|
|
52
|
+
const data = event.data;
|
|
53
|
+
const config = data.collection ? collections.get(data.collection) : undefined;
|
|
54
|
+
const target = typeof data.scheduledFor === 'string' ? Date.parse(data.scheduledFor) : NaN;
|
|
55
|
+
if (!config || !data.id || !data.scheduledFor || Number.isNaN(target)) {
|
|
56
|
+
return { outcome: 'ignored', reason: 'not a scheduled publish this function handles' };
|
|
57
|
+
}
|
|
58
|
+
const request = { collection: config.slug, id: data.id, scheduledFor: data.scheduledFor };
|
|
59
|
+
/*
|
|
60
|
+
Measured from the event's own timestamp, not the clock. Inngest replays
|
|
61
|
+
the handler from the top after every step, so a `Date.now()` here would
|
|
62
|
+
give a different answer on each replay — and flipping from the relay
|
|
63
|
+
branch to the direct branch halfway through a run is a run whose steps
|
|
64
|
+
no longer match its history.
|
|
65
|
+
*/
|
|
66
|
+
const startedAt = typeof event.ts === 'number' ? event.ts : Date.now();
|
|
67
|
+
if (target - startedAt > maxSleepMs) {
|
|
68
|
+
const hopUntil = new Date(startedAt + maxSleepMs);
|
|
69
|
+
await step.sleepUntil('wait-one-hop', hopUntil);
|
|
70
|
+
// Only relay a schedule that still stands, or a cancelled one would
|
|
71
|
+
// keep re-sending itself every six days until its date came round.
|
|
72
|
+
const current = await step.run('check-still-scheduled', () => isStillScheduled({ payload }, config, request));
|
|
73
|
+
if (!current)
|
|
74
|
+
return { outcome: 'superseded' };
|
|
75
|
+
await step.sendEvent('relay', { name: SCHEDULED_EVENT, data: request });
|
|
76
|
+
return { outcome: 'relayed', hopUntil: hopUntil.toISOString() };
|
|
77
|
+
}
|
|
78
|
+
await step.sleepUntil('wait-until-due', new Date(target));
|
|
79
|
+
const due = await step.run('check-still-scheduled', () => isStillScheduled({ payload }, config, request));
|
|
80
|
+
if (!due) {
|
|
81
|
+
logger.info('Scheduled publish superseded', request);
|
|
82
|
+
return { outcome: 'superseded' };
|
|
83
|
+
}
|
|
84
|
+
return step.run('publish', async () => {
|
|
85
|
+
try {
|
|
86
|
+
const result = await options.publish({
|
|
87
|
+
collection: config.slug,
|
|
88
|
+
id: request.id,
|
|
89
|
+
reasoning: REASONING,
|
|
90
|
+
}, { payload });
|
|
91
|
+
if (!result.published) {
|
|
92
|
+
logger.warn('Scheduled publish blocked by policy', {
|
|
93
|
+
...request,
|
|
94
|
+
reason: result.reason,
|
|
95
|
+
});
|
|
96
|
+
return { outcome: 'blocked', reason: result.reason };
|
|
97
|
+
}
|
|
98
|
+
logger.info('Scheduled publish succeeded', request);
|
|
99
|
+
return { outcome: 'published' };
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
/*
|
|
103
|
+
Not rethrown. A retry would re-run the pipeline against the same
|
|
104
|
+
document, and the daily backstop in
|
|
105
|
+
`executeScheduledPublishesJob` already comes back for a
|
|
106
|
+
document that is still a draft past its time.
|
|
107
|
+
*/
|
|
108
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
109
|
+
logger.error('Scheduled publish threw', { ...request, error: reason });
|
|
110
|
+
return { outcome: 'error', reason };
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Whether the document's latest version still carries this schedule.
|
|
117
|
+
*
|
|
118
|
+
* `draft: true`, because a schedule is written by a draft save and Payload
|
|
119
|
+
* writes a draft save to the versions table only — the main row is not
|
|
120
|
+
* touched, so a read without it would see a document with no schedule at all.
|
|
121
|
+
*/
|
|
122
|
+
async function isStillScheduled(options, config, request) {
|
|
123
|
+
const field = config.scheduledField ?? 'scheduledPublishAt';
|
|
124
|
+
const doc = (await options.payload.findByID({
|
|
125
|
+
collection: config.slug,
|
|
126
|
+
id: request.id,
|
|
127
|
+
draft: true,
|
|
128
|
+
depth: 0,
|
|
129
|
+
disableErrors: true,
|
|
130
|
+
}));
|
|
131
|
+
const value = doc?.[field];
|
|
132
|
+
if (typeof value !== 'string')
|
|
133
|
+
return false;
|
|
134
|
+
return Date.parse(value) === Date.parse(request.scheduledFor);
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=publish-at-scheduled-time.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-at-scheduled-time.js","sourceRoot":"","sources":["../../../src/publishing/jobs/publish-at-scheduled-time.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAEhD,OAAO,EAAE,UAAU,EAAmB,MAAM,uBAAuB,CAAA;AAMnE,MAAM,eAAe,GAAG,wBAAwB,CAAA;AAChD,MAAM,SAAS,GAAG,kDAAkD,CAAA;AAEpE;;;;;;;;EAQE;AACF,MAAM,oBAAoB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;AAgBpD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,yBAAyB,CAAC,OAAkD;IAC1F,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,oBAAoB,CAAA;IAC7D,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;IAExE,OAAO,SAAS,CACd;QACE,EAAE,EAAE,OAAO,CAAC,EAAE,IAAI,2BAA2B;QAC7C;;;;;;UAME;QACF,WAAW,EAAE,EAAE,MAAM,EAAE,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE;QAC7D,GAAG,cAAc,CAAC,OAAO,CAAC;QAC1B,EAAE,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE;KAC/B,EACD,KAAK,EAAE,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C1B,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;AAC/D,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { JobOptions } from '../../jobs/options.js';
|
|
2
|
+
import type { Job } from '../../jobs/types.js';
|
|
3
|
+
import type { RevalidateOnPublishOptions } from '../../jobs/workflow-types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Builds the `revalidate-on-publish` Inngest function. Subscribes to the
|
|
6
|
+
* publishing taxonomy and revalidates Next.js cache entries for the affected
|
|
7
|
+
* page, the listing routes, and the sitemap.
|
|
8
|
+
*
|
|
9
|
+
* The page path comes from `options.urlBuilders`, which is required: only the
|
|
10
|
+
* site knows where a collection's documents are served. A collection with no
|
|
11
|
+
* builder gets its tags dropped and no path revalidated, with a warning —
|
|
12
|
+
* there used to be built-in builders (`pages` → `/<slug>`, `posts` →
|
|
13
|
+
* `/blog/<slug>`, anything else → `/<slug>`), and a site whose routes differed
|
|
14
|
+
* revalidated the wrong path without a word.
|
|
15
|
+
*
|
|
16
|
+
* Tags default to `cacheTags.collection(<collection>)`. Pass the same
|
|
17
|
+
* `cacheTags` your readers and your tag hooks use.
|
|
18
|
+
*
|
|
19
|
+
* The default revalidate function dynamically imports `next/cache`, so the
|
|
20
|
+
* package is safe to install in non-Next.js contexts. Pass `options.revalidate`
|
|
21
|
+
* to use a different cache invalidation strategy.
|
|
22
|
+
*/
|
|
23
|
+
export declare function revalidateOnPublishJob(options: JobOptions<RevalidateOnPublishOptions>): Job;
|
|
24
|
+
//# sourceMappingURL=revalidate-on-publish.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revalidate-on-publish.d.ts","sourceRoot":"","sources":["../../../src/publishing/jobs/revalidate-on-publish.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAG9C,OAAO,KAAK,EAEV,0BAA0B,EAE3B,MAAM,8BAA8B,CAAA;AAErC;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,UAAU,CAAC,0BAA0B,CAAC,GAAG,GAAG,CAmD3F"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { failureOptions } from '../../jobs/workflow-types.js';
|
|
2
|
+
import { defineJob } from '../../jobs/define.js';
|
|
3
|
+
import { defaultCacheTags } from '../../cache-tags.js';
|
|
4
|
+
import { IMMEDIATE, loadNextCache } from './next-revalidate.js';
|
|
5
|
+
/**
|
|
6
|
+
* Builds the `revalidate-on-publish` Inngest function. Subscribes to the
|
|
7
|
+
* publishing taxonomy and revalidates Next.js cache entries for the affected
|
|
8
|
+
* page, the listing routes, and the sitemap.
|
|
9
|
+
*
|
|
10
|
+
* The page path comes from `options.urlBuilders`, which is required: only the
|
|
11
|
+
* site knows where a collection's documents are served. A collection with no
|
|
12
|
+
* builder gets its tags dropped and no path revalidated, with a warning —
|
|
13
|
+
* there used to be built-in builders (`pages` → `/<slug>`, `posts` →
|
|
14
|
+
* `/blog/<slug>`, anything else → `/<slug>`), and a site whose routes differed
|
|
15
|
+
* revalidated the wrong path without a word.
|
|
16
|
+
*
|
|
17
|
+
* Tags default to `cacheTags.collection(<collection>)`. Pass the same
|
|
18
|
+
* `cacheTags` your readers and your tag hooks use.
|
|
19
|
+
*
|
|
20
|
+
* The default revalidate function dynamically imports `next/cache`, so the
|
|
21
|
+
* package is safe to install in non-Next.js contexts. Pass `options.revalidate`
|
|
22
|
+
* to use a different cache invalidation strategy.
|
|
23
|
+
*/
|
|
24
|
+
export function revalidateOnPublishJob(options) {
|
|
25
|
+
const urlBuilders = options.urlBuilders;
|
|
26
|
+
const cacheTags = options.cacheTags ?? defaultCacheTags;
|
|
27
|
+
const collectionTags = options.collectionTags ?? {};
|
|
28
|
+
const revalidate = options.revalidate ?? defaultRevalidate;
|
|
29
|
+
return defineJob({
|
|
30
|
+
id: options.id ?? 'revalidate-on-publish',
|
|
31
|
+
retries: 5,
|
|
32
|
+
/*
|
|
33
|
+
No default cap. This is event-driven and idempotent — it drops cache tags
|
|
34
|
+
and revalidates paths, and doing that twice is the same as doing it once —
|
|
35
|
+
so two publishes landing together should not queue behind each other.
|
|
36
|
+
*/
|
|
37
|
+
...failureOptions(options),
|
|
38
|
+
on: {
|
|
39
|
+
event: ['content/page.published', 'content/page.unpublished', 'content/page.rolled_back'],
|
|
40
|
+
},
|
|
41
|
+
}, async ({ event, step, logger }) => {
|
|
42
|
+
const data = (event.data ?? {});
|
|
43
|
+
const collection = data.collection ?? 'pages';
|
|
44
|
+
const slug = data.slug ?? data.id ?? '';
|
|
45
|
+
const tags = collectionTags[collection] ?? [cacheTags.collection(collection)];
|
|
46
|
+
await step.run('revalidate-page-path', async () => {
|
|
47
|
+
const builder = Object.hasOwn(urlBuilders, collection) ? urlBuilders[collection] : undefined;
|
|
48
|
+
if (!builder) {
|
|
49
|
+
logger.warn('No urlBuilders entry for this collection, so no page path was revalidated. Add one to revalidateOnPublishJob.', { collection, slug });
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const path = builder(slug);
|
|
53
|
+
await revalidate({ path, tags });
|
|
54
|
+
logger.info('Revalidated page path', { path, tags });
|
|
55
|
+
});
|
|
56
|
+
await step.run('revalidate-listings', async () => {
|
|
57
|
+
await revalidate({ path: '', tags });
|
|
58
|
+
});
|
|
59
|
+
await step.run('revalidate-sitemap', async () => {
|
|
60
|
+
await revalidate({ path: '/sitemap.xml', tags: ['sitemap'] });
|
|
61
|
+
});
|
|
62
|
+
return { collection, slug, revalidated: true };
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Default revalidator: dynamic-imports `next/cache` so the package can be
|
|
67
|
+
* imported in environments without Next.js (e.g. test runners that don't
|
|
68
|
+
* stub the module). Calls `revalidatePath` only when `path` is non-empty
|
|
69
|
+
* because `revalidatePath('')` triggers a noisy Next.js warning.
|
|
70
|
+
*/
|
|
71
|
+
const defaultRevalidate = async ({ path, tags }) => {
|
|
72
|
+
const { revalidatePath, revalidateTag } = await loadNextCache();
|
|
73
|
+
if (path)
|
|
74
|
+
revalidatePath(path);
|
|
75
|
+
for (const tag of tags)
|
|
76
|
+
revalidateTag(tag, IMMEDIATE);
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=revalidate-on-publish.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revalidate-on-publish.js","sourceRoot":"","sources":["../../../src/publishing/jobs/revalidate-on-publish.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAGhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAO/D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAA+C;IACpF,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAA;IACvC,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,gBAAgB,CAAA;IACvD,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,IAAI,EAAE,CAAA;IACnD,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,iBAAiB,CAAA;IAE1D,OAAO,SAAS,CACd;QACE,EAAE,EAAE,OAAO,CAAC,EAAE,IAAI,uBAAuB;QACzC,OAAO,EAAE,CAAC;QACV;;;;UAIE;QACF,GAAG,cAAc,CAAC,OAAO,CAAC;QAC1B,EAAE,EAAE;YACF,KAAK,EAAE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AAM,IAAI,CAAC,GAAG,CAAC,oBAAoB,EAAE,KAAK,IAAI,EAAE;YAC9C,MAAM,UAAU,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;QAC/D,CAAC,CAAC,CAAA;QAEF,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAA;IAChD,CAAC,CACF,CAAA;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,iBAAiB,GAAiB,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAwB,EAAE,EAAE;IACrF,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,GAAG,MAAM,aAAa,EAAE,CAAA;IAC/D,IAAI,IAAI;QAAE,cAAc,CAAC,IAAI,CAAC,CAAA;IAC9B,KAAK,MAAM,GAAG,IAAI,IAAI;QAAE,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC,CAAA;AACvD,CAAC,CAAA"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { CollectionAfterChangeHook, CollectionAfterDeleteHook, GlobalAfterChangeHook } from 'payload';
|
|
2
|
+
import { type CacheTags } from '../../cache-tags.js';
|
|
3
|
+
/** Drops one tag. Return a promise to have it awaited. */
|
|
4
|
+
export type RevalidateTagFn = (tag: string) => void | Promise<void>;
|
|
5
|
+
export interface TagRevalidationOptions {
|
|
6
|
+
/**
|
|
7
|
+
* The tag scheme. Pass the same object your readers build their tags from —
|
|
8
|
+
* that is the whole point of it. Default: `defaultCacheTags`.
|
|
9
|
+
*/
|
|
10
|
+
cacheTags?: CacheTags;
|
|
11
|
+
/**
|
|
12
|
+
* How to drop a tag. Default: Next's `revalidateTag(tag, { expire: 0 })`,
|
|
13
|
+
* loaded from `next/cache` on first use. Supply your own for a non-Next
|
|
14
|
+
* frontend or a CDN.
|
|
15
|
+
*/
|
|
16
|
+
revalidateTag?: RevalidateTagFn;
|
|
17
|
+
}
|
|
18
|
+
/** Which tags a hook drops, built from the scheme. */
|
|
19
|
+
export type TagSelector = (cacheTags: CacheTags, slug: string) => readonly string[];
|
|
20
|
+
export interface CollectionTagHookOptions {
|
|
21
|
+
/**
|
|
22
|
+
* The tags to drop. Default: the collection's own tag,
|
|
23
|
+
* `cacheTags.collection(slug)`. Use it to drop a tag a *different* reader
|
|
24
|
+
* owns — a navigation global that links to pages caches the pages' slugs:
|
|
25
|
+
*
|
|
26
|
+
* ```ts
|
|
27
|
+
* tags: (t, slug) => [t.collection(slug), t.global('navigation')]
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
tags?: TagSelector;
|
|
31
|
+
/**
|
|
32
|
+
* Which `afterChange` operations drop. Default: both. An upload collection
|
|
33
|
+
* can pass `['update']`: nothing can reference a document that did not exist
|
|
34
|
+
* a moment ago, so creating one makes no cached page untrue.
|
|
35
|
+
*/
|
|
36
|
+
operations?: ReadonlyArray<'create' | 'update'>;
|
|
37
|
+
}
|
|
38
|
+
export interface GlobalTagHookOptions {
|
|
39
|
+
/** The tags to drop. Default: the global's own tag, `cacheTags.global(slug)`. */
|
|
40
|
+
tags?: TagSelector;
|
|
41
|
+
}
|
|
42
|
+
export interface TagRevalidationHooks {
|
|
43
|
+
/** `afterChange` for a collection. Skips draft writes. */
|
|
44
|
+
afterCollectionChange(options?: CollectionTagHookOptions): CollectionAfterChangeHook;
|
|
45
|
+
/** `afterDelete` for a collection. */
|
|
46
|
+
afterCollectionDelete(options?: Pick<CollectionTagHookOptions, 'tags'>): CollectionAfterDeleteHook;
|
|
47
|
+
/** `afterChange` for a global. */
|
|
48
|
+
afterGlobalChange(options?: GlobalTagHookOptions): GlobalAfterChangeHook;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Builds the tag-revalidation hooks for one tag scheme.
|
|
52
|
+
*
|
|
53
|
+
* ```ts
|
|
54
|
+
* import { createTagRevalidationHooks } from '@forumone/throughline/publishing'
|
|
55
|
+
* import { cacheTags } from './lib/cache-tags'
|
|
56
|
+
*
|
|
57
|
+
* const revalidation = createTagRevalidationHooks({ cacheTags })
|
|
58
|
+
*
|
|
59
|
+
* const Pages: CollectionConfig = {
|
|
60
|
+
* slug: 'pages',
|
|
61
|
+
* hooks: {
|
|
62
|
+
* afterChange: [revalidation.afterCollectionChange()],
|
|
63
|
+
* afterDelete: [revalidation.afterCollectionDelete()],
|
|
64
|
+
* },
|
|
65
|
+
* ...
|
|
66
|
+
* }
|
|
67
|
+
* const Navigation: GlobalConfig = {
|
|
68
|
+
* slug: 'navigation',
|
|
69
|
+
* hooks: { afterChange: [revalidation.afterGlobalChange()] },
|
|
70
|
+
* ...
|
|
71
|
+
* }
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* A hook never throws. Failing it would roll back the editor's save over a
|
|
75
|
+
* cache miss. A failure is logged at `error` instead, and the one expected
|
|
76
|
+
* failure — running outside a Next request, as seeds, migrations and the CLI
|
|
77
|
+
* do — at `debug`.
|
|
78
|
+
*/
|
|
79
|
+
export declare function createTagRevalidationHooks(options?: TagRevalidationOptions): TagRevalidationHooks;
|
|
80
|
+
//# sourceMappingURL=revalidate-tag-hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revalidate-tag-hooks.d.ts","sourceRoot":"","sources":["../../../src/publishing/jobs/revalidate-tag-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,yBAAyB,EACzB,qBAAqB,EAEtB,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,qBAAqB,CAAA;AAgBtE,0DAA0D;AAC1D,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAEnE,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB;;;;OAIG;IAC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