@aglyn/aglyn 1.0.0-beta.220 → 1.0.0-beta.222
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/package.json +15 -11
- package/src/lib/app-utils/agent-openapi.js +1 -1
- package/src/lib/app-utils/agent-openapi.js.map +1 -1
- package/src/lib/app-utils/analytics-events.d.ts +3 -2
- package/src/lib/app-utils/analytics-events.js +3 -2
- package/src/lib/app-utils/analytics-events.js.map +1 -1
- package/src/lib/app-utils/api-plugins.d.ts +30 -0
- package/src/lib/app-utils/api-plugins.js +24 -1
- package/src/lib/app-utils/api-plugins.js.map +1 -1
- package/src/lib/app-utils/author-html.d.ts +1 -1
- package/src/lib/app-utils/author-html.js.map +1 -1
- package/src/lib/app-utils/bandwidth-cap.d.ts +12 -1
- package/src/lib/app-utils/bandwidth-cap.js +17 -1
- package/src/lib/app-utils/bandwidth-cap.js.map +1 -1
- package/src/lib/app-utils/compose-reusable-components.d.ts +19 -0
- package/src/lib/app-utils/compose-reusable-components.js +116 -26
- package/src/lib/app-utils/compose-reusable-components.js.map +1 -1
- package/src/lib/app-utils/console-routes.d.ts +4 -0
- package/src/lib/app-utils/console-routes.js +3 -0
- package/src/lib/app-utils/console-routes.js.map +1 -1
- package/src/lib/app-utils/contacts.d.ts +71 -0
- package/src/lib/app-utils/contacts.js +55 -0
- package/src/lib/app-utils/contacts.js.map +1 -1
- package/src/lib/app-utils/contexts.d.ts +1 -0
- package/src/lib/app-utils/contexts.js +1 -0
- package/src/lib/app-utils/contexts.js.map +1 -1
- package/src/lib/app-utils/crm-email-templates.js +21 -4
- package/src/lib/app-utils/crm-email-templates.js.map +1 -1
- package/src/lib/app-utils/crm-kinds.d.ts +2 -0
- package/src/lib/app-utils/crm-kinds.js +1 -0
- package/src/lib/app-utils/crm-kinds.js.map +1 -1
- package/src/lib/app-utils/crm.d.ts +1199 -67
- package/src/lib/app-utils/crm.js +1951 -310
- package/src/lib/app-utils/crm.js.map +1 -1
- package/src/lib/app-utils/csv-import.d.ts +10 -38
- package/src/lib/app-utils/csv-import.js +17 -42
- package/src/lib/app-utils/csv-import.js.map +1 -1
- package/src/lib/app-utils/csv.d.ts +32 -11
- package/src/lib/app-utils/csv.js +43 -5
- package/src/lib/app-utils/csv.js.map +1 -1
- package/src/lib/app-utils/default-site.d.ts +116 -0
- package/src/lib/app-utils/default-site.js +1024 -0
- package/src/lib/app-utils/default-site.js.map +1 -0
- package/src/lib/app-utils/docs-help.generated.d.ts +23 -23
- package/src/lib/app-utils/docs-help.generated.js +47 -10
- package/src/lib/app-utils/docs-help.generated.js.map +1 -1
- package/src/lib/app-utils/docs-index.generated.js +746 -151
- package/src/lib/app-utils/docs-index.generated.js.map +1 -1
- package/src/lib/app-utils/draft-placeholders.d.ts +76 -0
- package/src/lib/app-utils/draft-placeholders.js +115 -0
- package/src/lib/app-utils/draft-placeholders.js.map +1 -0
- package/src/lib/app-utils/entity-picker-context.d.ts +19 -15
- package/src/lib/app-utils/entity-picker-context.js +4 -4
- package/src/lib/app-utils/entity-picker-context.js.map +1 -1
- package/src/lib/app-utils/expand-repeatables.d.ts +66 -10
- package/src/lib/app-utils/expand-repeatables.js +88 -14
- package/src/lib/app-utils/expand-repeatables.js.map +1 -1
- package/src/lib/app-utils/forms.d.ts +33 -22
- package/src/lib/app-utils/forms.js +47 -28
- package/src/lib/app-utils/forms.js.map +1 -1
- package/src/lib/app-utils/full-use-cost.d.ts +277 -0
- package/src/lib/app-utils/full-use-cost.js +421 -0
- package/src/lib/app-utils/full-use-cost.js.map +1 -0
- package/src/lib/app-utils/health-report.js +33 -0
- package/src/lib/app-utils/health-report.js.map +1 -1
- package/src/lib/app-utils/leaving-notice.d.ts +96 -0
- package/src/lib/app-utils/leaving-notice.js +157 -0
- package/src/lib/app-utils/leaving-notice.js.map +1 -0
- package/src/lib/app-utils/llms-txt.d.ts +20 -0
- package/src/lib/app-utils/llms-txt.js +7 -1
- package/src/lib/app-utils/llms-txt.js.map +1 -1
- package/src/lib/app-utils/media-asset-facts.d.ts +16 -1
- package/src/lib/app-utils/media-asset-facts.js +40 -13
- package/src/lib/app-utils/media-asset-facts.js.map +1 -1
- package/src/lib/app-utils/media-bandwidth.d.ts +52 -0
- package/src/lib/app-utils/media-bandwidth.js +94 -0
- package/src/lib/app-utils/media-bandwidth.js.map +1 -0
- package/src/lib/app-utils/media-ref.d.ts +241 -33
- package/src/lib/app-utils/media-ref.js +324 -43
- package/src/lib/app-utils/media-ref.js.map +1 -1
- package/src/lib/app-utils/media-src.d.ts +8 -8
- package/src/lib/app-utils/media-src.js +27 -11
- package/src/lib/app-utils/media-src.js.map +1 -1
- package/src/lib/app-utils/media-takedown-reach.d.ts +4 -1
- package/src/lib/app-utils/media-takedown-reach.js +6 -3
- package/src/lib/app-utils/media-takedown-reach.js.map +1 -1
- package/src/lib/app-utils/notifications.d.ts +1 -1
- package/src/lib/app-utils/notifications.js +2 -0
- package/src/lib/app-utils/notifications.js.map +1 -1
- package/src/lib/app-utils/operator-alerts.js +17 -0
- package/src/lib/app-utils/operator-alerts.js.map +1 -1
- package/src/lib/app-utils/organizations.d.ts +51 -2
- package/src/lib/app-utils/organizations.js +56 -3
- package/src/lib/app-utils/organizations.js.map +1 -1
- package/src/lib/app-utils/page-record-sources.d.ts +87 -0
- package/src/lib/app-utils/page-record-sources.js +53 -0
- package/src/lib/app-utils/page-record-sources.js.map +1 -0
- package/src/lib/app-utils/paid-media-source.d.ts +3 -7
- package/src/lib/app-utils/paid-media-source.js +5 -19
- package/src/lib/app-utils/paid-media-source.js.map +1 -1
- package/src/lib/app-utils/person-erasure.d.ts +5 -2
- package/src/lib/app-utils/person-erasure.js.map +1 -1
- package/src/lib/app-utils/picklists.d.ts +187 -0
- package/src/lib/app-utils/picklists.js +320 -0
- package/src/lib/app-utils/picklists.js.map +1 -0
- package/src/lib/app-utils/plan-entitlements.d.ts +220 -50
- package/src/lib/app-utils/plan-entitlements.js +309 -115
- package/src/lib/app-utils/plan-entitlements.js.map +1 -1
- package/src/lib/app-utils/realm-host-surface.generated.js +2 -0
- package/src/lib/app-utils/realm-host-surface.generated.js.map +1 -1
- package/src/lib/app-utils/release-flags.d.ts +1 -1
- package/src/lib/app-utils/release-flags.js +11 -0
- package/src/lib/app-utils/release-flags.js.map +1 -1
- package/src/lib/app-utils/rendered-widths.d.ts +121 -0
- package/src/lib/app-utils/rendered-widths.js +211 -0
- package/src/lib/app-utils/rendered-widths.js.map +1 -0
- package/src/lib/app-utils/repeat-sources.d.ts +2 -1
- package/src/lib/app-utils/repeat-sources.js.map +1 -1
- package/src/lib/app-utils/screen-link-context-value.d.ts +7 -0
- package/src/lib/app-utils/screen-link-context-value.js.map +1 -1
- package/src/lib/app-utils/screen-link-context.js +14 -2
- package/src/lib/app-utils/screen-link-context.js.map +1 -1
- package/src/lib/app-utils/screen-route.d.ts +157 -36
- package/src/lib/app-utils/screen-route.js +191 -41
- package/src/lib/app-utils/screen-route.js.map +1 -1
- package/src/lib/app-utils/seo-audit.d.ts +11 -1
- package/src/lib/app-utils/seo-audit.js +33 -13
- package/src/lib/app-utils/seo-audit.js.map +1 -1
- package/src/lib/app-utils/seo-keywords.d.ts +11 -0
- package/src/lib/app-utils/seo-keywords.js +19 -5
- package/src/lib/app-utils/seo-keywords.js.map +1 -1
- package/src/lib/app-utils/seo-page-facts.d.ts +47 -4
- package/src/lib/app-utils/seo-page-facts.js +136 -31
- package/src/lib/app-utils/seo-page-facts.js.map +1 -1
- package/src/lib/app-utils/seo-site-scan.d.ts +42 -4
- package/src/lib/app-utils/seo-site-scan.js +113 -12
- package/src/lib/app-utils/seo-site-scan.js.map +1 -1
- package/src/lib/app-utils/server.d.ts +5 -4
- package/src/lib/app-utils/server.js +14 -5
- package/src/lib/app-utils/server.js.map +1 -1
- package/src/lib/app-utils/site-icon-set.d.ts +195 -0
- package/src/lib/app-utils/site-icon-set.js +351 -0
- package/src/lib/app-utils/site-icon-set.js.map +1 -0
- package/src/lib/app-utils/site-interactions.d.ts +101 -4
- package/src/lib/app-utils/site-interactions.js +120 -4
- package/src/lib/app-utils/site-interactions.js.map +1 -1
- package/src/lib/app-utils/starter-template-nodes.d.ts +7 -0
- package/src/lib/app-utils/starter-template-nodes.js +3 -0
- package/src/lib/app-utils/starter-template-nodes.js.map +1 -1
- package/src/lib/app-utils/starter-templates.d.ts +5 -19
- package/src/lib/app-utils/starter-templates.js +5 -49
- package/src/lib/app-utils/starter-templates.js.map +1 -1
- package/src/lib/app-utils/transfer-launcher-context.d.ts +136 -0
- package/src/lib/app-utils/transfer-launcher-context.js +23 -0
- package/src/lib/app-utils/transfer-launcher-context.js.map +1 -0
- package/src/lib/app-utils/transfer-resume-import.d.ts +39 -0
- package/src/lib/app-utils/transfer-resume-import.js +128 -0
- package/src/lib/app-utils/transfer-resume-import.js.map +1 -0
- package/src/lib/app-utils/upgrade-proposal.d.ts +66 -0
- package/src/lib/app-utils/upgrade-proposal.js +95 -0
- package/src/lib/app-utils/upgrade-proposal.js.map +1 -0
- package/src/lib/app-utils/utc-month.d.ts +33 -0
- package/src/lib/app-utils/utc-month.js +35 -0
- package/src/lib/app-utils/utc-month.js.map +1 -0
- package/src/lib/app-utils/visitor-record-ceiling.d.ts +4 -4
- package/src/lib/app-utils/visitor-record-ceiling.js +4 -4
- package/src/lib/app-utils/visitor-record-ceiling.js.map +1 -1
- package/src/lib/app-utils/wire-nodes.d.ts +39 -19
- package/src/lib/app-utils/wire-nodes.js +120 -34
- package/src/lib/app-utils/wire-nodes.js.map +1 -1
- package/src/lib/data-transfer/access.d.ts +74 -0
- package/src/lib/data-transfer/access.js +93 -0
- package/src/lib/data-transfer/access.js.map +1 -0
- package/src/lib/data-transfer/derive.d.ts +246 -0
- package/src/lib/data-transfer/derive.js +1007 -0
- package/src/lib/data-transfer/derive.js.map +1 -0
- package/src/lib/data-transfer/export-file.d.ts +46 -0
- package/src/lib/data-transfer/export-file.js +146 -0
- package/src/lib/data-transfer/export-file.js.map +1 -0
- package/src/lib/data-transfer/field-catalog.d.ts +134 -0
- package/src/lib/data-transfer/field-catalog.js +278 -0
- package/src/lib/data-transfer/field-catalog.js.map +1 -0
- package/src/lib/data-transfer/header-match.d.ts +129 -0
- package/src/lib/data-transfer/header-match.js +367 -0
- package/src/lib/data-transfer/header-match.js.map +1 -0
- package/src/lib/data-transfer/index.d.ts +34 -0
- package/src/lib/data-transfer/index.js +40 -0
- package/src/lib/data-transfer/index.js.map +1 -0
- package/src/lib/data-transfer/job.d.ts +190 -0
- package/src/lib/data-transfer/job.js +229 -0
- package/src/lib/data-transfer/job.js.map +1 -0
- package/src/lib/data-transfer/lookup.d.ts +45 -0
- package/src/lib/data-transfer/lookup.js +71 -0
- package/src/lib/data-transfer/lookup.js.map +1 -0
- package/src/lib/data-transfer/match.d.ts +99 -0
- package/src/lib/data-transfer/match.js +244 -0
- package/src/lib/data-transfer/match.js.map +1 -0
- package/src/lib/data-transfer/package-plan.d.ts +205 -0
- package/src/lib/data-transfer/package-plan.js +475 -0
- package/src/lib/data-transfer/package-plan.js.map +1 -0
- package/src/lib/data-transfer/package.d.ts +181 -0
- package/src/lib/data-transfer/package.js +426 -0
- package/src/lib/data-transfer/package.js.map +1 -0
- package/src/lib/data-transfer/picklist-map.d.ts +139 -0
- package/src/lib/data-transfer/picklist-map.js +271 -0
- package/src/lib/data-transfer/picklist-map.js.map +1 -0
- package/src/lib/data-transfer/plan.d.ts +176 -0
- package/src/lib/data-transfer/plan.js +451 -0
- package/src/lib/data-transfer/plan.js.map +1 -0
- package/src/lib/data-transfer/policy.d.ts +170 -0
- package/src/lib/data-transfer/policy.js +378 -0
- package/src/lib/data-transfer/policy.js.map +1 -0
- package/src/lib/data-transfer/resource.d.ts +211 -0
- package/src/lib/data-transfer/resource.js +241 -0
- package/src/lib/data-transfer/resource.js.map +1 -0
- package/src/lib/data-transfer/review.d.ts +70 -0
- package/src/lib/data-transfer/review.js +233 -0
- package/src/lib/data-transfer/review.js.map +1 -0
- package/src/lib/data-transfer/similarity.d.ts +40 -0
- package/src/lib/data-transfer/similarity.js +106 -0
- package/src/lib/data-transfer/similarity.js.map +1 -0
- package/src/lib/data-transfer/site-package.d.ts +365 -0
- package/src/lib/data-transfer/site-package.js +1077 -0
- package/src/lib/data-transfer/site-package.js.map +1 -0
- package/src/lib/data-transfer/source.d.ts +74 -0
- package/src/lib/data-transfer/source.js +293 -0
- package/src/lib/data-transfer/source.js.map +1 -0
- package/src/lib/data-transfer/transfer-api.d.ts +898 -0
- package/src/lib/data-transfer/transfer-api.js +107 -0
- package/src/lib/data-transfer/transfer-api.js.map +1 -0
- package/src/lib/foundation/definitions/org-billing.types.d.ts +31 -0
- package/src/lib/foundation/definitions/org-billing.types.js.map +1 -1
- package/src/lib/foundation/definitions/organization.types.d.ts +42 -1
- package/src/lib/foundation/definitions/organization.types.js.map +1 -1
- package/src/lib/foundation/definitions/platform.types.d.ts +6 -4
- package/src/lib/foundation/definitions/platform.types.js.map +1 -1
- package/src/lib/foundation/index.d.ts +1 -1
- package/src/lib/foundation/index.js.map +1 -1
- package/src/lib/plugin-manager/feature-plugins.d.ts +91 -2
- package/src/lib/plugin-manager/feature-plugins.js +48 -3
- package/src/lib/plugin-manager/feature-plugins.js.map +1 -1
- package/src/lib/plugin-manager/first-party-plugins.generated.d.ts +56 -0
- package/src/lib/plugin-manager/first-party-plugins.generated.js +1132 -27
- package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -1
- package/src/lib/plugin-manager/index.d.ts +0 -1
- package/src/lib/plugin-manager/index.js +0 -1
- package/src/lib/plugin-manager/index.js.map +1 -1
- package/src/lib/plugin-manager/interaction-recipes.d.ts +142 -0
- package/src/lib/plugin-manager/interaction-recipes.js +104 -0
- package/src/lib/plugin-manager/interaction-recipes.js.map +1 -0
- package/src/lib/plugin-manager/interaction-step-checks.d.ts +66 -0
- package/src/lib/plugin-manager/interaction-step-checks.js +86 -0
- package/src/lib/plugin-manager/interaction-step-checks.js.map +1 -0
- package/src/lib/plugin-manager/plugin-artifact-types.d.ts +235 -0
- package/src/lib/plugin-manager/plugin-artifact-types.js +99 -0
- package/src/lib/plugin-manager/plugin-artifact-types.js.map +1 -0
- package/src/lib/plugin-manager/plugin-contact-capture.d.ts +8 -0
- package/src/lib/plugin-manager/plugin-contact-capture.js.map +1 -1
- package/src/lib/plugin-manager/plugin-conversion-credit.d.ts +216 -0
- package/src/lib/plugin-manager/plugin-conversion-credit.js +91 -0
- package/src/lib/plugin-manager/plugin-conversion-credit.js.map +1 -0
- package/src/lib/plugin-manager/plugin-entity-pickers.d.ts +83 -0
- package/src/lib/plugin-manager/plugin-entity-pickers.js +87 -0
- package/src/lib/plugin-manager/plugin-entity-pickers.js.map +1 -0
- package/src/lib/plugin-manager/plugin-host-resources.d.ts +6 -0
- package/src/lib/plugin-manager/plugin-host-resources.js +6 -1
- package/src/lib/plugin-manager/plugin-host-resources.js.map +1 -1
- package/src/lib/plugin-manager/plugin-intake-gates.d.ts +75 -0
- package/src/lib/plugin-manager/plugin-intake-gates.js +49 -0
- package/src/lib/plugin-manager/plugin-intake-gates.js.map +1 -0
- package/src/lib/plugin-manager/plugin-jobs.d.ts +5 -5
- package/src/lib/plugin-manager/plugin-jobs.js +7 -7
- package/src/lib/plugin-manager/plugin-jobs.js.map +1 -1
- package/src/lib/plugin-manager/plugin-live-paths.d.ts +70 -0
- package/src/lib/plugin-manager/plugin-live-paths.js +66 -0
- package/src/lib/plugin-manager/plugin-live-paths.js.map +1 -0
- package/src/lib/plugin-manager/plugin-org-erasure.d.ts +3 -2
- package/src/lib/plugin-manager/plugin-org-erasure.js +30 -5
- package/src/lib/plugin-manager/plugin-org-erasure.js.map +1 -1
- package/src/lib/plugin-manager/plugin-person-erasure.d.ts +68 -9
- package/src/lib/plugin-manager/plugin-person-erasure.js +196 -51
- package/src/lib/plugin-manager/plugin-person-erasure.js.map +1 -1
- package/src/lib/plugin-manager/plugin-person-records.d.ts +275 -0
- package/src/lib/plugin-manager/plugin-person-records.js +107 -0
- package/src/lib/plugin-manager/plugin-person-records.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-counts.d.ts +76 -0
- package/src/lib/plugin-manager/plugin-record-counts.js +49 -0
- package/src/lib/plugin-manager/plugin-record-counts.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-email-state.d.ts +26 -0
- package/src/lib/plugin-manager/plugin-record-email-state.js +16 -0
- package/src/lib/plugin-manager/plugin-record-email-state.js.map +1 -1
- package/src/lib/plugin-manager/plugin-record-index.d.ts +10 -0
- package/src/lib/plugin-manager/plugin-record-index.js.map +1 -1
- package/src/lib/plugin-manager/plugin-record-lists.d.ts +86 -6
- package/src/lib/plugin-manager/plugin-record-lists.js +42 -5
- package/src/lib/plugin-manager/plugin-record-lists.js.map +1 -1
- package/src/lib/plugin-manager/plugin-record-origin.d.ts +79 -0
- package/src/lib/plugin-manager/plugin-record-origin.js +46 -0
- package/src/lib/plugin-manager/plugin-record-origin.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-pages.d.ts +37 -0
- package/src/lib/plugin-manager/plugin-record-pages.js +52 -0
- package/src/lib/plugin-manager/plugin-record-pages.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-timeline.d.ts +60 -0
- package/src/lib/plugin-manager/plugin-record-timeline.js +16 -0
- package/src/lib/plugin-manager/plugin-record-timeline.js.map +1 -1
- package/src/lib/plugin-manager/plugin-resource-drafts.d.ts +5 -5
- package/src/lib/plugin-manager/plugin-resource-drafts.js.map +1 -1
- package/src/lib/plugin-manager/plugin-revocations.d.ts +64 -0
- package/src/lib/plugin-manager/plugin-revocations.js +47 -0
- package/src/lib/plugin-manager/plugin-revocations.js.map +1 -0
- package/src/lib/plugin-manager/plugin-send-tallies.d.ts +69 -0
- package/src/lib/plugin-manager/plugin-send-tallies.js +45 -0
- package/src/lib/plugin-manager/plugin-send-tallies.js.map +1 -0
- package/src/lib/plugin-manager/plugin-server-steps.d.ts +170 -0
- package/src/lib/plugin-manager/plugin-server-steps.js +116 -0
- package/src/lib/plugin-manager/plugin-server-steps.js.map +1 -0
- package/src/lib/plugin-manager/plugin-site-bundle.d.ts +40 -0
- package/src/lib/plugin-manager/plugin-site-bundle.js +4 -0
- package/src/lib/plugin-manager/plugin-site-bundle.js.map +1 -1
- package/src/lib/plugin-manager/plugin-site-export.d.ts +57 -1
- package/src/lib/plugin-manager/plugin-site-export.js +23 -10
- package/src/lib/plugin-manager/plugin-site-export.js.map +1 -1
- package/src/lib/plugin-manager/plugin-sitemap-readers.d.ts +146 -0
- package/src/lib/plugin-manager/plugin-sitemap-readers.js +110 -0
- package/src/lib/plugin-manager/plugin-sitemap-readers.js.map +1 -0
- package/src/lib/plugin-manager/plugin-transfer-resources.d.ts +714 -0
- package/src/lib/plugin-manager/plugin-transfer-resources.js +443 -0
- package/src/lib/plugin-manager/plugin-transfer-resources.js.map +1 -0
- package/src/lib/plugin-manager/plugin-usage-axes.d.ts +54 -5
- package/src/lib/plugin-manager/plugin-usage-axes.js +11 -3
- package/src/lib/plugin-manager/plugin-usage-axes.js.map +1 -1
- package/src/lib/plugin-manager/plugin-user-erasure.js +9 -1
- package/src/lib/plugin-manager/plugin-user-erasure.js.map +1 -1
- package/src/lib/plugin-manager/plugin-visitor-doors.d.ts +104 -0
- package/src/lib/plugin-manager/plugin-visitor-doors.js +108 -0
- package/src/lib/plugin-manager/plugin-visitor-doors.js.map +1 -0
- package/src/lib/plugin-manager/realm-host-aglyn.generated.js +2 -0
- package/src/lib/plugin-manager/realm-host-aglyn.generated.js.map +1 -1
- package/src/lib/plugin-manager/repeat-rows.d.ts +5 -6
- package/src/lib/plugin-manager/repeat-rows.js.map +1 -1
- package/src/lib/app-utils/actions.d.ts +0 -310
- package/src/lib/app-utils/actions.js +0 -506
- package/src/lib/app-utils/actions.js.map +0 -1
- package/src/lib/app-utils/automation-placeholders.d.ts +0 -72
- package/src/lib/app-utils/automation-placeholders.js +0 -207
- package/src/lib/app-utils/automation-placeholders.js.map +0 -1
- package/src/lib/app-utils/dataset-models.d.ts +0 -339
- package/src/lib/app-utils/dataset-models.js +0 -722
- package/src/lib/app-utils/dataset-models.js.map +0 -1
- package/src/lib/app-utils/datasets.d.ts +0 -171
- package/src/lib/app-utils/datasets.js +0 -227
- package/src/lib/app-utils/datasets.js.map +0 -1
- package/src/lib/app-utils/form-abuse-ceiling.d.ts +0 -146
- package/src/lib/app-utils/form-abuse-ceiling.js +0 -158
- package/src/lib/app-utils/form-abuse-ceiling.js.map +0 -1
- package/src/lib/plugin-manager/order-fulfilment.d.ts +0 -142
- package/src/lib/plugin-manager/order-fulfilment.js +0 -104
- package/src/lib/plugin-manager/order-fulfilment.js.map +0 -1
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Child sitemaps a plugin's READER lists, for pages no query over one site
|
|
19
|
+
* collection can describe (AGL-3475).
|
|
20
|
+
*
|
|
21
|
+
* `plugin-sitemap-sections` covers a plugin whose pages are the documents of
|
|
22
|
+
* one collection under the site, addressed by one fixed path: a product per
|
|
23
|
+
* row of `products`, at `/products/{slug}`. A record page is neither. Its rows
|
|
24
|
+
* live in the ORGANIZATION's datasets, its address is a base the site chose,
|
|
25
|
+
* and a site can have several record templates — each its own set of pages at
|
|
26
|
+
* its own base. So the plugin answers in code, the way it answers a repeat's
|
|
27
|
+
* rows (`repeat-rows.ts`): it names a section family here, and its reader says
|
|
28
|
+
* which children the family has on a site and what each one lists.
|
|
29
|
+
*
|
|
30
|
+
* ## The family and its children
|
|
31
|
+
*
|
|
32
|
+
* A declaration names a section, `records`. Its reader answers with KEYS, and
|
|
33
|
+
* each key is one child sitemap, `/sitemaps/records-{key}/{page}.xml` — one per
|
|
34
|
+
* record template, say. That is how a content collection's sitemap has always
|
|
35
|
+
* been addressed (`content-{slug}`), and for the same reason: the index counts
|
|
36
|
+
* each child once and the child pages through its own URLs, so one template
|
|
37
|
+
* with ten thousand records never shifts the page numbers of another.
|
|
38
|
+
*
|
|
39
|
+
* ## Declared, then registered — and an absent reader is NOT "no pages"
|
|
40
|
+
*
|
|
41
|
+
* A search engine reads a section missing from the index as pages that no
|
|
42
|
+
* longer exist, so a reader a process forgot to register must not answer
|
|
43
|
+
* "nothing". The plugin declares the family in `plugins.config.json`
|
|
44
|
+
* (`sitemapReaders`), the generator compiles it, and the reader registers from
|
|
45
|
+
* the plugin's `serverDeclarations`, which every process runs at boot. A
|
|
46
|
+
* declared family with no reader runs the app's declarations step once more
|
|
47
|
+
* and then THROWS ({@link PluginSitemapReaderUnavailableError}); the sitemap
|
|
48
|
+
* route reads a throw as a degraded answer and keeps the cached one rather
|
|
49
|
+
* than shipping a smaller index.
|
|
50
|
+
*
|
|
51
|
+
* Reached by its own subpath, never the barrel: only the tenant's sitemap and
|
|
52
|
+
* `llms.txt` ask.
|
|
53
|
+
*/
|
|
54
|
+
/** The compiled declaration of one section family. */
|
|
55
|
+
export interface PluginSitemapReaderDeclaration {
|
|
56
|
+
/** The family's name: its children are `{section}-{key}`. */
|
|
57
|
+
section: string;
|
|
58
|
+
}
|
|
59
|
+
/** A declaration with the plugin that made it. */
|
|
60
|
+
export type ResolvedPluginSitemapReaderDeclaration = PluginSitemapReaderDeclaration & {
|
|
61
|
+
pluginId: string;
|
|
62
|
+
};
|
|
63
|
+
/** One child a reader lists on a site. */
|
|
64
|
+
export interface PluginSitemapChild {
|
|
65
|
+
/** The child's key: lowercase letters and digits joined by hyphens. */
|
|
66
|
+
key: string;
|
|
67
|
+
/**
|
|
68
|
+
* How many URLs the child lists — at most, since a row with no address is
|
|
69
|
+
* left out of the page that would have held it. Sizes the index.
|
|
70
|
+
*/
|
|
71
|
+
urls: number;
|
|
72
|
+
}
|
|
73
|
+
/** One URL a child lists. */
|
|
74
|
+
export interface PluginSitemapUrl {
|
|
75
|
+
/** The page's site path: `/services/roofing`. */
|
|
76
|
+
path: string;
|
|
77
|
+
/** When the page last changed: anything `sitemapLastmod` reads. */
|
|
78
|
+
lastmod?: unknown;
|
|
79
|
+
}
|
|
80
|
+
/** A group of pages worth naming in `/llms.txt`. */
|
|
81
|
+
export interface PluginSitemapListing {
|
|
82
|
+
/** What the pages are: "Services". */
|
|
83
|
+
name: string;
|
|
84
|
+
/** The path the pages share, without slashes at either end: `services`. */
|
|
85
|
+
base: string;
|
|
86
|
+
/** How many pages the group holds. */
|
|
87
|
+
count: number;
|
|
88
|
+
}
|
|
89
|
+
/** What a reader answers, for one site at a time. */
|
|
90
|
+
export interface PluginSitemapReader {
|
|
91
|
+
/** The children this site has, in the order the index lists them. */
|
|
92
|
+
children(request: {
|
|
93
|
+
hostId: string;
|
|
94
|
+
}): Promise<PluginSitemapChild[]>;
|
|
95
|
+
/** One page of one child's URLs. */
|
|
96
|
+
urls(request: {
|
|
97
|
+
hostId: string;
|
|
98
|
+
key: string;
|
|
99
|
+
page: number;
|
|
100
|
+
perPage: number;
|
|
101
|
+
}): Promise<PluginSitemapUrl[]>;
|
|
102
|
+
/** The groups `/llms.txt` names. Optional: a family need not have any. */
|
|
103
|
+
listings?(request: {
|
|
104
|
+
hostId: string;
|
|
105
|
+
}): Promise<PluginSitemapListing[]>;
|
|
106
|
+
}
|
|
107
|
+
/** Every declared family, in config order — the order the index lists them. */
|
|
108
|
+
export declare function listPluginSitemapReaders(): readonly ResolvedPluginSitemapReaderDeclaration[];
|
|
109
|
+
/** A child's section name: `records-services`. */
|
|
110
|
+
export declare function pluginSitemapChildSection(section: string, key: string): string;
|
|
111
|
+
/** Whether a reader's key can name a child section. */
|
|
112
|
+
export declare function isPluginSitemapChildKey(key: unknown): key is string;
|
|
113
|
+
/**
|
|
114
|
+
* The declared family and child key a section name addresses, or `null`. The
|
|
115
|
+
* longest family wins, so `records-x` never reads as a child of a family
|
|
116
|
+
* named `rec`.
|
|
117
|
+
*/
|
|
118
|
+
export declare function parsePluginSitemapChildSection(section: string, declared?: readonly ResolvedPluginSitemapReaderDeclaration[]): {
|
|
119
|
+
declaration: ResolvedPluginSitemapReaderDeclaration;
|
|
120
|
+
key: string;
|
|
121
|
+
} | null;
|
|
122
|
+
/**
|
|
123
|
+
* Registers the reader for a declared family. The owner is the plugin whose
|
|
124
|
+
* register fn is running, or the `pluginId` passed for a boot declaration;
|
|
125
|
+
* with neither, or with a plugin other than the one the declaration names,
|
|
126
|
+
* the registration throws. The same plugin registering again replaces its
|
|
127
|
+
* reader. Returns the unregister.
|
|
128
|
+
*/
|
|
129
|
+
export declare function registerPluginSitemapReader(section: string, reader: PluginSitemapReader, options?: {
|
|
130
|
+
pluginId?: string;
|
|
131
|
+
}): () => void;
|
|
132
|
+
/** Only for specs: forgets every registered reader. */
|
|
133
|
+
export declare function resetPluginSitemapReadersForTests(): void;
|
|
134
|
+
/**
|
|
135
|
+
* A declared family's reader was not registered, even after the app's
|
|
136
|
+
* declarations step ran again. Thrown, never answered as "no pages".
|
|
137
|
+
*/
|
|
138
|
+
export declare class PluginSitemapReaderUnavailableError extends Error {
|
|
139
|
+
readonly declaration: ResolvedPluginSitemapReaderDeclaration;
|
|
140
|
+
constructor(declaration: ResolvedPluginSitemapReaderDeclaration);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* The reader a declared family answers through — after one repair when it is
|
|
144
|
+
* missing, and a throw when it is still missing.
|
|
145
|
+
*/
|
|
146
|
+
export declare function pluginSitemapReader(declaration: ResolvedPluginSitemapReaderDeclaration): Promise<PluginSitemapReader>;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
var _globalScope_READERS_KEY;
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2026 Aglyn LLC
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/ import { getRegisteringPluginId } from "../app-utils/registering-plugin.js";
|
|
18
|
+
import { PLUGIN_SITEMAP_READERS_DECLARED } from "./first-party-plugins.generated.js";
|
|
19
|
+
import { runPluginDeclarationsRepair } from "./plugin-declarations-repair.js";
|
|
20
|
+
/** Every declared family, in config order — the order the index lists them. */ export function listPluginSitemapReaders() {
|
|
21
|
+
return PLUGIN_SITEMAP_READERS_DECLARED;
|
|
22
|
+
}
|
|
23
|
+
/** A child's section name: `records-services`. */ export function pluginSitemapChildSection(section, key) {
|
|
24
|
+
return `${section}-${key}`;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A child key a section name can carry: lowercase letters and digits, joined
|
|
28
|
+
* by runs of hyphens — a run of two is how a reader spells a path separator
|
|
29
|
+
* (`services--residential`).
|
|
30
|
+
*/ const CHILD_KEY = /^[a-z0-9]+(?:-+[a-z0-9]+)*$/;
|
|
31
|
+
/** Whether a reader's key can name a child section. */ export function isPluginSitemapChildKey(key) {
|
|
32
|
+
return typeof key === 'string' && key.length <= 120 && CHILD_KEY.test(key);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The declared family and child key a section name addresses, or `null`. The
|
|
36
|
+
* longest family wins, so `records-x` never reads as a child of a family
|
|
37
|
+
* named `rec`.
|
|
38
|
+
*/ export function parsePluginSitemapChildSection(section, declared = PLUGIN_SITEMAP_READERS_DECLARED) {
|
|
39
|
+
const matches = declared.filter((one)=>section.startsWith(`${one.section}-`)).sort((a, b)=>b.section.length - a.section.length);
|
|
40
|
+
const declaration = matches[0];
|
|
41
|
+
if (!declaration) return null;
|
|
42
|
+
const key = section.slice(declaration.section.length + 1);
|
|
43
|
+
return isPluginSitemapChildKey(key) ? {
|
|
44
|
+
declaration,
|
|
45
|
+
key
|
|
46
|
+
} : null;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* One table per process, on `globalThis` (AGL-3412): readers register from
|
|
50
|
+
* `instrumentation.ts`, which Next compiles apart from the routes that read.
|
|
51
|
+
*/ const READERS_KEY = Symbol.for('@aglyn/aglyn:plugin-sitemap-readers');
|
|
52
|
+
const globalScope = globalThis;
|
|
53
|
+
const readers = (_globalScope_READERS_KEY = globalScope[READERS_KEY]) != null ? _globalScope_READERS_KEY : globalScope[READERS_KEY] = new Map();
|
|
54
|
+
/**
|
|
55
|
+
* Registers the reader for a declared family. The owner is the plugin whose
|
|
56
|
+
* register fn is running, or the `pluginId` passed for a boot declaration;
|
|
57
|
+
* with neither, or with a plugin other than the one the declaration names,
|
|
58
|
+
* the registration throws. The same plugin registering again replaces its
|
|
59
|
+
* reader. Returns the unregister.
|
|
60
|
+
*/ export function registerPluginSitemapReader(section, reader, options) {
|
|
61
|
+
var _ref, _getRegisteringPluginId;
|
|
62
|
+
const name = section.trim();
|
|
63
|
+
const pluginId = ((_ref = (_getRegisteringPluginId = getRegisteringPluginId()) != null ? _getRegisteringPluginId : options == null ? void 0 : options.pluginId) != null ? _ref : '').trim();
|
|
64
|
+
if (!name) throw new Error('a sitemap reader needs a section');
|
|
65
|
+
if (!pluginId) {
|
|
66
|
+
throw new Error(`sitemap reader "${name}" registered with no owner: pass { pluginId } ` + 'when registering outside a plugin register fn');
|
|
67
|
+
}
|
|
68
|
+
const declared = PLUGIN_SITEMAP_READERS_DECLARED.find((one)=>one.section === name);
|
|
69
|
+
if (declared && declared.pluginId !== pluginId) {
|
|
70
|
+
throw new Error(`sitemap section "${name}" is declared by "${declared.pluginId}"; ` + `refused a reader from "${pluginId}"`);
|
|
71
|
+
}
|
|
72
|
+
const entry = {
|
|
73
|
+
pluginId,
|
|
74
|
+
reader
|
|
75
|
+
};
|
|
76
|
+
readers.set(name, entry);
|
|
77
|
+
return ()=>{
|
|
78
|
+
if (readers.get(name) === entry) readers.delete(name);
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/** Only for specs: forgets every registered reader. */ export function resetPluginSitemapReadersForTests() {
|
|
82
|
+
readers.clear();
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* A declared family's reader was not registered, even after the app's
|
|
86
|
+
* declarations step ran again. Thrown, never answered as "no pages".
|
|
87
|
+
*/ export class PluginSitemapReaderUnavailableError extends Error {
|
|
88
|
+
constructor(declaration){
|
|
89
|
+
super(`sitemap section "${declaration.section}" is declared by ` + `"${declaration.pluginId}" but no reader is registered in this process ` + '— its server declarations did not run.'), this.declaration = declaration;
|
|
90
|
+
this.name = 'PluginSitemapReaderUnavailableError';
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The reader a declared family answers through — after one repair when it is
|
|
95
|
+
* missing, and a throw when it is still missing.
|
|
96
|
+
*/ export async function pluginSitemapReader(declaration) {
|
|
97
|
+
let registered = readers.get(declaration.section);
|
|
98
|
+
if (!registered) {
|
|
99
|
+
try {
|
|
100
|
+
await runPluginDeclarationsRepair();
|
|
101
|
+
} catch (error) {
|
|
102
|
+
console.error('[sitemap-readers] the declarations repair failed', error);
|
|
103
|
+
}
|
|
104
|
+
registered = readers.get(declaration.section);
|
|
105
|
+
}
|
|
106
|
+
if (!registered) throw new PluginSitemapReaderUnavailableError(declaration);
|
|
107
|
+
return registered.reader;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
//# sourceMappingURL=plugin-sitemap-readers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/plugin-manager/plugin-sitemap-readers.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getRegisteringPluginId } from '../app-utils/registering-plugin'\nimport { PLUGIN_SITEMAP_READERS_DECLARED } from './first-party-plugins.generated'\nimport { runPluginDeclarationsRepair } from './plugin-declarations-repair'\n\n/**\n * Child sitemaps a plugin's READER lists, for pages no query over one site\n * collection can describe (AGL-3475).\n *\n * `plugin-sitemap-sections` covers a plugin whose pages are the documents of\n * one collection under the site, addressed by one fixed path: a product per\n * row of `products`, at `/products/{slug}`. A record page is neither. Its rows\n * live in the ORGANIZATION's datasets, its address is a base the site chose,\n * and a site can have several record templates — each its own set of pages at\n * its own base. So the plugin answers in code, the way it answers a repeat's\n * rows (`repeat-rows.ts`): it names a section family here, and its reader says\n * which children the family has on a site and what each one lists.\n *\n * ## The family and its children\n *\n * A declaration names a section, `records`. Its reader answers with KEYS, and\n * each key is one child sitemap, `/sitemaps/records-{key}/{page}.xml` — one per\n * record template, say. That is how a content collection's sitemap has always\n * been addressed (`content-{slug}`), and for the same reason: the index counts\n * each child once and the child pages through its own URLs, so one template\n * with ten thousand records never shifts the page numbers of another.\n *\n * ## Declared, then registered — and an absent reader is NOT \"no pages\"\n *\n * A search engine reads a section missing from the index as pages that no\n * longer exist, so a reader a process forgot to register must not answer\n * \"nothing\". The plugin declares the family in `plugins.config.json`\n * (`sitemapReaders`), the generator compiles it, and the reader registers from\n * the plugin's `serverDeclarations`, which every process runs at boot. A\n * declared family with no reader runs the app's declarations step once more\n * and then THROWS ({@link PluginSitemapReaderUnavailableError}); the sitemap\n * route reads a throw as a degraded answer and keeps the cached one rather\n * than shipping a smaller index.\n *\n * Reached by its own subpath, never the barrel: only the tenant's sitemap and\n * `llms.txt` ask.\n */\n\n/** The compiled declaration of one section family. */\nexport interface PluginSitemapReaderDeclaration {\n /** The family's name: its children are `{section}-{key}`. */\n section: string\n}\n\n/** A declaration with the plugin that made it. */\nexport type ResolvedPluginSitemapReaderDeclaration = PluginSitemapReaderDeclaration & {\n pluginId: string\n}\n\n/** One child a reader lists on a site. */\nexport interface PluginSitemapChild {\n /** The child's key: lowercase letters and digits joined by hyphens. */\n key: string\n /**\n * How many URLs the child lists — at most, since a row with no address is\n * left out of the page that would have held it. Sizes the index.\n */\n urls: number\n}\n\n/** One URL a child lists. */\nexport interface PluginSitemapUrl {\n /** The page's site path: `/services/roofing`. */\n path: string\n /** When the page last changed: anything `sitemapLastmod` reads. */\n lastmod?: unknown\n}\n\n/** A group of pages worth naming in `/llms.txt`. */\nexport interface PluginSitemapListing {\n /** What the pages are: \"Services\". */\n name: string\n /** The path the pages share, without slashes at either end: `services`. */\n base: string\n /** How many pages the group holds. */\n count: number\n}\n\n/** What a reader answers, for one site at a time. */\nexport interface PluginSitemapReader {\n /** The children this site has, in the order the index lists them. */\n children(request: { hostId: string }): Promise<PluginSitemapChild[]>\n /** One page of one child's URLs. */\n urls(request: {\n hostId: string\n key: string\n page: number\n perPage: number\n }): Promise<PluginSitemapUrl[]>\n /** The groups `/llms.txt` names. Optional: a family need not have any. */\n listings?(request: { hostId: string }): Promise<PluginSitemapListing[]>\n}\n\n/** Every declared family, in config order — the order the index lists them. */\nexport function listPluginSitemapReaders(): readonly ResolvedPluginSitemapReaderDeclaration[] {\n return PLUGIN_SITEMAP_READERS_DECLARED\n}\n\n/** A child's section name: `records-services`. */\nexport function pluginSitemapChildSection(section: string, key: string): string {\n return `${section}-${key}`\n}\n\n/**\n * A child key a section name can carry: lowercase letters and digits, joined\n * by runs of hyphens — a run of two is how a reader spells a path separator\n * (`services--residential`).\n */\nconst CHILD_KEY = /^[a-z0-9]+(?:-+[a-z0-9]+)*$/\n\n/** Whether a reader's key can name a child section. */\nexport function isPluginSitemapChildKey(key: unknown): key is string {\n return typeof key === 'string' && key.length <= 120 && CHILD_KEY.test(key)\n}\n\n/**\n * The declared family and child key a section name addresses, or `null`. The\n * longest family wins, so `records-x` never reads as a child of a family\n * named `rec`.\n */\nexport function parsePluginSitemapChildSection(\n section: string,\n declared: readonly ResolvedPluginSitemapReaderDeclaration[] = PLUGIN_SITEMAP_READERS_DECLARED,\n): { declaration: ResolvedPluginSitemapReaderDeclaration; key: string } | null {\n const matches = declared\n .filter((one) => section.startsWith(`${one.section}-`))\n .sort((a, b) => b.section.length - a.section.length)\n const declaration = matches[0]\n if (!declaration) return null\n const key = section.slice(declaration.section.length + 1)\n return isPluginSitemapChildKey(key) ? { declaration, key } : null\n}\n\ninterface RegisteredReader {\n pluginId: string\n reader: PluginSitemapReader\n}\n\n/**\n * One table per process, on `globalThis` (AGL-3412): readers register from\n * `instrumentation.ts`, which Next compiles apart from the routes that read.\n */\nconst READERS_KEY = Symbol.for('@aglyn/aglyn:plugin-sitemap-readers')\n\nconst globalScope = globalThis as typeof globalThis & {\n [READERS_KEY]?: Map<string, RegisteredReader>\n}\n\nconst readers: Map<string, RegisteredReader> =\n globalScope[READERS_KEY] ?? (globalScope[READERS_KEY] = new Map())\n\n/**\n * Registers the reader for a declared family. The owner is the plugin whose\n * register fn is running, or the `pluginId` passed for a boot declaration;\n * with neither, or with a plugin other than the one the declaration names,\n * the registration throws. The same plugin registering again replaces its\n * reader. Returns the unregister.\n */\nexport function registerPluginSitemapReader(\n section: string,\n reader: PluginSitemapReader,\n options?: { pluginId?: string },\n): () => void {\n const name = section.trim()\n const pluginId = (getRegisteringPluginId() ?? options?.pluginId ?? '').trim()\n if (!name) throw new Error('a sitemap reader needs a section')\n if (!pluginId) {\n throw new Error(\n `sitemap reader \"${name}\" registered with no owner: pass { pluginId } ` +\n 'when registering outside a plugin register fn',\n )\n }\n const declared = PLUGIN_SITEMAP_READERS_DECLARED.find((one) => one.section === name)\n if (declared && declared.pluginId !== pluginId) {\n throw new Error(\n `sitemap section \"${name}\" is declared by \"${declared.pluginId}\"; ` +\n `refused a reader from \"${pluginId}\"`,\n )\n }\n const entry: RegisteredReader = { pluginId, reader }\n readers.set(name, entry)\n return () => {\n if (readers.get(name) === entry) readers.delete(name)\n }\n}\n\n/** Only for specs: forgets every registered reader. */\nexport function resetPluginSitemapReadersForTests(): void {\n readers.clear()\n}\n\n/**\n * A declared family's reader was not registered, even after the app's\n * declarations step ran again. Thrown, never answered as \"no pages\".\n */\nexport class PluginSitemapReaderUnavailableError extends Error {\n constructor(readonly declaration: ResolvedPluginSitemapReaderDeclaration) {\n super(\n `sitemap section \"${declaration.section}\" is declared by ` +\n `\"${declaration.pluginId}\" but no reader is registered in this process ` +\n '— its server declarations did not run.',\n )\n this.name = 'PluginSitemapReaderUnavailableError'\n }\n}\n\n/**\n * The reader a declared family answers through — after one repair when it is\n * missing, and a throw when it is still missing.\n */\nexport async function pluginSitemapReader(\n declaration: ResolvedPluginSitemapReaderDeclaration,\n): Promise<PluginSitemapReader> {\n let registered = readers.get(declaration.section)\n if (!registered) {\n try {\n await runPluginDeclarationsRepair()\n } catch (error) {\n console.error('[sitemap-readers] the declarations repair failed', error)\n }\n registered = readers.get(declaration.section)\n }\n if (!registered) throw new PluginSitemapReaderUnavailableError(declaration)\n return registered.reader\n}\n"],"names":["globalScope","getRegisteringPluginId","PLUGIN_SITEMAP_READERS_DECLARED","runPluginDeclarationsRepair","listPluginSitemapReaders","pluginSitemapChildSection","section","key","CHILD_KEY","isPluginSitemapChildKey","length","test","parsePluginSitemapChildSection","declared","matches","filter","one","startsWith","sort","a","b","declaration","slice","READERS_KEY","Symbol","for","globalThis","readers","Map","registerPluginSitemapReader","reader","options","name","trim","pluginId","Error","find","entry","set","get","delete","resetPluginSitemapReadersForTests","clear","PluginSitemapReaderUnavailableError","pluginSitemapReader","registered","error","console"],"mappings":"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"}
|