@mdfriday/foundry 26.4.19 → 26.5.1
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/dist/cjs/index.js +1 -1
- package/dist/cjs/obsidian/mobile.js +1 -1
- package/dist/cjs/worker/pool-manager.js +341 -362
- package/dist/cjs/worker/worker-node.js +110 -132
- package/dist/esm/index.js +1 -1
- package/dist/esm/obsidian/mobile.js +1 -1
- package/dist/types/internal/application/batch-task-queue.d.ts +17 -0
- package/dist/types/internal/application/container.d.ts +68 -1
- package/dist/types/internal/application/identity.d.ts +173 -0
- package/dist/types/internal/application/incremental-build-coordinator.d.ts +28 -0
- package/dist/types/internal/application/incremental-ssg.d.ts +4 -0
- package/dist/types/internal/application/index.d.ts +5 -4
- package/dist/types/internal/application/publish.d.ts +37 -0
- package/dist/types/internal/application/ssg-parallel.d.ts +6 -0
- package/dist/types/internal/application/ssg.d.ts +15 -0
- package/dist/types/internal/application/wiki-service-config.d.ts +65 -0
- package/dist/types/internal/application/wiki-service.d.ts +199 -0
- package/dist/types/internal/application/worker/pool-manager.d.ts +43 -0
- package/dist/types/internal/application/worker/worker-browser.d.ts +6 -0
- package/dist/types/internal/application/worker/worker-main.d.ts +12 -0
- package/dist/types/internal/application/worker/worker-state.d.ts +23 -0
- package/dist/types/internal/application/workspace.d.ts +98 -0
- package/dist/types/internal/domain/config/entity/config.d.ts +40 -0
- package/dist/types/internal/domain/config/entity/language.d.ts +51 -0
- package/dist/types/internal/domain/config/entity/markdown.d.ts +36 -0
- package/dist/types/internal/domain/config/entity/module.d.ts +36 -0
- package/dist/types/internal/domain/config/entity/root.d.ts +39 -0
- package/dist/types/internal/domain/config/entity/service.d.ts +36 -0
- package/dist/types/internal/domain/config/entity/social.d.ts +43 -0
- package/dist/types/internal/domain/config/entity/taxonomy.d.ts +39 -0
- package/dist/types/internal/domain/config/factory/config.d.ts +3 -0
- package/dist/types/internal/domain/config/factory/loader.d.ts +24 -0
- package/dist/types/internal/domain/config/factory/provider.d.ts +10 -0
- package/dist/types/internal/domain/config/factory/sourcedescriptor.d.ts +12 -0
- package/dist/types/internal/domain/config/type.d.ts +56 -0
- package/dist/types/internal/domain/config/vo/language.d.ts +6 -0
- package/dist/types/internal/domain/config/vo/markdown.d.ts +13 -0
- package/dist/types/internal/domain/config/vo/module.d.ts +9 -0
- package/dist/types/internal/domain/config/vo/root.d.ts +6 -0
- package/dist/types/internal/domain/config/vo/service.d.ts +6 -0
- package/dist/types/internal/domain/config/vo/social.d.ts +16 -0
- package/dist/types/internal/domain/config/vo/taxonomy.d.ts +12 -0
- package/dist/types/internal/domain/content/entity/content.d.ts +36 -0
- package/dist/types/internal/domain/content/entity/page.d.ts +23 -0
- package/dist/types/internal/domain/content/entity/pagebuilder.d.ts +83 -0
- package/dist/types/internal/domain/content/entity/pagecollector.d.ts +3 -0
- package/dist/types/internal/domain/content/entity/pagecontent.d.ts +14 -0
- package/dist/types/internal/domain/content/entity/pagemap.d.ts +69 -0
- package/dist/types/internal/domain/content/entity/pagesource.d.ts +52 -0
- package/dist/types/internal/domain/content/entity/pagetrees.d.ts +12 -0
- package/dist/types/internal/domain/content/entity/paginator.d.ts +19 -0
- package/dist/types/internal/domain/content/entity/section.d.ts +15 -0
- package/dist/types/internal/domain/content/entity/shortcode.d.ts +39 -0
- package/dist/types/internal/domain/content/entity/standalone.d.ts +9 -0
- package/dist/types/internal/domain/content/entity/taxonomy.d.ts +15 -0
- package/dist/types/internal/domain/content/entity/term.d.ts +6 -0
- package/dist/types/internal/domain/content/entity/translator.d.ts +22 -0
- package/dist/types/internal/domain/content/type.d.ts +6 -0
- package/dist/types/internal/domain/content/vo/classifier.d.ts +24 -0
- package/dist/types/internal/domain/content/vo/frontmatter.d.ts +65 -0
- package/dist/types/internal/domain/content/vo/kind.d.ts +10 -0
- package/dist/types/internal/domain/fs/entity/basefs.d.ts +23 -0
- package/dist/types/internal/domain/fs/entity/fs.d.ts +13 -0
- package/dist/types/internal/domain/fs/entity/originfs.d.ts +6 -0
- package/dist/types/internal/domain/fs/entity/overlaydir.d.ts +44 -0
- package/dist/types/internal/domain/fs/entity/overlayfs.d.ts +79 -0
- package/dist/types/internal/domain/fs/entity/service.d.ts +15 -0
- package/dist/types/internal/domain/fs/factory/fs.d.ts +4 -0
- package/dist/types/internal/domain/fs/type.d.ts +95 -0
- package/dist/types/internal/domain/fs/vo/dir.d.ts +41 -0
- package/dist/types/internal/domain/fs/vo/file.d.ts +28 -0
- package/dist/types/internal/domain/fs/vo/fileinfo.d.ts +23 -0
- package/dist/types/internal/domain/fs/vo/filemeta.d.ts +45 -0
- package/dist/types/internal/domain/fs/vo/filesystemscollector.d.ts +17 -0
- package/dist/types/internal/domain/fs/vo/filevitural.d.ts +8 -0
- package/dist/types/internal/domain/fs/vo/osfs.d.ts +12 -0
- package/dist/types/internal/domain/fs/vo/overlay-factory.d.ts +4 -0
- package/dist/types/internal/domain/fs/vo/overlayfs-factory.d.ts +42 -0
- package/dist/types/internal/domain/fs/vo/overlayoptions.d.ts +44 -0
- package/dist/types/internal/domain/fs/vo/static-copier.d.ts +22 -0
- package/dist/types/internal/domain/fs/vo/walkway.d.ts +22 -0
- package/dist/types/internal/domain/identity/entity/user.d.ts +100 -0
- package/dist/types/internal/domain/identity/factory/user-factory.d.ts +183 -0
- package/dist/types/internal/domain/identity/repository/index.d.ts +30 -0
- package/dist/types/internal/domain/identity/type.d.ts +17 -0
- package/dist/types/internal/domain/identity/value-object/device.d.ts +26 -0
- package/dist/types/internal/domain/identity/value-object/email.d.ts +29 -0
- package/dist/types/internal/domain/identity/value-object/license.d.ts +91 -0
- package/dist/types/internal/domain/identity/value-object/server-config.d.ts +37 -0
- package/dist/types/internal/domain/identity/value-object/sync-config.d.ts +47 -0
- package/dist/types/internal/domain/identity/value-object/token.d.ts +35 -0
- package/dist/types/internal/domain/markdown/entity/markdown.d.ts +41 -0
- package/dist/types/internal/domain/markdown/factory/it/config.d.ts +60 -0
- package/dist/types/internal/domain/markdown/factory/it/index.d.ts +21 -1
- package/dist/types/internal/domain/markdown/factory/it/parserresult.d.ts +3 -0
- package/dist/types/internal/domain/markdown/factory/it/plugins/callout-plugin.d.ts +40 -0
- package/dist/types/internal/domain/markdown/factory/it/plugins/latex-plugin.d.ts +23 -0
- package/dist/types/internal/domain/markdown/factory/it/plugins/mermaid-plugin.d.ts +24 -0
- package/dist/types/internal/domain/markdown/factory/it/plugins/tag-plugin.d.ts +71 -0
- package/dist/types/internal/domain/markdown/factory/it/plugins/wikilink-plugin.d.ts +28 -0
- package/dist/types/internal/domain/markdown/factory/it/plugins/wikilink.d.ts +31 -0
- package/dist/types/internal/domain/markdown/factory/it/tableofcontents.d.ts +21 -0
- package/dist/types/internal/domain/markdown/factory/it/util/path.d.ts +11 -0
- package/dist/types/internal/domain/markdown/factory/it/util/slugger-fallback.d.ts +6 -0
- package/dist/types/internal/domain/markdown/type.d.ts +159 -0
- package/dist/types/internal/domain/markdown/vo/config.d.ts +48 -0
- package/dist/types/internal/domain/markdown/vo/content.d.ts +92 -0
- package/dist/types/internal/domain/markdown/vo/context.d.ts +9 -0
- package/dist/types/internal/domain/markdown/vo/highlight.d.ts +15 -0
- package/dist/types/internal/domain/markdown/vo/pageparser.d.ts +9 -0
- package/dist/types/internal/domain/markdown/vo/parseinfo.d.ts +36 -0
- package/dist/types/internal/domain/markdown/vo/parserresult.d.ts +6 -0
- package/dist/types/internal/domain/markdown/vo/shortcode.d.ts +31 -1
- package/dist/types/internal/domain/markdown/vo/tableofcontents.d.ts +21 -0
- package/dist/types/internal/domain/module/entity/lang.d.ts +12 -0
- package/dist/types/internal/domain/module/entity/module.d.ts +73 -0
- package/dist/types/internal/domain/module/factory/module.d.ts +6 -0
- package/dist/types/internal/domain/module/type.d.ts +58 -0
- package/dist/types/internal/domain/module/vo/cache.d.ts +48 -0
- package/dist/types/internal/domain/module/vo/httpclient.d.ts +14 -0
- package/dist/types/internal/domain/module/vo/module.d.ts +76 -0
- package/dist/types/internal/domain/module/vo/mount.d.ts +39 -0
- package/dist/types/internal/domain/module/vo/themes.d.ts +38 -0
- package/dist/types/internal/domain/module/vo/zipextractor.d.ts +31 -0
- package/dist/types/internal/domain/paths/entity/path.d.ts +28 -0
- package/dist/types/internal/domain/paths/factory/pathfactory.d.ts +82 -0
- package/dist/types/internal/domain/paths/type.d.ts +133 -1
- package/dist/types/internal/domain/paths/vo/pathcomponents.d.ts +94 -0
- package/dist/types/internal/domain/paths/vo/pathparser.d.ts +77 -0
- package/dist/types/internal/domain/publish/entity/publisher.d.ts +26 -0
- package/dist/types/internal/domain/publish/factory/publisher-factory.d.ts +17 -0
- package/dist/types/internal/domain/publish/repository/http-client.d.ts +21 -0
- package/dist/types/internal/domain/publish/repository/manifest-repository.d.ts +27 -0
- package/dist/types/internal/domain/publish/type.d.ts +49 -0
- package/dist/types/internal/domain/publish/value-object/ftp-publisher.d.ts +30 -0
- package/dist/types/internal/domain/publish/value-object/mdfriday-publisher.d.ts +57 -0
- package/dist/types/internal/domain/publish/value-object/netlify-publisher.d.ts +55 -0
- package/dist/types/internal/domain/publish/value-object/publish-config.d.ts +38 -0
- package/dist/types/internal/domain/publish/value-object/publish-manifest.d.ts +50 -0
- package/dist/types/internal/domain/resources/entity/http.d.ts +11 -0
- package/dist/types/internal/domain/resources/entity/integrity.d.ts +4 -0
- package/dist/types/internal/domain/resources/entity/minifier.d.ts +4 -0
- package/dist/types/internal/domain/resources/entity/publisher.d.ts +24 -0
- package/dist/types/internal/domain/resources/entity/resource.d.ts +4 -0
- package/dist/types/internal/domain/resources/entity/resources.d.ts +40 -0
- package/dist/types/internal/domain/resources/entity/template.d.ts +4 -0
- package/dist/types/internal/domain/resources/factory/resource.d.ts +4 -0
- package/dist/types/internal/domain/site/entity/language.d.ts +55 -0
- package/dist/types/internal/domain/site/entity/menu-builder.d.ts +50 -0
- package/dist/types/internal/domain/site/entity/navigation.d.ts +8 -0
- package/dist/types/internal/domain/site/entity/page.d.ts +88 -0
- package/dist/types/internal/domain/site/entity/pagegraph.d.ts +85 -0
- package/dist/types/internal/domain/site/entity/pager.d.ts +6 -0
- package/dist/types/internal/domain/site/entity/publisher.d.ts +26 -0
- package/dist/types/internal/domain/site/entity/ref.d.ts +27 -0
- package/dist/types/internal/domain/site/entity/site.d.ts +178 -0
- package/dist/types/internal/domain/site/factory/navigation-factory.d.ts +6 -0
- package/dist/types/internal/domain/site/factory/site.d.ts +4 -0
- package/dist/types/internal/domain/site/service/html-link-processor.d.ts +44 -0
- package/dist/types/internal/domain/site/type.d.ts +100 -0
- package/dist/types/internal/domain/site/valueobject/author.d.ts +16 -0
- package/dist/types/internal/domain/site/valueobject/baseurl.d.ts +39 -0
- package/dist/types/internal/domain/site/valueobject/menu.d.ts +49 -0
- package/dist/types/internal/domain/site/valueobject/organization.d.ts +37 -0
- package/dist/types/internal/domain/site/valueobject/path.d.ts +50 -0
- package/dist/types/internal/domain/site/valueobject/version.d.ts +14 -0
- package/dist/types/internal/domain/template/entity/executor.d.ts +22 -0
- package/dist/types/internal/domain/template/entity/lookup.d.ts +55 -0
- package/dist/types/internal/domain/template/entity/parser.d.ts +40 -0
- package/dist/types/internal/domain/template/entity/template.d.ts +87 -0
- package/dist/types/internal/domain/template/factory/template.d.ts +61 -0
- package/dist/types/internal/domain/template/type.d.ts +109 -0
- package/dist/types/internal/domain/template/vo/baseof.d.ts +47 -0
- package/dist/types/internal/domain/template/vo/info.d.ts +28 -0
- package/dist/types/internal/domain/template/vo/namespace.d.ts +91 -0
- package/dist/types/internal/domain/template/vo/registry.d.ts +160 -0
- package/dist/types/internal/domain/wiki/entity/concept.d.ts +31 -0
- package/dist/types/internal/domain/wiki/entity/connection.d.ts +29 -0
- package/dist/types/internal/domain/wiki/entity/conversation.d.ts +65 -0
- package/dist/types/internal/domain/wiki/entity/embedding-index.d.ts +60 -0
- package/dist/types/internal/domain/wiki/entity/entity.d.ts +32 -0
- package/dist/types/internal/domain/wiki/entity/knowledge-base.d.ts +292 -0
- package/dist/types/internal/domain/wiki/entity/operation-log.d.ts +82 -0
- package/dist/types/internal/domain/wiki/factory/wiki-factory.d.ts +41 -0
- package/dist/types/internal/domain/wiki/index.d.ts +22 -0
- package/dist/types/internal/domain/wiki/repository/conversation-repository.interface.d.ts +29 -0
- package/dist/types/internal/domain/wiki/repository/crypto-service.d.ts +16 -0
- package/dist/types/internal/domain/wiki/repository/embedding-provider.d.ts +12 -0
- package/dist/types/internal/domain/wiki/repository/file-system.d.ts +43 -0
- package/dist/types/internal/domain/wiki/repository/index.d.ts +14 -0
- package/dist/types/internal/domain/wiki/repository/kb-repository.interface.d.ts +30 -0
- package/dist/types/internal/domain/wiki/repository/llm-http-client.d.ts +40 -0
- package/dist/types/internal/domain/wiki/repository/llm-provider.d.ts +34 -0
- package/dist/types/internal/domain/wiki/repository/path-service.d.ts +32 -0
- package/dist/types/internal/domain/wiki/repository/wiki-page-repository.interface.d.ts +49 -0
- package/dist/types/internal/domain/wiki/value-object/connection-type.d.ts +24 -0
- package/dist/types/internal/domain/wiki/value-object/content-annotator.d.ts +61 -0
- package/dist/types/internal/domain/wiki/value-object/entity-id.d.ts +17 -0
- package/dist/types/internal/domain/wiki/value-object/entity-type.d.ts +24 -0
- package/dist/types/internal/domain/wiki/value-object/extraction-parser.d.ts +27 -0
- package/dist/types/internal/domain/wiki/value-object/extraction-result.d.ts +32 -0
- package/dist/types/internal/domain/wiki/value-object/retrieval.d.ts +228 -0
- package/dist/types/internal/domain/wiki/value-object/source-record.d.ts +17 -0
- package/dist/types/internal/domain/wiki/value-object/wiki-config.d.ts +40 -0
- package/dist/types/internal/domain/wiki/value-object/wiki-index-generator.d.ts +31 -0
- package/dist/types/internal/domain/wiki/value-object/wiki-page-renderer.d.ts +42 -0
- package/dist/types/internal/domain/workspace/entity/authentication.d.ts +29 -0
- package/dist/types/internal/domain/workspace/entity/project.d.ts +173 -0
- package/dist/types/internal/domain/workspace/entity/workspace.d.ts +85 -0
- package/dist/types/internal/domain/workspace/factory/workspace-factory.d.ts +107 -0
- package/dist/types/internal/domain/workspace/repository/file-system.d.ts +241 -0
- package/dist/types/internal/domain/workspace/repository/index.d.ts +6 -0
- package/dist/types/internal/domain/workspace/repository.d.ts +72 -0
- package/dist/types/internal/domain/workspace/type.d.ts +18 -0
- package/dist/types/internal/domain/workspace/value-object/folder-structure.d.ts +41 -0
- package/dist/types/internal/domain/workspace/value-object/project-metadata.d.ts +36 -0
- package/dist/types/internal/domain/workspace/value-object/workspace-metadata.d.ts +7 -0
- package/dist/types/internal/infrastructure/embedding/embedding-provider.interface.d.ts +33 -0
- package/dist/types/internal/infrastructure/embedding/index.d.ts +5 -0
- package/dist/types/internal/infrastructure/embedding/ollama-embedding-provider.d.ts +24 -0
- package/dist/types/internal/infrastructure/http/netlify-http-client.d.ts +20 -0
- package/dist/types/internal/infrastructure/http/node-http-client.d.ts +3 -0
- package/dist/types/internal/infrastructure/index.d.ts +8 -0
- package/dist/types/internal/infrastructure/llm/fetch-http-client.d.ts +24 -0
- package/dist/types/internal/infrastructure/llm/index.d.ts +6 -0
- package/dist/types/internal/infrastructure/llm/llm-config.d.ts +80 -0
- package/dist/types/internal/infrastructure/llm/lmstudio-provider.d.ts +55 -0
- package/dist/types/internal/infrastructure/llm/node-llm-http-client.d.ts +21 -0
- package/dist/types/internal/infrastructure/llm/ollama-provider.d.ts +17 -0
- package/dist/types/internal/infrastructure/llm/openai-compatible-provider.d.ts +70 -0
- package/dist/types/internal/infrastructure/llm/provider-factory.d.ts +36 -0
- package/dist/types/internal/infrastructure/llm/provider.d.ts +77 -0
- package/dist/types/internal/infrastructure/node/index.d.ts +11 -0
- package/dist/types/internal/infrastructure/node/node-conversation-repository.d.ts +21 -0
- package/dist/types/internal/infrastructure/node/node-crypto-service.d.ts +10 -0
- package/dist/types/internal/infrastructure/node/node-file-system.d.ts +29 -0
- package/dist/types/internal/infrastructure/node/node-kb-repository.d.ts +18 -0
- package/dist/types/internal/infrastructure/node/node-path-service.d.ts +14 -0
- package/dist/types/internal/infrastructure/node/node-wiki-page-repository.d.ts +25 -0
- package/dist/types/internal/infrastructure/persistence/node-file-system.d.ts +8 -0
- package/dist/types/internal/infrastructure/persistence/node-manifest-repository.d.ts +31 -0
- package/dist/types/internal/infrastructure/persistence/node-snapshot-repository.d.ts +28 -0
- package/dist/types/internal/infrastructure/persistence/node-workspace-repository.d.ts +9 -0
- package/dist/types/pkg/cahce/cache.d.ts +56 -0
- package/dist/types/pkg/lang/data.d.ts +21 -0
- package/dist/types/pkg/lang/index.d.ts +46 -0
- package/dist/types/pkg/lang/service.d.ts +49 -0
- package/dist/types/pkg/lang/types.d.ts +29 -0
- package/dist/types/pkg/log/http.d.ts +16 -0
- package/dist/types/pkg/log/manager.d.ts +57 -0
- package/dist/types/pkg/maps/scratch.d.ts +25 -0
- package/dist/types/pkg/md/parser/item.d.ts +3 -3
- package/dist/types/pkg/media/type.d.ts +19 -0
- package/dist/types/pkg/page-filter/index.d.ts +29 -0
- package/dist/types/pkg/paths/index.d.ts +9 -0
- package/dist/types/pkg/text/index.d.ts +4 -0
- package/dist/types/pkg/web/server/livereload-server.d.ts +7 -0
- package/dist/types/pkg/web/watcher/content-file-watcher.d.ts +3 -0
- package/package.json +21 -15
- package/dist/types/index.d.ts +0 -20
- package/dist/types/internal/interfaces/obsidian/adapters/identity-adapter.d.ts +0 -5
- package/dist/types/internal/interfaces/obsidian/adapters/index.d.ts +0 -2
- package/dist/types/internal/interfaces/obsidian/adapters/workspace-adapter.d.ts +0 -8
- package/dist/types/internal/interfaces/obsidian/desktop/adapters/identity-adapter.d.ts +0 -6
- package/dist/types/internal/interfaces/obsidian/desktop/adapters/index.d.ts +0 -2
- package/dist/types/internal/interfaces/obsidian/desktop/adapters/workspace-adapter.d.ts +0 -12
- package/dist/types/internal/interfaces/obsidian/desktop/container.d.ts +0 -7
- package/dist/types/internal/interfaces/obsidian/desktop/index.d.ts +0 -22
- package/dist/types/internal/interfaces/obsidian/index.d.ts +0 -7
- package/dist/types/internal/interfaces/obsidian/mobile/adapters/identity-adapter.d.ts +0 -9
- package/dist/types/internal/interfaces/obsidian/mobile/adapters/index.d.ts +0 -2
- package/dist/types/internal/interfaces/obsidian/mobile/adapters/workspace-adapter.d.ts +0 -13
- package/dist/types/internal/interfaces/obsidian/mobile/config-types.d.ts +0 -13
- package/dist/types/internal/interfaces/obsidian/mobile/container.d.ts +0 -6
- package/dist/types/internal/interfaces/obsidian/mobile/index.d.ts +0 -16
- package/dist/types/internal/interfaces/obsidian/mobile.d.ts +0 -2
- package/dist/types/internal/interfaces/obsidian/services/auth.service.d.ts +0 -11
- package/dist/types/internal/interfaces/obsidian/services/build.service.d.ts +0 -9
- package/dist/types/internal/interfaces/obsidian/services/config.service.d.ts +0 -31
- package/dist/types/internal/interfaces/obsidian/services/domain.service.d.ts +0 -15
- package/dist/types/internal/interfaces/obsidian/services/license.service.d.ts +0 -22
- package/dist/types/internal/interfaces/obsidian/services/project.service.d.ts +0 -17
- package/dist/types/internal/interfaces/obsidian/services/publish.service.d.ts +0 -11
- package/dist/types/internal/interfaces/obsidian/services/serve.service.d.ts +0 -18
- package/dist/types/internal/interfaces/obsidian/services/workspace.service.d.ts +0 -10
- package/dist/types/internal/interfaces/obsidian/types/auth.d.ts +0 -27
- package/dist/types/internal/interfaces/obsidian/types/build.d.ts +0 -23
- package/dist/types/internal/interfaces/obsidian/types/config.d.ts +0 -16
- package/dist/types/internal/interfaces/obsidian/types/domain.d.ts +0 -46
- package/dist/types/internal/interfaces/obsidian/types/index.d.ts +0 -9
- package/dist/types/internal/interfaces/obsidian/types/license.d.ts +0 -87
- package/dist/types/internal/interfaces/obsidian/types/project.d.ts +0 -56
- package/dist/types/internal/interfaces/obsidian/types/publish.d.ts +0 -33
- package/dist/types/internal/interfaces/obsidian/types/serve.d.ts +0 -46
- package/dist/types/internal/interfaces/obsidian/types/workspace.d.ts +0 -27
- package/dist/types/pkg/log/browser-manager.d.ts +0 -20
- package/dist/types/pkg/log/browser.d.ts +0 -25
- package/dist/types/pkg/media/buildin.d.ts +0 -3
|
@@ -1,27 +1,82 @@
|
|
|
1
1
|
import { LanguageService, Collator } from '../type';
|
|
2
|
+
/**
|
|
3
|
+
* Language - TypeScript equivalent of Go's Language entity
|
|
4
|
+
* Handles multi-language functionality
|
|
5
|
+
*/
|
|
2
6
|
export declare class Language {
|
|
3
7
|
private langSvc;
|
|
4
8
|
private currentLocation;
|
|
5
9
|
private currentLanguage;
|
|
6
10
|
private collator;
|
|
7
11
|
constructor(langSvc: LanguageService);
|
|
12
|
+
/**
|
|
13
|
+
* Get current language index
|
|
14
|
+
* TypeScript equivalent of CurrentLanguageIndex method from Go
|
|
15
|
+
*/
|
|
8
16
|
currentLanguageIndex(): number;
|
|
17
|
+
/**
|
|
18
|
+
* Setup language configuration
|
|
19
|
+
* TypeScript equivalent of setup method from Go
|
|
20
|
+
*/
|
|
9
21
|
setup(): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Get all available languages
|
|
24
|
+
* TypeScript equivalent of Languages method from Go
|
|
25
|
+
*/
|
|
10
26
|
languages(): Language[];
|
|
27
|
+
/**
|
|
28
|
+
* Get collator for string comparison
|
|
29
|
+
* TypeScript equivalent of Collator method from Go
|
|
30
|
+
*/
|
|
11
31
|
getCollator(): Collator;
|
|
32
|
+
/**
|
|
33
|
+
* Get current location (timezone)
|
|
34
|
+
* TypeScript equivalent of Location method from Go
|
|
35
|
+
*/
|
|
12
36
|
location(): string;
|
|
37
|
+
/**
|
|
38
|
+
* Check if site has multiple languages
|
|
39
|
+
* TypeScript equivalent of isMultipleLanguage method from Go
|
|
40
|
+
*/
|
|
13
41
|
isMultipleLanguage(): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Get language prefix for URLs
|
|
44
|
+
* TypeScript equivalent of LanguagePrefix method from Go
|
|
45
|
+
*/
|
|
14
46
|
languagePrefix(): string;
|
|
47
|
+
/**
|
|
48
|
+
* Get current language code
|
|
49
|
+
* TypeScript equivalent of Lang method from Go
|
|
50
|
+
*/
|
|
15
51
|
lang(): string;
|
|
16
52
|
get Lang(): string;
|
|
53
|
+
/**
|
|
54
|
+
* Get current language name
|
|
55
|
+
* TypeScript equivalent of LanguageName method from Go
|
|
56
|
+
*/
|
|
17
57
|
languageName(): string;
|
|
18
58
|
get LanguageName(): string;
|
|
59
|
+
/**
|
|
60
|
+
* Get default language name
|
|
61
|
+
* TypeScript equivalent of DefaultLanguageName method from Go
|
|
62
|
+
*/
|
|
19
63
|
defaultLanguageName(): string;
|
|
64
|
+
/**
|
|
65
|
+
* Get language code (alias for lang)
|
|
66
|
+
* TypeScript equivalent of LanguageCode method from Go
|
|
67
|
+
*/
|
|
20
68
|
languageCode(): string;
|
|
21
69
|
get LanguageCode(): string;
|
|
22
70
|
get LanguageDirection(): string;
|
|
71
|
+
/**
|
|
72
|
+
* Get language direction
|
|
73
|
+
* TypeScript equivalent of LanguageDirection method from Go
|
|
74
|
+
*/
|
|
23
75
|
languageDirection(): string;
|
|
24
76
|
setCurrentLanguage(lang: string): void;
|
|
25
77
|
getCurrentLanguage(): string;
|
|
78
|
+
/**
|
|
79
|
+
* Set current location/timezone
|
|
80
|
+
*/
|
|
26
81
|
setCurrentLocation(location: string): void;
|
|
27
82
|
}
|
|
@@ -1,19 +1,69 @@
|
|
|
1
1
|
import { Menus } from '../valueobject/menu';
|
|
2
2
|
import { ContentService } from '../type';
|
|
3
3
|
import { Site } from "@internal/domain/site/entity/site";
|
|
4
|
+
/**
|
|
5
|
+
* MenuBuilder - Entity responsible for building menus from frontmatter menu configurations
|
|
6
|
+
*
|
|
7
|
+
* This builder processes page frontmatter to extract menu configurations and builds
|
|
8
|
+
* hierarchical menu structures. It supports:
|
|
9
|
+
* - Multiple menu sections (nav, footer, etc.)
|
|
10
|
+
* - Menu merging across multiple files
|
|
11
|
+
* - Weight-based sorting
|
|
12
|
+
* - Smart URL generation:
|
|
13
|
+
* - Empty URLs: Uses page permalink via site.sitePage().Permalink
|
|
14
|
+
* - Non-empty URLs: Processed through site.getURL().relURL()
|
|
15
|
+
* - Disabled menu sections (menu: [] or menu: false)
|
|
16
|
+
*/
|
|
4
17
|
export declare class MenuBuilder {
|
|
5
18
|
private readonly contentService;
|
|
6
19
|
private readonly site;
|
|
7
20
|
constructor(contentService: ContentService, site: Site);
|
|
21
|
+
/**
|
|
22
|
+
* Build menus for a specific language from frontmatter configurations
|
|
23
|
+
*
|
|
24
|
+
* Walks through all pages and extracts menu configurations from their frontmatter.
|
|
25
|
+
* Merges menu items from multiple files, handles weight-based sorting, and
|
|
26
|
+
* auto-generates URLs for empty URL fields.
|
|
27
|
+
*/
|
|
8
28
|
buildMenusForLanguage(langIndex: number): Promise<Menus>;
|
|
29
|
+
/**
|
|
30
|
+
* Process a single page and update menu structure based on frontmatter menu configuration
|
|
31
|
+
*/
|
|
9
32
|
private processPage;
|
|
33
|
+
/**
|
|
34
|
+
* Process a menu section (nav, footer, etc.) from frontmatter
|
|
35
|
+
*/
|
|
10
36
|
private processMenuSection;
|
|
37
|
+
/**
|
|
38
|
+
* Process menu items array and merge into menu structure
|
|
39
|
+
*/
|
|
11
40
|
private processMenuItems;
|
|
41
|
+
/**
|
|
42
|
+
* Process children menu items
|
|
43
|
+
*/
|
|
12
44
|
private processChildrenItems;
|
|
45
|
+
/**
|
|
46
|
+
* Generate page URL using site's sitePage method to get permalink
|
|
47
|
+
*/
|
|
13
48
|
private generatePageUrl;
|
|
49
|
+
/**
|
|
50
|
+
* Process menu item URL through site.getURL().relURL()
|
|
51
|
+
*/
|
|
14
52
|
private processMenuItemUrl;
|
|
53
|
+
/**
|
|
54
|
+
* Fallback URL generation from path (used when site page conversion fails)
|
|
55
|
+
*/
|
|
15
56
|
private fallbackUrlFromPath;
|
|
57
|
+
/**
|
|
58
|
+
* Convert MenuStructure map to Menus, grouped by menu name
|
|
59
|
+
*/
|
|
16
60
|
private convertToMenus;
|
|
61
|
+
/**
|
|
62
|
+
* Capitalize first letter of a string
|
|
63
|
+
*/
|
|
17
64
|
private capitalizeFirstLetter;
|
|
65
|
+
/**
|
|
66
|
+
* Recursively build Menu items from MenuStructure
|
|
67
|
+
*/
|
|
18
68
|
private buildMenuItems;
|
|
19
69
|
}
|
|
@@ -3,6 +3,10 @@ import { LanguageService } from '../type';
|
|
|
3
3
|
import { Menus } from '../valueobject/menu';
|
|
4
4
|
import { MenuBuilder } from './menu-builder';
|
|
5
5
|
import { TaxonomyList, TaxonomiesBuilder } from "./taxonomies-builder";
|
|
6
|
+
/**
|
|
7
|
+
* Navigation - TypeScript equivalent of Go's Navigation entity
|
|
8
|
+
* Handles navigation and taxonomy functionality with menu generation support
|
|
9
|
+
*/
|
|
6
10
|
export declare class Navigation {
|
|
7
11
|
private taxonomies;
|
|
8
12
|
private taxonomiesBuilder;
|
|
@@ -18,4 +22,8 @@ export declare class Navigation {
|
|
|
18
22
|
getMenus(lang: string): Menus;
|
|
19
23
|
getTaxonomies(lang: string): TaxonomyList | undefined;
|
|
20
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Factory function to create new Navigation
|
|
27
|
+
* TypeScript equivalent of NewNavigation function from Go
|
|
28
|
+
*/
|
|
21
29
|
export declare function newNavigation(langSvc: LanguageService): Navigation;
|
|
@@ -4,6 +4,10 @@ import { Site } from './site';
|
|
|
4
4
|
import { Publisher } from './publisher';
|
|
5
5
|
import { SitePager } from "./pager";
|
|
6
6
|
import { Scratch } from "@pkg/maps/scratch";
|
|
7
|
+
/**
|
|
8
|
+
* Site Page - TypeScript equivalent of Go's Page entity in domain/site/entity/page.go
|
|
9
|
+
* This wraps the content layer's Page and provides site-specific functionality
|
|
10
|
+
*/
|
|
7
11
|
export declare class Page implements ContentPage, PageMeta {
|
|
8
12
|
private tmplSvc;
|
|
9
13
|
private langSvc;
|
|
@@ -16,18 +20,60 @@ export declare class Page implements ContentPage, PageMeta {
|
|
|
16
20
|
private _processedContent;
|
|
17
21
|
private _precomputedData;
|
|
18
22
|
constructor(tmplSvc: Template, langSvc: LanguageService, publisher: Publisher, contentPage: ContentPage, site: Site);
|
|
23
|
+
/**
|
|
24
|
+
* ⭐ 预计算模板需要的数据
|
|
25
|
+
* 在渲染前调用,可以并行执行
|
|
26
|
+
*/
|
|
19
27
|
precomputeTemplateData(): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* 预计算 Backlinks
|
|
30
|
+
*/
|
|
20
31
|
private precomputeBacklinks;
|
|
32
|
+
/**
|
|
33
|
+
* 预计算 TableOfContents
|
|
34
|
+
*/
|
|
21
35
|
private precomputeTableOfContents;
|
|
36
|
+
/**
|
|
37
|
+
* 预计算 Summary
|
|
38
|
+
*/
|
|
22
39
|
private precomputeSummary;
|
|
40
|
+
/**
|
|
41
|
+
* Process page resources
|
|
42
|
+
*/
|
|
23
43
|
processResources(pageSources: PageSource[]): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Render the page - main entry point for page rendering
|
|
46
|
+
*/
|
|
24
47
|
render(): Promise<void>;
|
|
25
48
|
getPageOutput(): PageOutput;
|
|
49
|
+
/**
|
|
50
|
+
* Render page content to HTML
|
|
51
|
+
* TypeScript equivalent of renderPage method from Go
|
|
52
|
+
*/
|
|
26
53
|
renderPage(): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Render and write page content to files
|
|
56
|
+
* TypeScript equivalent of renderAndWritePage method from Go
|
|
57
|
+
*/
|
|
27
58
|
private renderAndWritePage;
|
|
59
|
+
/**
|
|
60
|
+
* Render page resources
|
|
61
|
+
* TypeScript equivalent of renderResources method from Go
|
|
62
|
+
*/
|
|
28
63
|
renderResources(): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Create formatted error with context
|
|
66
|
+
* TypeScript equivalent of errorf method from Go
|
|
67
|
+
*/
|
|
29
68
|
private errorf;
|
|
69
|
+
/**
|
|
70
|
+
* Simple sprintf implementation
|
|
71
|
+
*/
|
|
30
72
|
private sprintf;
|
|
73
|
+
/**
|
|
74
|
+
* Clone the page
|
|
75
|
+
* TypeScript equivalent of clone method from Go
|
|
76
|
+
*/
|
|
31
77
|
clone(): Page;
|
|
32
78
|
pageIdentity(): import("@internal/domain/content").PageIdentity;
|
|
33
79
|
pageFile(): import("@internal/domain/content").File;
|
|
@@ -35,6 +81,10 @@ export declare class Page implements ContentPage, PageMeta {
|
|
|
35
81
|
section(): string;
|
|
36
82
|
paths(): import("../../paths").Path;
|
|
37
83
|
path(): string;
|
|
84
|
+
/**
|
|
85
|
+
* Get page slug for PageGraph (Quartz-compatible format)
|
|
86
|
+
* Delegates to content page's slug() method
|
|
87
|
+
*/
|
|
38
88
|
slug(): string;
|
|
39
89
|
file(): import("@internal/domain/content").File;
|
|
40
90
|
name(): string;
|
|
@@ -49,11 +99,37 @@ export declare class Page implements ContentPage, PageMeta {
|
|
|
49
99
|
get IsSection(): boolean;
|
|
50
100
|
get IsPage(): boolean;
|
|
51
101
|
get Content(): Promise<any>;
|
|
102
|
+
/**
|
|
103
|
+
* Get content with wikilinks processed
|
|
104
|
+
* This is the async version that processes wikilinks after all other content processing
|
|
105
|
+
*
|
|
106
|
+
* Usage in template:
|
|
107
|
+
* {{ .WikilinkContent }}
|
|
108
|
+
*/
|
|
52
109
|
WikilinkContent(): Promise<any>;
|
|
53
110
|
Summary(): Promise<string>;
|
|
54
111
|
ReadingTime(): Promise<number>;
|
|
55
112
|
WordCount(): Promise<number>;
|
|
113
|
+
/**
|
|
114
|
+
* Get backlinks for this page (pages that link to this page)
|
|
115
|
+
* ⭐ 优先使用预计算的缓存
|
|
116
|
+
*
|
|
117
|
+
* @returns Array of Page objects that link to this page
|
|
118
|
+
*
|
|
119
|
+
* Usage in template:
|
|
120
|
+
* {{ range .Backlinks }}
|
|
121
|
+
* <a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
|
122
|
+
* {{ end }}
|
|
123
|
+
*
|
|
124
|
+
* Based on Quartz Backlinks.tsx line 27:
|
|
125
|
+
* const backlinkFiles = allFiles.filter((file) => file.links?.includes(slug))
|
|
126
|
+
*/
|
|
56
127
|
Backlinks(): Promise<Page[]>;
|
|
128
|
+
/**
|
|
129
|
+
* Returns the outgoing links from the current page.
|
|
130
|
+
* These are populated by HtmlLinkProcessor during wikilink processing.
|
|
131
|
+
* Used by Graph component to build the knowledge graph.
|
|
132
|
+
*/
|
|
57
133
|
OutgoingLinks(): string[];
|
|
58
134
|
get Description(): string;
|
|
59
135
|
get Date(): Date;
|
|
@@ -135,7 +211,15 @@ export declare class Page implements ContentPage, PageMeta {
|
|
|
135
211
|
Weight: number;
|
|
136
212
|
};
|
|
137
213
|
get Permalink(): string;
|
|
214
|
+
/**
|
|
215
|
+
* Site page conversion - convert content pages to site pages
|
|
216
|
+
* Equivalent to golang's func (p *Page) sitePages(ps contenthub.Pages) []*Page
|
|
217
|
+
*/
|
|
138
218
|
sitePages(ps: ContentPage[]): Page[];
|
|
219
|
+
/**
|
|
220
|
+
* Convert single content page to site page
|
|
221
|
+
* Equivalent to golang's func (p *Page) sitePage(cp contenthub.Page) (*Page, error)
|
|
222
|
+
*/
|
|
139
223
|
private sitePage;
|
|
140
224
|
private pathJoin;
|
|
141
225
|
private joinURL;
|
|
@@ -146,5 +230,9 @@ export declare class Page implements ContentPage, PageMeta {
|
|
|
146
230
|
get Kind(): string;
|
|
147
231
|
get Type(): string;
|
|
148
232
|
get Parent(): Page | null;
|
|
233
|
+
/**
|
|
234
|
+
* Get site pages method - following Go's Page.Pages() pattern
|
|
235
|
+
* Equivalent to golang's func (p *Page) Pages() []*Page
|
|
236
|
+
*/
|
|
149
237
|
getSitePages(): Promise<Page[]>;
|
|
150
238
|
}
|
|
@@ -1,15 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PageGraph Entity - Simplified version following Quartz's approach
|
|
3
|
+
*
|
|
4
|
+
* Unlike complex graph structures, Quartz simply maintains:
|
|
5
|
+
* 1. An array of all slugs (for link resolution) - includes BOTH pages AND resources
|
|
6
|
+
* 2. A map of slug → outgoing links (for backlinks)
|
|
7
|
+
*
|
|
8
|
+
* Key insight from Quartz (build.ts Line 74-82):
|
|
9
|
+
* - allSlugs contains ALL files (pages + images + videos + etc.)
|
|
10
|
+
* - This enables "shortest" resolution for resources like images
|
|
11
|
+
* - Example: "pic.png" resolves to "images/pic.png" via allSlugs lookup
|
|
12
|
+
*
|
|
13
|
+
* This simplified approach:
|
|
14
|
+
* - Reduces memory footprint
|
|
15
|
+
* - Simplifies maintenance
|
|
16
|
+
* - Directly reuses Quartz's transformLink logic
|
|
17
|
+
* - Enables efficient backlinks computation
|
|
18
|
+
* - Supports wikilink image resolution (following Quartz)
|
|
19
|
+
*/
|
|
1
20
|
import { LinkStrategy } from '../valueobject/path';
|
|
21
|
+
/**
|
|
22
|
+
* PageGraph - Site-wide knowledge for wikilink resolution and backlinks
|
|
23
|
+
*
|
|
24
|
+
* Maintains:
|
|
25
|
+
* - A list of all page AND resource slugs in the site (following Quartz)
|
|
26
|
+
* - A map of each page's outgoing links
|
|
27
|
+
*
|
|
28
|
+
* Used by:
|
|
29
|
+
* - HtmlLinkProcessor to resolve wikilinks during Pass 2
|
|
30
|
+
* - Backlinks component to find pages linking to current page
|
|
31
|
+
* - Resource resolution for images/videos (via "shortest" strategy)
|
|
32
|
+
*/
|
|
2
33
|
export declare class PageGraph {
|
|
3
34
|
private allSlugs;
|
|
35
|
+
/** Map of page slug → outgoing links (simplified slugs) */
|
|
4
36
|
private outgoingLinks;
|
|
5
37
|
constructor(slugs: string[]);
|
|
38
|
+
/**
|
|
39
|
+
* Register outgoing links for a page (called during Pass 2)
|
|
40
|
+
* Based on Quartz links.ts line 162: file.data.links = [...outgoing]
|
|
41
|
+
*
|
|
42
|
+
* @param srcSlug - Source page slug
|
|
43
|
+
* @param links - Array of target slugs (simplified)
|
|
44
|
+
*/
|
|
6
45
|
registerOutgoingLinks(srcSlug: string, links: string[]): void;
|
|
46
|
+
/**
|
|
47
|
+
* Get pages that link to the specified page (backlinks)
|
|
48
|
+
* Based on Quartz Backlinks.tsx line 27:
|
|
49
|
+
* const backlinkFiles = allFiles.filter((file) => file.links?.includes(slug))
|
|
50
|
+
*
|
|
51
|
+
* @param targetSlug - Target page slug
|
|
52
|
+
* @returns Array of source page slugs that link to target
|
|
53
|
+
*
|
|
54
|
+
* Example:
|
|
55
|
+
* - If page "posts/a" links to "posts/b"
|
|
56
|
+
* - getBacklinks("posts/b") returns ["posts/a"]
|
|
57
|
+
*/
|
|
7
58
|
getBacklinks(targetSlug: string): string[];
|
|
59
|
+
/**
|
|
60
|
+
* Get all slugs in the site
|
|
61
|
+
* Used by transformLink for resolution
|
|
62
|
+
*/
|
|
8
63
|
getAllSlugs(): string[];
|
|
64
|
+
/**
|
|
65
|
+
* Check if a slug exists in the site
|
|
66
|
+
* Used for broken link detection
|
|
67
|
+
*/
|
|
9
68
|
hasSlug(slug: string): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Resolve wikilink using Quartz's transformLink logic
|
|
71
|
+
*
|
|
72
|
+
* @param srcSlug - Source page slug (e.g., "posts/my-post")
|
|
73
|
+
* @param targetLink - Target link from wikilink (e.g., "another-post" or "notes/page")
|
|
74
|
+
* @param strategy - Resolution strategy ('shortest' | 'absolute' | 'relative')
|
|
75
|
+
* @returns Resolved relative URL
|
|
76
|
+
*
|
|
77
|
+
* Examples:
|
|
78
|
+
* - resolveLink("posts/a", "b", "shortest") → "../b" (if "b" is unique)
|
|
79
|
+
* - resolveLink("posts/a", "notes/b", "absolute") → "../notes/b"
|
|
80
|
+
* - resolveLink("posts/a", "./b", "relative") → "./b"
|
|
81
|
+
*/
|
|
10
82
|
resolveLink(srcSlug: string, targetLink: string, strategy: LinkStrategy): string;
|
|
83
|
+
/**
|
|
84
|
+
* Get outgoing links for a page
|
|
85
|
+
* @param srcSlug - Source page slug
|
|
86
|
+
* @returns Array of simplified target slugs
|
|
87
|
+
*/
|
|
11
88
|
getOutgoingLinks(srcSlug: string): string[];
|
|
89
|
+
/**
|
|
90
|
+
* Get all outgoing links as a map
|
|
91
|
+
* Used for Graph visualization
|
|
92
|
+
* @returns Map of slug → outgoing links
|
|
93
|
+
*/
|
|
12
94
|
getAllOutgoingLinks(): Map<string, string[]>;
|
|
95
|
+
/**
|
|
96
|
+
* Get statistics about the page graph
|
|
97
|
+
*/
|
|
13
98
|
getStats(): {
|
|
14
99
|
totalPages: number;
|
|
15
100
|
slugs: string[];
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { Pager } from "@internal/domain/content";
|
|
2
2
|
import { Page } from "@internal/domain/site/entity/page";
|
|
3
|
+
/**
|
|
4
|
+
* TypeScript equivalent of Go's SitePager struct
|
|
5
|
+
* This implements the Pager interface and wraps the content layer's Pager
|
|
6
|
+
* Equivalent to golang's type SitePager struct in domain/site/entity/paginator.go
|
|
7
|
+
* Following the same pattern as site.Page implements ContentPage
|
|
8
|
+
*/
|
|
3
9
|
export declare class SitePager implements Pager {
|
|
4
10
|
private page;
|
|
5
11
|
private pager;
|
|
@@ -1,12 +1,38 @@
|
|
|
1
1
|
import { Fs, File } from '../../fs/type';
|
|
2
2
|
import { ReadableStream } from 'stream/web';
|
|
3
|
+
/**
|
|
4
|
+
* Publisher publishes a result file
|
|
5
|
+
* TypeScript equivalent of Publisher struct from Go
|
|
6
|
+
*/
|
|
3
7
|
export declare class Publisher {
|
|
4
8
|
private fs;
|
|
5
9
|
constructor(fs: Fs);
|
|
10
|
+
/**
|
|
11
|
+
* PublishSource publishes content from a source buffer to files
|
|
12
|
+
* TypeScript equivalent of PublishSource method from Go
|
|
13
|
+
*/
|
|
6
14
|
publishSource(src: Uint8Array | string, ...filenames: string[]): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* PublishFiles publishes content from a readable source to files
|
|
17
|
+
* TypeScript equivalent of PublishFiles method from Go
|
|
18
|
+
*/
|
|
7
19
|
publishFiles(src: ReadableStream<Uint8Array>, ...filenames: string[]): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Helper method to open multiple files for writing using a MultiWriter approach
|
|
22
|
+
*/
|
|
8
23
|
private openFilesForWriting;
|
|
24
|
+
/**
|
|
25
|
+
* Copy Uint8Array content to writer
|
|
26
|
+
*/
|
|
9
27
|
private copyToWriter;
|
|
28
|
+
/**
|
|
29
|
+
* Copy ReadableStream content to writer
|
|
30
|
+
*/
|
|
10
31
|
private copyStreamToWriter;
|
|
11
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* OpenFileForWriting opens or creates the given file. If the target directory
|
|
35
|
+
* does not exist, it gets created.
|
|
36
|
+
* TypeScript equivalent of OpenFileForWriting function from Go
|
|
37
|
+
*/
|
|
12
38
|
export declare function openFileForWriting(fs: Fs, filename: string): Promise<File>;
|
|
@@ -1,13 +1,40 @@
|
|
|
1
1
|
import { ContentService, RefSite } from '../type';
|
|
2
|
+
/**
|
|
3
|
+
* Ref - TypeScript equivalent of Go's Ref entity
|
|
4
|
+
* Handles page references and link generation
|
|
5
|
+
*/
|
|
2
6
|
export declare class Ref {
|
|
3
7
|
private site;
|
|
4
8
|
private contentSvc;
|
|
5
9
|
private notFoundURL;
|
|
6
10
|
constructor(site: RefSite, contentSvc: ContentService, notFoundURL?: string);
|
|
11
|
+
/**
|
|
12
|
+
* Generate relative reference from arguments
|
|
13
|
+
* TypeScript equivalent of RelRefFrom method from Go
|
|
14
|
+
*/
|
|
7
15
|
relRefFrom(argsm: Record<string, any>, source: any): Promise<string>;
|
|
16
|
+
/**
|
|
17
|
+
* Generate relative reference
|
|
18
|
+
* TypeScript equivalent of relRef method from Go
|
|
19
|
+
*/
|
|
8
20
|
private relRef;
|
|
21
|
+
/**
|
|
22
|
+
* Decode reference arguments
|
|
23
|
+
* TypeScript equivalent of decodeRefArgs method from Go
|
|
24
|
+
*/
|
|
9
25
|
private decodeRefArgs;
|
|
26
|
+
/**
|
|
27
|
+
* Generate reference link
|
|
28
|
+
* TypeScript equivalent of refLink method from Go
|
|
29
|
+
*/
|
|
10
30
|
private refLink;
|
|
31
|
+
/**
|
|
32
|
+
* Check if source is a Positioner
|
|
33
|
+
*/
|
|
11
34
|
private isPositioner;
|
|
35
|
+
/**
|
|
36
|
+
* Log not found error
|
|
37
|
+
* TypeScript equivalent of logNotFound method from Go
|
|
38
|
+
*/
|
|
12
39
|
private logNotFound;
|
|
13
40
|
}
|