@aotter/mantle-runtime 0.0.11-alpha.73 → 0.1.0-alpha.10
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/README.md +37 -4
- package/dist/MantleRuntime.d.ts +96 -0
- package/dist/MantleRuntime.d.ts.map +1 -0
- package/dist/MantleRuntime.js +197 -0
- package/dist/MantleRuntime.js.map +1 -0
- package/dist/domain/model/EntryRow.d.ts +2 -2
- package/dist/domain/model/HandlerContext.d.ts +3 -4
- package/dist/domain/model/HandlerContext.d.ts.map +1 -1
- package/dist/domain/model/PreparedMantleRevision.d.ts +14 -0
- package/dist/domain/model/PreparedMantleRevision.d.ts.map +1 -0
- package/dist/domain/model/PreparedMantleRevision.js +8 -0
- package/dist/domain/model/PreparedMantleRevision.js.map +1 -0
- package/dist/domain/model/index.d.ts +1 -2
- package/dist/domain/model/index.d.ts.map +1 -1
- package/dist/domain/model/index.js +0 -1
- package/dist/domain/model/index.js.map +1 -1
- package/dist/domain/port/Clock.d.ts +1 -2
- package/dist/domain/port/Clock.d.ts.map +1 -1
- package/dist/domain/port/Clock.js.map +1 -1
- package/dist/domain/port/DatabaseDriver.d.ts +13 -21
- package/dist/domain/port/DatabaseDriver.d.ts.map +1 -1
- package/dist/domain/port/EntryReader.d.ts +1 -1
- package/dist/domain/port/EntryReader.d.ts.map +1 -1
- package/dist/domain/port/EntryRepository.d.ts +19 -4
- package/dist/domain/port/EntryRepository.d.ts.map +1 -1
- package/dist/domain/port/HandlerRegistry.d.ts +1 -1
- package/dist/domain/port/IdGenerator.d.ts +3 -4
- package/dist/domain/port/IdGenerator.d.ts.map +1 -1
- package/dist/domain/port/IdGenerator.js.map +1 -1
- package/dist/domain/port/MantleStorageAdapter.d.ts +23 -0
- package/dist/domain/port/MantleStorageAdapter.d.ts.map +1 -0
- package/dist/domain/port/MantleStorageAdapter.js +2 -0
- package/dist/domain/port/MantleStorageAdapter.js.map +1 -0
- package/dist/domain/port/SiteConfigRepository.d.ts +12 -10
- package/dist/domain/port/SiteConfigRepository.d.ts.map +1 -1
- package/dist/domain/port/ViewQueryExecutor.d.ts +29 -0
- package/dist/domain/port/ViewQueryExecutor.d.ts.map +1 -0
- package/dist/domain/port/ViewQueryExecutor.js +2 -0
- package/dist/domain/port/ViewQueryExecutor.js.map +1 -0
- package/dist/domain/port/index.d.ts +5 -4
- package/dist/domain/port/index.d.ts.map +1 -1
- package/dist/domain/port/index.js.map +1 -1
- package/dist/domain/service/LocaleNegotiator.d.ts.map +1 -1
- package/dist/domain/service/LocaleNegotiator.js +2 -2
- package/dist/domain/service/LocaleNegotiator.js.map +1 -1
- package/dist/domain/service/RuntimePlanCompiler.d.ts +89 -0
- package/dist/domain/service/RuntimePlanCompiler.d.ts.map +1 -0
- package/dist/domain/service/RuntimePlanCompiler.js +230 -0
- package/dist/domain/service/RuntimePlanCompiler.js.map +1 -0
- package/dist/domain/service/TriggerIndex.d.ts +5 -3
- package/dist/domain/service/TriggerIndex.d.ts.map +1 -1
- package/dist/domain/service/TriggerIndex.js +16 -4
- package/dist/domain/service/TriggerIndex.js.map +1 -1
- package/dist/domain/service/ViewParamCoercer.d.ts +1 -1
- package/dist/domain/service/ViewParamCoercer.js +1 -1
- package/dist/domain/service/index.d.ts +1 -10
- package/dist/domain/service/index.d.ts.map +1 -1
- package/dist/domain/service/index.js +1 -10
- package/dist/domain/service/index.js.map +1 -1
- package/dist/domain/service/io/EntryDeleteGuard.js +1 -1
- package/dist/domain/service/io/EntryDeleteGuard.js.map +1 -1
- package/dist/domain/service/io/EntryWriteGuard.d.ts +4 -3
- package/dist/domain/service/io/EntryWriteGuard.d.ts.map +1 -1
- package/dist/domain/service/io/EntryWriteGuard.js +3 -6
- package/dist/domain/service/io/EntryWriteGuard.js.map +1 -1
- package/dist/domain/service/io/JoinedEntryReader.d.ts +2 -3
- package/dist/domain/service/io/JoinedEntryReader.d.ts.map +1 -1
- package/dist/domain/service/io/JoinedEntryReader.js +2 -3
- package/dist/domain/service/io/JoinedEntryReader.js.map +1 -1
- package/dist/index.d.ts +17 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -12
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/boot/SqliteMigrationRunner.d.ts +10 -0
- package/dist/infrastructure/boot/SqliteMigrationRunner.d.ts.map +1 -0
- package/dist/infrastructure/boot/SqliteMigrationRunner.js +41 -0
- package/dist/infrastructure/boot/SqliteMigrationRunner.js.map +1 -0
- package/dist/infrastructure/boot/bootState.d.ts +9 -0
- package/dist/infrastructure/boot/bootState.d.ts.map +1 -0
- package/dist/infrastructure/boot/bootState.js +32 -0
- package/dist/infrastructure/boot/bootState.js.map +1 -0
- package/dist/infrastructure/boot/canonicalMigrations.d.ts +2 -0
- package/dist/infrastructure/boot/canonicalMigrations.d.ts.map +1 -1
- package/dist/infrastructure/boot/canonicalMigrations.js +181 -88
- package/dist/infrastructure/boot/canonicalMigrations.js.map +1 -1
- package/dist/infrastructure/boot/index.d.ts +3 -1
- package/dist/infrastructure/boot/index.d.ts.map +1 -1
- package/dist/infrastructure/boot/index.js +3 -1
- package/dist/infrastructure/boot/index.js.map +1 -1
- package/dist/infrastructure/http/createMantleRequestHandler.d.ts +12 -0
- package/dist/infrastructure/http/createMantleRequestHandler.d.ts.map +1 -0
- package/dist/infrastructure/http/createMantleRequestHandler.js +127 -0
- package/dist/infrastructure/http/createMantleRequestHandler.js.map +1 -0
- package/dist/infrastructure/index.d.ts +0 -1
- package/dist/infrastructure/index.d.ts.map +1 -1
- package/dist/infrastructure/index.js +0 -1
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/infrastructure/mcp/McpJsonRpcDispatcher.d.ts +18 -23
- package/dist/infrastructure/mcp/McpJsonRpcDispatcher.d.ts.map +1 -1
- package/dist/infrastructure/mcp/McpJsonRpcDispatcher.js +64 -39
- package/dist/infrastructure/mcp/McpJsonRpcDispatcher.js.map +1 -1
- package/dist/infrastructure/mcp/McpToolCatalog.d.ts.map +1 -1
- package/dist/infrastructure/mcp/McpToolCatalog.js +84 -19
- package/dist/infrastructure/mcp/McpToolCatalog.js.map +1 -1
- package/dist/infrastructure/mcp/index.d.ts +1 -1
- package/dist/infrastructure/mcp/index.d.ts.map +1 -1
- package/dist/infrastructure/mcp/index.js.map +1 -1
- package/dist/infrastructure/persistence/DatabaseEntryRepository.d.ts +4 -8
- package/dist/infrastructure/persistence/DatabaseEntryRepository.d.ts.map +1 -1
- package/dist/infrastructure/persistence/DatabaseEntryRepository.js +80 -35
- package/dist/infrastructure/persistence/DatabaseEntryRepository.js.map +1 -1
- package/dist/infrastructure/persistence/DatabaseSiteConfigRepository.d.ts.map +1 -1
- package/dist/infrastructure/persistence/DatabaseSiteConfigRepository.js +39 -31
- package/dist/infrastructure/persistence/DatabaseSiteConfigRepository.js.map +1 -1
- package/dist/infrastructure/persistence/Pagination.d.ts +5 -0
- package/dist/infrastructure/persistence/Pagination.d.ts.map +1 -1
- package/dist/infrastructure/persistence/Pagination.js +49 -0
- package/dist/infrastructure/persistence/Pagination.js.map +1 -1
- package/dist/infrastructure/storage/SqliteMantleStorageAdapter.d.ts +22 -0
- package/dist/infrastructure/storage/SqliteMantleStorageAdapter.d.ts.map +1 -0
- package/dist/infrastructure/storage/SqliteMantleStorageAdapter.js +86 -0
- package/dist/infrastructure/storage/SqliteMantleStorageAdapter.js.map +1 -0
- package/dist/{domain/service/ViewSqlCompiler.d.ts → infrastructure/storage/SqliteViewCompiler.d.ts} +12 -10
- package/dist/infrastructure/storage/SqliteViewCompiler.d.ts.map +1 -0
- package/dist/infrastructure/storage/SqliteViewCompiler.js +307 -0
- package/dist/infrastructure/storage/SqliteViewCompiler.js.map +1 -0
- package/dist/infrastructure/testing/IndexCoverageHarness.d.ts +2 -2
- package/dist/infrastructure/testing/IndexCoverageHarness.d.ts.map +1 -1
- package/dist/infrastructure/testing/IndexCoverageHarness.js +10 -9
- package/dist/infrastructure/testing/IndexCoverageHarness.js.map +1 -1
- package/dist/usecase/boot/ValidateBootUseCase.d.ts +16 -35
- package/dist/usecase/boot/ValidateBootUseCase.d.ts.map +1 -1
- package/dist/usecase/boot/ValidateBootUseCase.js +79 -254
- package/dist/usecase/boot/ValidateBootUseCase.js.map +1 -1
- package/dist/usecase/boot/index.d.ts +1 -1
- package/dist/usecase/boot/index.d.ts.map +1 -1
- package/dist/usecase/boot/index.js +1 -1
- package/dist/usecase/boot/index.js.map +1 -1
- package/dist/usecase/content/ArchiveUseCase.d.ts +2 -4
- package/dist/usecase/content/ArchiveUseCase.d.ts.map +1 -1
- package/dist/usecase/content/ArchiveUseCase.js +2 -6
- package/dist/usecase/content/ArchiveUseCase.js.map +1 -1
- package/dist/usecase/content/CreateDraftUseCase.d.ts +5 -4
- package/dist/usecase/content/CreateDraftUseCase.d.ts.map +1 -1
- package/dist/usecase/content/CreateDraftUseCase.js +10 -7
- package/dist/usecase/content/CreateDraftUseCase.js.map +1 -1
- package/dist/usecase/content/DeleteEntryUseCase.d.ts +3 -5
- package/dist/usecase/content/DeleteEntryUseCase.d.ts.map +1 -1
- package/dist/usecase/content/DeleteEntryUseCase.js +3 -5
- package/dist/usecase/content/DeleteEntryUseCase.js.map +1 -1
- package/dist/usecase/content/ListEntriesUseCase.d.ts.map +1 -1
- package/dist/usecase/content/ListEntriesUseCase.js +30 -3
- package/dist/usecase/content/ListEntriesUseCase.js.map +1 -1
- package/dist/usecase/content/RequestPublishUseCase.d.ts +6 -15
- package/dist/usecase/content/RequestPublishUseCase.d.ts.map +1 -1
- package/dist/usecase/content/RequestPublishUseCase.js +7 -26
- package/dist/usecase/content/RequestPublishUseCase.js.map +1 -1
- package/dist/usecase/content/UnpublishUseCase.d.ts +1 -3
- package/dist/usecase/content/UnpublishUseCase.d.ts.map +1 -1
- package/dist/usecase/content/UnpublishUseCase.js +1 -5
- package/dist/usecase/content/UnpublishUseCase.js.map +1 -1
- package/dist/usecase/content/UpdateDraftUseCase.d.ts +4 -3
- package/dist/usecase/content/UpdateDraftUseCase.d.ts.map +1 -1
- package/dist/usecase/content/UpdateDraftUseCase.js +9 -6
- package/dist/usecase/content/UpdateDraftUseCase.js.map +1 -1
- package/dist/usecase/content/diagnostics.d.ts +1 -0
- package/dist/usecase/content/diagnostics.d.ts.map +1 -1
- package/dist/usecase/content/diagnostics.js +10 -0
- package/dist/usecase/content/diagnostics.js.map +1 -1
- package/dist/usecase/dto/content/index.d.ts +10 -1
- package/dist/usecase/dto/content/index.d.ts.map +1 -1
- package/dist/usecase/dto/index.d.ts +0 -1
- package/dist/usecase/dto/index.d.ts.map +1 -1
- package/dist/usecase/dto/index.js +0 -1
- package/dist/usecase/dto/index.js.map +1 -1
- package/dist/usecase/dto/view/ExecuteViewRequest.d.ts +2 -2
- package/dist/usecase/dto/view/ExecuteViewRequest.d.ts.map +1 -1
- package/dist/usecase/index.d.ts +0 -1
- package/dist/usecase/index.d.ts.map +1 -1
- package/dist/usecase/index.js +0 -1
- package/dist/usecase/index.js.map +1 -1
- package/dist/usecase/media/diagnostics.js +1 -1
- package/dist/usecase/procedure/InvokeBuiltinUseCase.d.ts +5 -4
- package/dist/usecase/procedure/InvokeBuiltinUseCase.d.ts.map +1 -1
- package/dist/usecase/procedure/InvokeBuiltinUseCase.js +8 -4
- package/dist/usecase/procedure/InvokeBuiltinUseCase.js.map +1 -1
- package/dist/usecase/site/UpdateSiteSettingsUseCase.d.ts +4 -5
- package/dist/usecase/site/UpdateSiteSettingsUseCase.d.ts.map +1 -1
- package/dist/usecase/site/UpdateSiteSettingsUseCase.js +36 -6
- package/dist/usecase/site/UpdateSiteSettingsUseCase.js.map +1 -1
- package/dist/usecase/view/ExecuteViewUseCase.d.ts +8 -16
- package/dist/usecase/view/ExecuteViewUseCase.d.ts.map +1 -1
- package/dist/usecase/view/ExecuteViewUseCase.js +24 -94
- package/dist/usecase/view/ExecuteViewUseCase.js.map +1 -1
- package/dist/usecase/view/index.d.ts +2 -1
- package/dist/usecase/view/index.d.ts.map +1 -1
- package/dist/usecase/view/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/domain/model/SeoMeta.d.ts +0 -47
- package/dist/domain/model/SeoMeta.d.ts.map +0 -1
- package/dist/domain/model/SeoMeta.js +0 -2
- package/dist/domain/model/SeoMeta.js.map +0 -1
- package/dist/domain/model/TemplateRegistry.d.ts +0 -50
- package/dist/domain/model/TemplateRegistry.d.ts.map +0 -1
- package/dist/domain/model/TemplateRegistry.js +0 -17
- package/dist/domain/model/TemplateRegistry.js.map +0 -1
- package/dist/domain/port/AssetServer.d.ts +0 -21
- package/dist/domain/port/AssetServer.d.ts.map +0 -1
- package/dist/domain/port/AssetServer.js +0 -2
- package/dist/domain/port/AssetServer.js.map +0 -1
- package/dist/domain/port/KvCache.d.ts +0 -34
- package/dist/domain/port/KvCache.d.ts.map +0 -1
- package/dist/domain/port/KvCache.js +0 -2
- package/dist/domain/port/KvCache.js.map +0 -1
- package/dist/domain/port/PublishOrchestrator.d.ts +0 -26
- package/dist/domain/port/PublishOrchestrator.d.ts.map +0 -1
- package/dist/domain/port/PublishOrchestrator.js +0 -2
- package/dist/domain/port/PublishOrchestrator.js.map +0 -1
- package/dist/domain/service/AbsoluteUrl.d.ts +0 -6
- package/dist/domain/service/AbsoluteUrl.d.ts.map +0 -1
- package/dist/domain/service/AbsoluteUrl.js +0 -33
- package/dist/domain/service/AbsoluteUrl.js.map +0 -1
- package/dist/domain/service/HtmlEscaping.d.ts +0 -2
- package/dist/domain/service/HtmlEscaping.d.ts.map +0 -1
- package/dist/domain/service/HtmlEscaping.js +0 -9
- package/dist/domain/service/HtmlEscaping.js.map +0 -1
- package/dist/domain/service/HtmlRenderer.d.ts +0 -36
- package/dist/domain/service/HtmlRenderer.d.ts.map +0 -1
- package/dist/domain/service/HtmlRenderer.js +0 -78
- package/dist/domain/service/HtmlRenderer.js.map +0 -1
- package/dist/domain/service/MarkdownSerializer.d.ts +0 -48
- package/dist/domain/service/MarkdownSerializer.d.ts.map +0 -1
- package/dist/domain/service/MarkdownSerializer.js +0 -109
- package/dist/domain/service/MarkdownSerializer.js.map +0 -1
- package/dist/domain/service/McpToolNaming.d.ts +0 -31
- package/dist/domain/service/McpToolNaming.d.ts.map +0 -1
- package/dist/domain/service/McpToolNaming.js +0 -48
- package/dist/domain/service/McpToolNaming.js.map +0 -1
- package/dist/domain/service/PreviewBanner.d.ts +0 -10
- package/dist/domain/service/PreviewBanner.d.ts.map +0 -1
- package/dist/domain/service/PreviewBanner.js +0 -30
- package/dist/domain/service/PreviewBanner.js.map +0 -1
- package/dist/domain/service/PublicPathResolver.d.ts +0 -41
- package/dist/domain/service/PublicPathResolver.d.ts.map +0 -1
- package/dist/domain/service/PublicPathResolver.js +0 -24
- package/dist/domain/service/PublicPathResolver.js.map +0 -1
- package/dist/domain/service/PublishKeys.d.ts +0 -42
- package/dist/domain/service/PublishKeys.d.ts.map +0 -1
- package/dist/domain/service/PublishKeys.js +0 -71
- package/dist/domain/service/PublishKeys.js.map +0 -1
- package/dist/domain/service/SeoMetaComposer.d.ts +0 -47
- package/dist/domain/service/SeoMetaComposer.d.ts.map +0 -1
- package/dist/domain/service/SeoMetaComposer.js +0 -164
- package/dist/domain/service/SeoMetaComposer.js.map +0 -1
- package/dist/domain/service/SitemapSerializer.d.ts +0 -19
- package/dist/domain/service/SitemapSerializer.d.ts.map +0 -1
- package/dist/domain/service/SitemapSerializer.js +0 -27
- package/dist/domain/service/SitemapSerializer.js.map +0 -1
- package/dist/domain/service/ViewSqlCompiler.d.ts.map +0 -1
- package/dist/domain/service/ViewSqlCompiler.js +0 -193
- package/dist/domain/service/ViewSqlCompiler.js.map +0 -1
- package/dist/domain/service/io/MediaAssetReferences.d.ts +0 -13
- package/dist/domain/service/io/MediaAssetReferences.d.ts.map +0 -1
- package/dist/domain/service/io/MediaAssetReferences.js +0 -48
- package/dist/domain/service/io/MediaAssetReferences.js.map +0 -1
- package/dist/infrastructure/render/HtmlPublishOrchestrator.d.ts +0 -38
- package/dist/infrastructure/render/HtmlPublishOrchestrator.d.ts.map +0 -1
- package/dist/infrastructure/render/HtmlPublishOrchestrator.js +0 -129
- package/dist/infrastructure/render/HtmlPublishOrchestrator.js.map +0 -1
- package/dist/infrastructure/render/index.d.ts +0 -2
- package/dist/infrastructure/render/index.d.ts.map +0 -1
- package/dist/infrastructure/render/index.js +0 -2
- package/dist/infrastructure/render/index.js.map +0 -1
- package/dist/runtime.d.ts +0 -150
- package/dist/runtime.d.ts.map +0 -1
- package/dist/runtime.js +0 -181
- package/dist/runtime.js.map +0 -1
- package/dist/usecase/content/ContentPublishEffects.d.ts +0 -11
- package/dist/usecase/content/ContentPublishEffects.d.ts.map +0 -1
- package/dist/usecase/content/ContentPublishEffects.js +0 -21
- package/dist/usecase/content/ContentPublishEffects.js.map +0 -1
- package/dist/usecase/dto/render/ComposeEntrySeoMetaRequest.d.ts +0 -14
- package/dist/usecase/dto/render/ComposeEntrySeoMetaRequest.d.ts.map +0 -1
- package/dist/usecase/dto/render/ComposeEntrySeoMetaRequest.js +0 -2
- package/dist/usecase/dto/render/ComposeEntrySeoMetaRequest.js.map +0 -1
- package/dist/usecase/dto/render/ComposeLlmsTxtRequest.d.ts +0 -8
- package/dist/usecase/dto/render/ComposeLlmsTxtRequest.d.ts.map +0 -1
- package/dist/usecase/dto/render/ComposeLlmsTxtRequest.js +0 -2
- package/dist/usecase/dto/render/ComposeLlmsTxtRequest.js.map +0 -1
- package/dist/usecase/dto/render/ComposeSitemapRequest.d.ts +0 -11
- package/dist/usecase/dto/render/ComposeSitemapRequest.d.ts.map +0 -1
- package/dist/usecase/dto/render/ComposeSitemapRequest.js +0 -2
- package/dist/usecase/dto/render/ComposeSitemapRequest.js.map +0 -1
- package/dist/usecase/dto/render/PreviewEntryRequest.d.ts +0 -13
- package/dist/usecase/dto/render/PreviewEntryRequest.d.ts.map +0 -1
- package/dist/usecase/dto/render/PreviewEntryRequest.js +0 -2
- package/dist/usecase/dto/render/PreviewEntryRequest.js.map +0 -1
- package/dist/usecase/dto/render/RenderEntryLiveRequest.d.ts +0 -14
- package/dist/usecase/dto/render/RenderEntryLiveRequest.d.ts.map +0 -1
- package/dist/usecase/dto/render/RenderEntryLiveRequest.js +0 -2
- package/dist/usecase/dto/render/RenderEntryLiveRequest.js.map +0 -1
- package/dist/usecase/dto/render/RenderListLiveRequest.d.ts +0 -11
- package/dist/usecase/dto/render/RenderListLiveRequest.d.ts.map +0 -1
- package/dist/usecase/dto/render/RenderListLiveRequest.js +0 -2
- package/dist/usecase/dto/render/RenderListLiveRequest.js.map +0 -1
- package/dist/usecase/dto/render/index.d.ts +0 -7
- package/dist/usecase/dto/render/index.d.ts.map +0 -1
- package/dist/usecase/dto/render/index.js +0 -7
- package/dist/usecase/dto/render/index.js.map +0 -1
- package/dist/usecase/render/ComposeEntrySeoMetaUseCase.d.ts +0 -28
- package/dist/usecase/render/ComposeEntrySeoMetaUseCase.d.ts.map +0 -1
- package/dist/usecase/render/ComposeEntrySeoMetaUseCase.js +0 -59
- package/dist/usecase/render/ComposeEntrySeoMetaUseCase.js.map +0 -1
- package/dist/usecase/render/ComposeLlmsTxtUseCase.d.ts +0 -19
- package/dist/usecase/render/ComposeLlmsTxtUseCase.d.ts.map +0 -1
- package/dist/usecase/render/ComposeLlmsTxtUseCase.js +0 -39
- package/dist/usecase/render/ComposeLlmsTxtUseCase.js.map +0 -1
- package/dist/usecase/render/ComposeSitemapUseCase.d.ts +0 -15
- package/dist/usecase/render/ComposeSitemapUseCase.d.ts.map +0 -1
- package/dist/usecase/render/ComposeSitemapUseCase.js +0 -28
- package/dist/usecase/render/ComposeSitemapUseCase.js.map +0 -1
- package/dist/usecase/render/PreviewEntryUseCase.d.ts +0 -28
- package/dist/usecase/render/PreviewEntryUseCase.d.ts.map +0 -1
- package/dist/usecase/render/PreviewEntryUseCase.js +0 -72
- package/dist/usecase/render/PreviewEntryUseCase.js.map +0 -1
- package/dist/usecase/render/RenderEntryLiveUseCase.d.ts +0 -37
- package/dist/usecase/render/RenderEntryLiveUseCase.d.ts.map +0 -1
- package/dist/usecase/render/RenderEntryLiveUseCase.js +0 -63
- package/dist/usecase/render/RenderEntryLiveUseCase.js.map +0 -1
- package/dist/usecase/render/RenderListLiveUseCase.d.ts +0 -25
- package/dist/usecase/render/RenderListLiveUseCase.d.ts.map +0 -1
- package/dist/usecase/render/RenderListLiveUseCase.js +0 -45
- package/dist/usecase/render/RenderListLiveUseCase.js.map +0 -1
- package/dist/usecase/render/index.d.ts +0 -7
- package/dist/usecase/render/index.d.ts.map +0 -1
- package/dist/usecase/render/index.js +0 -7
- package/dist/usecase/render/index.js.map +0 -1
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `Schema.metadata.name` → MCP per-collection tool name suffix.
|
|
3
|
-
* Lowercase + `kebab-` → `_snake`. Pure naming convention; the MCP
|
|
4
|
-
* tool catalog factory and the boot collision check both reference
|
|
5
|
-
* this so the rule lives in exactly one place.
|
|
6
|
-
*
|
|
7
|
-
* Lives in `domain/service/` (not `infrastructure/mcp/`) so the boot
|
|
8
|
-
* use case can call it without violating the usecase→infrastructure
|
|
9
|
-
* import rule.
|
|
10
|
-
*/
|
|
11
|
-
export function mcpToolNameSegment(collection) {
|
|
12
|
-
return collection.toLowerCase().replace(/-/g, "_");
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Built-in MCP tool names registered by the dispatcher regardless of
|
|
16
|
-
* manifests. A Procedure exposed via `Trigger.source.kind: "mcp"`
|
|
17
|
-
* (#281) MUST NOT mangle to any of these names — the dispatcher
|
|
18
|
-
* routes by tool name and a collision would shadow the built-in.
|
|
19
|
-
*
|
|
20
|
-
* Mirror of the `name` fields in `McpToolCatalog.GENERIC_TOOLS` plus
|
|
21
|
-
* the two media tool names. Lives here so the boot validator can
|
|
22
|
-
* reference them without an infrastructure→usecase import.
|
|
23
|
-
*/
|
|
24
|
-
export const RESERVED_MCP_GENERIC_TOOL_NAMES = new Set([
|
|
25
|
-
"list_entries",
|
|
26
|
-
"get_entry",
|
|
27
|
-
"request_publish",
|
|
28
|
-
"unpublish_entry",
|
|
29
|
-
"archive_entry",
|
|
30
|
-
"delete_entry",
|
|
31
|
-
"create_media_upload",
|
|
32
|
-
"commit_media_upload",
|
|
33
|
-
]);
|
|
34
|
-
/**
|
|
35
|
-
* Prefixes the catalog factory uses for Schema- / View-derived tools.
|
|
36
|
-
* A Procedure tool name that starts with any of these would shadow
|
|
37
|
-
* (or be shadowed by) a Schema's create/update tool or a View's
|
|
38
|
-
* query tool, so boot rejects the manifest set with
|
|
39
|
-
* `MCP_TOOL_NAME_COLLISION`.
|
|
40
|
-
*/
|
|
41
|
-
export const RESERVED_MCP_TOOL_PREFIXES = [
|
|
42
|
-
"create_draft_",
|
|
43
|
-
"update_draft_",
|
|
44
|
-
"create_record_",
|
|
45
|
-
"update_record_",
|
|
46
|
-
"query_view_",
|
|
47
|
-
];
|
|
48
|
-
//# sourceMappingURL=McpToolNaming.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"McpToolNaming.js","sourceRoot":"","sources":["../../../src/domain/service/McpToolNaming.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAAkB;IACnD,OAAO,UAAU,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AACrD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAwB,IAAI,GAAG,CAAC;IAC1E,cAAc;IACd,WAAW;IACX,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,cAAc;IACd,qBAAqB;IACrB,qBAAqB;CACtB,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAsB;IAC3D,eAAe;IACf,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,aAAa;CACd,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare function injectPreviewBanner(html: string, banner: string): string;
|
|
2
|
-
/**
|
|
3
|
-
* Build the SDK's default preview banner markup. Both `status` and
|
|
4
|
-
* `slug` are HTML-escaped — `status` is a closed enum so escaping is
|
|
5
|
-
* defense-in-depth, but `slug` is caller-supplied and a slug
|
|
6
|
-
* containing `<script>` would otherwise inject script into the
|
|
7
|
-
* preview surface.
|
|
8
|
-
*/
|
|
9
|
-
export declare function defaultPreviewBanner(status: string, slug: string): string;
|
|
10
|
-
//# sourceMappingURL=PreviewBanner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PreviewBanner.d.ts","sourceRoot":"","sources":["../../../src/domain/service/PreviewBanner.ts"],"names":[],"mappings":"AAgBA,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAExE;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzE"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Inject a preview banner just inside the rendered `<body>`. Used by
|
|
3
|
-
* the request-time `?preview=1` route so authors can see in-progress
|
|
4
|
-
* drafts with a visible "this isn't published" mark.
|
|
5
|
-
*
|
|
6
|
-
* The injection looks for the first `<body...>` opening tag and
|
|
7
|
-
* appends `banner` immediately after it. Documents without a body tag
|
|
8
|
-
* (fragments, partial templates) fall through unchanged — the caller
|
|
9
|
-
* already validated the renderer produced a full HTML document, so a
|
|
10
|
-
* missing body is a contract violation, not user input.
|
|
11
|
-
*
|
|
12
|
-
* Pure string transformation. Lives in `domain/service/` so the
|
|
13
|
-
* regex (and any future DOM-safer replacement) stays in one place.
|
|
14
|
-
*/
|
|
15
|
-
const BODY_OPEN = /<body([^>]*)>/;
|
|
16
|
-
export function injectPreviewBanner(html, banner) {
|
|
17
|
-
return html.replace(BODY_OPEN, `<body$1>${banner}`);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Build the SDK's default preview banner markup. Both `status` and
|
|
21
|
-
* `slug` are HTML-escaped — `status` is a closed enum so escaping is
|
|
22
|
-
* defense-in-depth, but `slug` is caller-supplied and a slug
|
|
23
|
-
* containing `<script>` would otherwise inject script into the
|
|
24
|
-
* preview surface.
|
|
25
|
-
*/
|
|
26
|
-
export function defaultPreviewBanner(status, slug) {
|
|
27
|
-
return `<div class="preview-banner">Preview · ${escapeHtml(status)} · ${escapeHtml(slug)}</div>`;
|
|
28
|
-
}
|
|
29
|
-
import { escapeHtml } from "./HtmlEscaping.js";
|
|
30
|
-
//# sourceMappingURL=PreviewBanner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PreviewBanner.js","sourceRoot":"","sources":["../../../src/domain/service/PreviewBanner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,SAAS,GAAG,eAAe,CAAC;AAElC,MAAM,UAAU,mBAAmB,CAAC,IAAY,EAAE,MAAc;IAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,MAAM,EAAE,CAAC,CAAC;AACtD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAc,EAAE,IAAY;IAC/D,OAAO,yCAAyC,UAAU,CAAC,MAAM,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC;AACnG,CAAC;AACD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { type Entry } from "@aotter/mantle-spec";
|
|
2
|
-
/**
|
|
3
|
-
* Resolves a public URL path for an entry, given the consumer's
|
|
4
|
-
* collection→URL configuration. One source of truth for both the
|
|
5
|
-
* router (URL → collection/slug lookup) and outbound URL emission
|
|
6
|
-
* (sitemap, hreflang siblings, SEO canonical).
|
|
7
|
-
*
|
|
8
|
-
* The resolver's `forEntry` returns `null` when:
|
|
9
|
-
* - the entry's collection has no public URL (e.g. parent `posts`
|
|
10
|
-
* surfaces only via `post-translations` children)
|
|
11
|
-
* - the entry has no slug AND no canonical id-based URL pattern is
|
|
12
|
-
* configured for the collection
|
|
13
|
-
*
|
|
14
|
-
* Pure path math — no I/O. Lives in `domain/service/`.
|
|
15
|
-
*/
|
|
16
|
-
export interface CollectionRoute {
|
|
17
|
-
/** URL segment for entries of this collection.
|
|
18
|
-
*
|
|
19
|
-
* - non-empty string: `/{locale}/{segment}/{slug}` (e.g. `posts`)
|
|
20
|
-
* - empty string: `/{locale}/{slug}` (entries directly under locale)
|
|
21
|
-
* - null: collection has no public URL
|
|
22
|
-
*/
|
|
23
|
-
readonly segment: string | null;
|
|
24
|
-
/** When the entry's slug equals this value, collapse the URL to
|
|
25
|
-
* `/{locale}` (no trailing segment + slug). Used for home pages
|
|
26
|
-
* that live in a translations collection. */
|
|
27
|
-
readonly homeSlug?: string;
|
|
28
|
-
}
|
|
29
|
-
export interface PublicPathResolverConfig {
|
|
30
|
-
readonly collectionRoutes: Readonly<Record<string, CollectionRoute>>;
|
|
31
|
-
}
|
|
32
|
-
export interface PublicPathResolver {
|
|
33
|
-
/** Returns `/{locale}/{segment}/{slug}` style path, or `null` if the
|
|
34
|
-
* entry has no public URL under this configuration. */
|
|
35
|
-
forEntry(entry: Entry): string | null;
|
|
36
|
-
/** Returns the configured route for `collection`, or `undefined` if
|
|
37
|
-
* the collection isn't mapped. */
|
|
38
|
-
routeFor(collection: string): CollectionRoute | undefined;
|
|
39
|
-
}
|
|
40
|
-
export declare function createPublicPathResolver(config: PublicPathResolverConfig): PublicPathResolver;
|
|
41
|
-
//# sourceMappingURL=PublicPathResolver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PublicPathResolver.d.ts","sourceRoot":"","sources":["../../../src/domain/service/PublicPathResolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAG9D;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC;;kDAE8C;IAC9C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;CACtE;AAED,MAAM,WAAW,kBAAkB;IACjC;4DACwD;IACxD,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAAC;IACtC;uCACmC;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;CAC3D;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,wBAAwB,GAC/B,kBAAkB,CAmBpB"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { toUrlLocale } from "@aotter/mantle-spec";
|
|
2
|
-
import { entrySlug } from "./PublishKeys.js";
|
|
3
|
-
export function createPublicPathResolver(config) {
|
|
4
|
-
const routes = config.collectionRoutes;
|
|
5
|
-
return {
|
|
6
|
-
forEntry(entry) {
|
|
7
|
-
const route = routes[entry.collection];
|
|
8
|
-
if (!route || route.segment === null)
|
|
9
|
-
return null;
|
|
10
|
-
const slug = entrySlug({ id: entry.id, data: entry.data });
|
|
11
|
-
const locale = entry.locale ? toUrlLocale(entry.locale) : "";
|
|
12
|
-
const localePrefix = locale ? `/${locale}` : "";
|
|
13
|
-
if (route.homeSlug && slug === route.homeSlug) {
|
|
14
|
-
return localePrefix || "/";
|
|
15
|
-
}
|
|
16
|
-
const segment = route.segment;
|
|
17
|
-
return segment ? `${localePrefix}/${segment}/${slug}` : `${localePrefix}/${slug}`;
|
|
18
|
-
},
|
|
19
|
-
routeFor(collection) {
|
|
20
|
-
return routes[collection];
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=PublicPathResolver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PublicPathResolver.js","sourceRoot":"","sources":["../../../src/domain/service/PublicPathResolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAc,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AA2C7C,MAAM,UAAU,wBAAwB,CACtC,MAAgC;IAEhC,MAAM,MAAM,GAAG,MAAM,CAAC,gBAAgB,CAAC;IACvC,OAAO;QACL,QAAQ,CAAC,KAAY;YACnB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;YACvC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI;gBAAE,OAAO,IAAI,CAAC;YAClD,MAAM,IAAI,GAAG,SAAS,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;YAC3D,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7D,MAAM,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAChD,IAAI,KAAK,CAAC,QAAQ,IAAI,IAAI,KAAK,KAAK,CAAC,QAAQ,EAAE,CAAC;gBAC9C,OAAO,YAAY,IAAI,GAAG,CAAC;YAC7B,CAAC;YACD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;YAC9B,OAAO,OAAO,CAAC,CAAC,CAAC,GAAG,YAAY,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,YAAY,IAAI,IAAI,EAAE,CAAC;QACpF,CAAC;QACD,QAAQ,CAAC,UAAkB;YACzB,OAAO,MAAM,CAAC,UAAU,CAAC,CAAC;QAC5B,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { type Entry } from "@aotter/mantle-spec";
|
|
2
|
-
/**
|
|
3
|
-
* KV key derivation. Centralised so the publish pipeline (writer) and
|
|
4
|
-
* the public router (reader) agree on one shape; changing the layout
|
|
5
|
-
* is a single-file edit.
|
|
6
|
-
*
|
|
7
|
-
* - `entry:html:{locale}/{collection}/{slug}` — pre-rendered HTML
|
|
8
|
-
* - `entry:md:{locale}/{collection}/{slug}` — markdown mirror
|
|
9
|
-
* - `list:html:{locale}/{collection}` — collection index
|
|
10
|
-
* - `llms:{locale}` — /{locale}/llms.txt
|
|
11
|
-
* - `llms:root:v2` — /llms.txt (cross-locale aggregate)
|
|
12
|
-
*
|
|
13
|
-
* Non-localized entries use empty-string locale (`entry:html:/posts/abc`).
|
|
14
|
-
* The root /llms.txt uses an explicit versioned `:root:v2` suffix instead of an
|
|
15
|
-
* empty one because `wrangler kv bulk put` silently drops keys ending
|
|
16
|
-
* in `:` (caught in CI on commit 93c10ef).
|
|
17
|
-
*
|
|
18
|
-
* Pure path math — no I/O. Lives in `domain/service/` so any layer
|
|
19
|
-
* can call it without dragging an adapter dep.
|
|
20
|
-
*/
|
|
21
|
-
export declare function entrySlug(entry: {
|
|
22
|
-
id: string;
|
|
23
|
-
data: Record<string, unknown>;
|
|
24
|
-
}): string;
|
|
25
|
-
export declare function entryHtmlKey(entry: Entry): string;
|
|
26
|
-
export declare function entryMarkdownKey(entry: Entry): string;
|
|
27
|
-
export declare function listHtmlKey(collection: string, locale: string): string;
|
|
28
|
-
export declare function llmsTxtKey(locale: string): string;
|
|
29
|
-
export declare function entryPublicPath(entry: Entry): string;
|
|
30
|
-
/**
|
|
31
|
-
* Build the entry HTML key from URL-side parts. The router has the
|
|
32
|
-
* (collection, locale, slug) tuple from path params; reconstructing
|
|
33
|
-
* a partial `Entry` just to call `entryHtmlKey` is bug-bait. Use
|
|
34
|
-
* this helper instead.
|
|
35
|
-
*
|
|
36
|
-
* Pass `locale = ""` for non-localized entries (matches publish
|
|
37
|
-
* pipeline semantic where non-localized entries write to
|
|
38
|
-
* `entry:html:/{collection}/{slug}`).
|
|
39
|
-
*/
|
|
40
|
-
export declare function entryHtmlKeyFromParts(collection: string, locale: string, slug: string): string;
|
|
41
|
-
export declare function entryMarkdownKeyFromParts(collection: string, locale: string, slug: string): string;
|
|
42
|
-
//# sourceMappingURL=PublishKeys.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PublishKeys.d.ts","sourceRoot":"","sources":["../../../src/domain/service/PublishKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAAG,MAAM,CAMtF;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAIjD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAIrD;AAED,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGtE;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIjD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAIpD;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GACX,MAAM,CAGR;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GACX,MAAM,CAGR"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { toUrlLocale } from "@aotter/mantle-spec";
|
|
2
|
-
/**
|
|
3
|
-
* KV key derivation. Centralised so the publish pipeline (writer) and
|
|
4
|
-
* the public router (reader) agree on one shape; changing the layout
|
|
5
|
-
* is a single-file edit.
|
|
6
|
-
*
|
|
7
|
-
* - `entry:html:{locale}/{collection}/{slug}` — pre-rendered HTML
|
|
8
|
-
* - `entry:md:{locale}/{collection}/{slug}` — markdown mirror
|
|
9
|
-
* - `list:html:{locale}/{collection}` — collection index
|
|
10
|
-
* - `llms:{locale}` — /{locale}/llms.txt
|
|
11
|
-
* - `llms:root:v2` — /llms.txt (cross-locale aggregate)
|
|
12
|
-
*
|
|
13
|
-
* Non-localized entries use empty-string locale (`entry:html:/posts/abc`).
|
|
14
|
-
* The root /llms.txt uses an explicit versioned `:root:v2` suffix instead of an
|
|
15
|
-
* empty one because `wrangler kv bulk put` silently drops keys ending
|
|
16
|
-
* in `:` (caught in CI on commit 93c10ef).
|
|
17
|
-
*
|
|
18
|
-
* Pure path math — no I/O. Lives in `domain/service/` so any layer
|
|
19
|
-
* can call it without dragging an adapter dep.
|
|
20
|
-
*/
|
|
21
|
-
export function entrySlug(entry) {
|
|
22
|
-
const fromData = entry.data["slug"];
|
|
23
|
-
if (typeof fromData === "string" && /^[a-z0-9][a-z0-9-]*$/.test(fromData)) {
|
|
24
|
-
return fromData;
|
|
25
|
-
}
|
|
26
|
-
return entry.id;
|
|
27
|
-
}
|
|
28
|
-
export function entryHtmlKey(entry) {
|
|
29
|
-
const slug = entrySlug(entry);
|
|
30
|
-
const locale = entry.locale ? toUrlLocale(entry.locale) : "";
|
|
31
|
-
return `entry:html:${locale}/${entry.collection}/${slug}`;
|
|
32
|
-
}
|
|
33
|
-
export function entryMarkdownKey(entry) {
|
|
34
|
-
const slug = entrySlug(entry);
|
|
35
|
-
const locale = entry.locale ? toUrlLocale(entry.locale) : "";
|
|
36
|
-
return `entry:md:${locale}/${entry.collection}/${slug}`;
|
|
37
|
-
}
|
|
38
|
-
export function listHtmlKey(collection, locale) {
|
|
39
|
-
const urlLocale = locale ? locale.toLowerCase() : "";
|
|
40
|
-
return `list:html:${urlLocale}/${collection}`;
|
|
41
|
-
}
|
|
42
|
-
export function llmsTxtKey(locale) {
|
|
43
|
-
// v2 abandons alpha.58's TTL-less root values, which cannot be repaired
|
|
44
|
-
// until another publish happens. Locale keys already rewrite on publish.
|
|
45
|
-
return locale ? `llms:${locale.toLowerCase()}` : "llms:root:v2";
|
|
46
|
-
}
|
|
47
|
-
export function entryPublicPath(entry) {
|
|
48
|
-
const slug = entrySlug(entry);
|
|
49
|
-
if (entry.locale)
|
|
50
|
-
return `/${toUrlLocale(entry.locale)}/${entry.collection}/${slug}`;
|
|
51
|
-
return `/${entry.collection}/${slug}`;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Build the entry HTML key from URL-side parts. The router has the
|
|
55
|
-
* (collection, locale, slug) tuple from path params; reconstructing
|
|
56
|
-
* a partial `Entry` just to call `entryHtmlKey` is bug-bait. Use
|
|
57
|
-
* this helper instead.
|
|
58
|
-
*
|
|
59
|
-
* Pass `locale = ""` for non-localized entries (matches publish
|
|
60
|
-
* pipeline semantic where non-localized entries write to
|
|
61
|
-
* `entry:html:/{collection}/{slug}`).
|
|
62
|
-
*/
|
|
63
|
-
export function entryHtmlKeyFromParts(collection, locale, slug) {
|
|
64
|
-
const urlLocale = locale ? locale.toLowerCase() : "";
|
|
65
|
-
return `entry:html:${urlLocale}/${collection}/${slug}`;
|
|
66
|
-
}
|
|
67
|
-
export function entryMarkdownKeyFromParts(collection, locale, slug) {
|
|
68
|
-
const urlLocale = locale ? locale.toLowerCase() : "";
|
|
69
|
-
return `entry:md:${urlLocale}/${collection}/${slug}`;
|
|
70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|
-
* Pure composer for SEO + AEO meta blocks emitted on every public
|
|
5
|
-
* entry page. Carries the conventions a consumer otherwise re-invents
|
|
6
|
-
* — canonical, hreflang siblings, the `.md` mirror alternate that
|
|
7
|
-
* lets LLM crawlers grab clean markdown, og: + twitter card, JSON-LD
|
|
8
|
-
* structured data.
|
|
9
|
-
*
|
|
10
|
-
* The composer is pure — no I/O, no DB. The caller resolves the
|
|
11
|
-
* sibling translations (for hreflang) and passes them in. See
|
|
12
|
-
* `ComposeEntrySeoMetaUseCase` for the wired version that does the
|
|
13
|
-
* sibling-read.
|
|
14
|
-
*
|
|
15
|
-
* The shape of the result lives in `domain/model/SeoMeta` so
|
|
16
|
-
* `TemplateRegistry`'s `EntryContext.seo` can reference it without
|
|
17
|
-
* pulling service code into model.
|
|
18
|
-
*/
|
|
19
|
-
export type { SeoMeta } from "../model/SeoMeta.js";
|
|
20
|
-
export interface SiblingTranslation {
|
|
21
|
-
readonly locale: string;
|
|
22
|
-
readonly publicPath: string;
|
|
23
|
-
}
|
|
24
|
-
export interface ComposeEntrySeoMetaArgs {
|
|
25
|
-
readonly entry: Entry;
|
|
26
|
-
readonly site: SiteConfig;
|
|
27
|
-
/** The current entry's public path (already includes locale prefix).
|
|
28
|
-
* Composer prepends `site.origin` to absolutize. */
|
|
29
|
-
readonly publicPath: string;
|
|
30
|
-
/** Optional sibling translations for hreflang. The current entry's
|
|
31
|
-
* locale entry is added by the composer if not already present. */
|
|
32
|
-
readonly siblings?: ReadonlyArray<SiblingTranslation>;
|
|
33
|
-
/** og:type. Defaults to `article` when the entry has a `publishedAt`
|
|
34
|
-
* (or `updatedAt`) field, `website` otherwise. */
|
|
35
|
-
readonly type?: "article" | "website";
|
|
36
|
-
}
|
|
37
|
-
export declare function composeEntrySeoMeta(args: ComposeEntrySeoMetaArgs): SeoMeta;
|
|
38
|
-
/**
|
|
39
|
-
* Render the SEO meta block as an HTML fragment. Templates embed this
|
|
40
|
-
* verbatim inside `<head>` via `raw(renderSeoTagsHtml(seo))`.
|
|
41
|
-
*
|
|
42
|
-
* Order matters slightly for crawlers — canonical first, alternates
|
|
43
|
-
* (markdown then hreflang) before og:/twitter so the discoverability
|
|
44
|
-
* bones land before the rich-preview block.
|
|
45
|
-
*/
|
|
46
|
-
export declare function renderSeoTagsHtml(meta: SeoMeta): string;
|
|
47
|
-
//# sourceMappingURL=SeoMetaComposer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SeoMetaComposer.d.ts","sourceRoot":"","sources":["../../../src/domain/service/SeoMetaComposer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAKnD;;;;;;;;;;;;;;;GAeG;AACH,YAAY,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B;yDACqD;IACrD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B;wEACoE;IACpE,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IACtD;uDACmD;IACnD,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACvC;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAiD1E;AAmFD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CA8CvD"}
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import { toUrlLocale } from "@aotter/mantle-spec";
|
|
2
|
-
import { absoluteUrl, appendMarkdownExt } from "./AbsoluteUrl.js";
|
|
3
|
-
import { escapeHtml as escapeAttr } from "./HtmlEscaping.js";
|
|
4
|
-
import { hasMarkdownBody } from "./MarkdownSerializer.js";
|
|
5
|
-
export function composeEntrySeoMeta(args) {
|
|
6
|
-
const { entry, site, publicPath, siblings = [], type } = args;
|
|
7
|
-
const data = entry.data;
|
|
8
|
-
const canonical = absoluteUrl(site.origin, publicPath);
|
|
9
|
-
const alternateMarkdown = appendMarkdownExt(canonical);
|
|
10
|
-
const title = stringField(data, "title") ?? site.title;
|
|
11
|
-
const description = stringField(data, "description") ?? site.description ?? null;
|
|
12
|
-
const image = stringField(data, "coverUrl") ?? stringField(data, "ogImage") ?? null;
|
|
13
|
-
const ogType = type ?? (hasArticleSignal(entry) ? "article" : "website");
|
|
14
|
-
const entryLocale = entry.locale ?? site.canonicalLocale ?? "en";
|
|
15
|
-
const hreflangs = buildHreflangs({
|
|
16
|
-
site,
|
|
17
|
-
currentLocale: entryLocale,
|
|
18
|
-
currentPublicPath: publicPath,
|
|
19
|
-
siblings,
|
|
20
|
-
});
|
|
21
|
-
return {
|
|
22
|
-
canonical,
|
|
23
|
-
alternateMarkdown,
|
|
24
|
-
hreflangs,
|
|
25
|
-
description: description ?? null,
|
|
26
|
-
og: {
|
|
27
|
-
type: ogType,
|
|
28
|
-
url: canonical,
|
|
29
|
-
title,
|
|
30
|
-
siteName: site.title || site.brand,
|
|
31
|
-
description: description ?? null,
|
|
32
|
-
image,
|
|
33
|
-
locale: entryLocale,
|
|
34
|
-
},
|
|
35
|
-
twitter: {
|
|
36
|
-
card: image ? "summary_large_image" : "summary",
|
|
37
|
-
title,
|
|
38
|
-
description: description ?? null,
|
|
39
|
-
image,
|
|
40
|
-
},
|
|
41
|
-
jsonLd: buildJsonLd({
|
|
42
|
-
ogType,
|
|
43
|
-
title,
|
|
44
|
-
description,
|
|
45
|
-
canonical,
|
|
46
|
-
image,
|
|
47
|
-
data,
|
|
48
|
-
site,
|
|
49
|
-
}),
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function buildHreflangs(args) {
|
|
53
|
-
const { site, currentLocale, currentPublicPath, siblings } = args;
|
|
54
|
-
if (site.locales.length <= 1)
|
|
55
|
-
return [];
|
|
56
|
-
const out = [];
|
|
57
|
-
const seen = new Set();
|
|
58
|
-
const push = (locale, path) => {
|
|
59
|
-
const key = locale.toLowerCase();
|
|
60
|
-
if (seen.has(key))
|
|
61
|
-
return;
|
|
62
|
-
seen.add(key);
|
|
63
|
-
out.push({ locale, href: absoluteUrl(site.origin, path) });
|
|
64
|
-
};
|
|
65
|
-
push(currentLocale, currentPublicPath);
|
|
66
|
-
for (const s of siblings)
|
|
67
|
-
push(s.locale, s.publicPath);
|
|
68
|
-
// x-default points at the canonical-locale variant when known,
|
|
69
|
-
// falling back to the current entry's URL otherwise. Search engines
|
|
70
|
-
// expect this row alongside the per-locale ones.
|
|
71
|
-
const canonicalSibling = siblings.find((s) => site.canonicalLocale && s.locale.toLowerCase() === site.canonicalLocale.toLowerCase());
|
|
72
|
-
out.push({
|
|
73
|
-
locale: "x-default",
|
|
74
|
-
href: absoluteUrl(site.origin, canonicalSibling?.publicPath ?? currentPublicPath),
|
|
75
|
-
});
|
|
76
|
-
return out;
|
|
77
|
-
}
|
|
78
|
-
function buildJsonLd(args) {
|
|
79
|
-
const { ogType, title, description, canonical, image, data, site } = args;
|
|
80
|
-
const publishedAtMs = numericField(data, "publishedAt");
|
|
81
|
-
const updatedAtMs = numericField(data, "updatedAt");
|
|
82
|
-
const base = {
|
|
83
|
-
"@context": "https://schema.org",
|
|
84
|
-
"@type": ogType === "article" ? "Article" : "WebPage",
|
|
85
|
-
headline: title,
|
|
86
|
-
name: title,
|
|
87
|
-
url: canonical,
|
|
88
|
-
description: description ?? undefined,
|
|
89
|
-
image: image ?? undefined,
|
|
90
|
-
inLanguage: site.canonicalLocale ?? undefined,
|
|
91
|
-
publisher: site.title || site.brand
|
|
92
|
-
? {
|
|
93
|
-
"@type": "Organization",
|
|
94
|
-
name: site.title || site.brand,
|
|
95
|
-
}
|
|
96
|
-
: undefined,
|
|
97
|
-
datePublished: publishedAtMs ? new Date(publishedAtMs).toISOString() : undefined,
|
|
98
|
-
dateModified: updatedAtMs ? new Date(updatedAtMs).toISOString() : undefined,
|
|
99
|
-
};
|
|
100
|
-
// Drop undefined keys so JSON.stringify produces a clean object.
|
|
101
|
-
return Object.fromEntries(Object.entries(base).filter(([, v]) => v !== undefined));
|
|
102
|
-
}
|
|
103
|
-
function stringField(data, key) {
|
|
104
|
-
const v = data[key];
|
|
105
|
-
return typeof v === "string" && v.length > 0 ? v : null;
|
|
106
|
-
}
|
|
107
|
-
function numericField(data, key) {
|
|
108
|
-
const v = data[key];
|
|
109
|
-
return typeof v === "number" && Number.isFinite(v) ? v : null;
|
|
110
|
-
}
|
|
111
|
-
function hasArticleSignal(entry) {
|
|
112
|
-
return typeof entry.data["publishedAt"] === "number" || hasMarkdownBody(entry);
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Render the SEO meta block as an HTML fragment. Templates embed this
|
|
116
|
-
* verbatim inside `<head>` via `raw(renderSeoTagsHtml(seo))`.
|
|
117
|
-
*
|
|
118
|
-
* Order matters slightly for crawlers — canonical first, alternates
|
|
119
|
-
* (markdown then hreflang) before og:/twitter so the discoverability
|
|
120
|
-
* bones land before the rich-preview block.
|
|
121
|
-
*/
|
|
122
|
-
export function renderSeoTagsHtml(meta) {
|
|
123
|
-
const parts = [];
|
|
124
|
-
parts.push(`<link rel="canonical" href="${escapeAttr(meta.canonical)}">`);
|
|
125
|
-
parts.push(`<link rel="alternate" type="text/markdown" href="${escapeAttr(meta.alternateMarkdown)}">`);
|
|
126
|
-
for (const h of meta.hreflangs) {
|
|
127
|
-
parts.push(`<link rel="alternate" hreflang="${escapeAttr(h.locale)}" href="${escapeAttr(h.href)}">`);
|
|
128
|
-
}
|
|
129
|
-
if (meta.description) {
|
|
130
|
-
parts.push(`<meta name="description" content="${escapeAttr(meta.description)}">`);
|
|
131
|
-
}
|
|
132
|
-
parts.push(`<meta name="generator" content="mantle">`);
|
|
133
|
-
parts.push(`<meta property="og:type" content="${escapeAttr(meta.og.type)}">`);
|
|
134
|
-
parts.push(`<meta property="og:url" content="${escapeAttr(meta.og.url)}">`);
|
|
135
|
-
parts.push(`<meta property="og:title" content="${escapeAttr(meta.og.title)}">`);
|
|
136
|
-
if (meta.og.siteName) {
|
|
137
|
-
parts.push(`<meta property="og:site_name" content="${escapeAttr(meta.og.siteName)}">`);
|
|
138
|
-
}
|
|
139
|
-
if (meta.og.description) {
|
|
140
|
-
parts.push(`<meta property="og:description" content="${escapeAttr(meta.og.description)}">`);
|
|
141
|
-
}
|
|
142
|
-
if (meta.og.image) {
|
|
143
|
-
parts.push(`<meta property="og:image" content="${escapeAttr(meta.og.image)}">`);
|
|
144
|
-
}
|
|
145
|
-
parts.push(`<meta property="og:locale" content="${escapeAttr(toUrlLocale(meta.og.locale))}">`);
|
|
146
|
-
parts.push(`<meta name="twitter:card" content="${escapeAttr(meta.twitter.card)}">`);
|
|
147
|
-
parts.push(`<meta name="twitter:title" content="${escapeAttr(meta.twitter.title)}">`);
|
|
148
|
-
if (meta.twitter.description) {
|
|
149
|
-
parts.push(`<meta name="twitter:description" content="${escapeAttr(meta.twitter.description)}">`);
|
|
150
|
-
}
|
|
151
|
-
if (meta.twitter.image) {
|
|
152
|
-
parts.push(`<meta name="twitter:image" content="${escapeAttr(meta.twitter.image)}">`);
|
|
153
|
-
}
|
|
154
|
-
if (meta.jsonLd) {
|
|
155
|
-
parts.push(`<script type="application/ld+json">${escapeJsonLd(meta.jsonLd)}</script>`);
|
|
156
|
-
}
|
|
157
|
-
return parts.join("\n");
|
|
158
|
-
}
|
|
159
|
-
function escapeJsonLd(obj) {
|
|
160
|
-
// `</script>` inside JSON-LD is the only nested-script pitfall;
|
|
161
|
-
// escaping the closing `</` keeps the embedded JSON strict-parseable.
|
|
162
|
-
return JSON.stringify(obj).replace(/<\//g, "<\\/");
|
|
163
|
-
}
|
|
164
|
-
//# sourceMappingURL=SeoMetaComposer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SeoMetaComposer.js","sourceRoot":"","sources":["../../../src/domain/service/SeoMetaComposer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA+B,MAAM,qBAAqB,CAAC;AAE/E,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,UAAU,IAAI,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAuC1D,MAAM,UAAU,mBAAmB,CAAC,IAA6B;IAC/D,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,GAAG,EAAE,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAC9D,MAAM,IAAI,GAAG,KAAK,CAAC,IAA+B,CAAC;IACnD,MAAM,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACvD,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAEvD,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC;IACvD,MAAM,WAAW,GAAG,WAAW,CAAC,IAAI,EAAE,aAAa,CAAC,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC;IACjF,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,IAAI,CAAC;IACpF,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CA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AAI,CAAC,MAAM,EAAE,CAAC;QAChB,KAAK,CAAC,IAAI,CACR,sCAAsC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAC3E,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,SAAS,YAAY,CAAC,GAAW;IAC/B,gEAAgE;IAChE,sEAAsE;IACtE,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Entry, SiteConfig } from "@aotter/mantle-spec";
|
|
2
|
-
/**
|
|
3
|
-
* Hreflang alternates are deferred to v0.1.x (need cross-locale entry
|
|
4
|
-
* pairing first); only minimal `loc + lastmod` shipped.
|
|
5
|
-
*
|
|
6
|
-
* Entries arrive pre-mapped from storage row to public path — the
|
|
7
|
-
* caller (`ComposeSitemapUseCase`) decides how a (collection, slug,
|
|
8
|
-
* locale) row surfaces under the consumer's routing.
|
|
9
|
-
*/
|
|
10
|
-
export interface SitemapEntry {
|
|
11
|
-
readonly entry: Entry;
|
|
12
|
-
readonly path: string;
|
|
13
|
-
}
|
|
14
|
-
export interface SitemapInput {
|
|
15
|
-
readonly site: SiteConfig;
|
|
16
|
-
readonly entries: readonly SitemapEntry[];
|
|
17
|
-
}
|
|
18
|
-
export declare function serializeSitemap(input: SitemapInput): string;
|
|
19
|
-
//# sourceMappingURL=SitemapSerializer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SitemapSerializer.d.ts","sourceRoot":"","sources":["../../../src/domain/service/SitemapSerializer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG7D;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;CAC3C;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAgB5D"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { absoluteUrl } from "./AbsoluteUrl.js";
|
|
2
|
-
export function serializeSitemap(input) {
|
|
3
|
-
const { site, entries } = input;
|
|
4
|
-
const out = [];
|
|
5
|
-
out.push(`<?xml version="1.0" encoding="UTF-8"?>`);
|
|
6
|
-
out.push(`<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">`);
|
|
7
|
-
for (const { entry, path } of entries) {
|
|
8
|
-
const loc = absoluteUrl(site.origin ?? "", path);
|
|
9
|
-
out.push(" <url>");
|
|
10
|
-
out.push(` <loc>${escapeXml(loc)}</loc>`);
|
|
11
|
-
if (entry.updatedAt) {
|
|
12
|
-
out.push(` <lastmod>${new Date(entry.updatedAt).toISOString()}</lastmod>`);
|
|
13
|
-
}
|
|
14
|
-
out.push(" </url>");
|
|
15
|
-
}
|
|
16
|
-
out.push("</urlset>");
|
|
17
|
-
return out.join("\n") + "\n";
|
|
18
|
-
}
|
|
19
|
-
function escapeXml(s) {
|
|
20
|
-
return s
|
|
21
|
-
.replace(/&/g, "&")
|
|
22
|
-
.replace(/</g, "<")
|
|
23
|
-
.replace(/>/g, ">")
|
|
24
|
-
.replace(/"/g, """)
|
|
25
|
-
.replace(/'/g, "'");
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=SitemapSerializer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SitemapSerializer.js","sourceRoot":"","sources":["../../../src/domain/service/SitemapSerializer.ts"],"names":[],"mappings":"AACA,OA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