@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,24 +1,67 @@
|
|
|
1
1
|
import { WorkerTask, WorkerResponse } from './worker-main';
|
|
2
|
+
/**
|
|
3
|
+
* Worker 池配置
|
|
4
|
+
*/
|
|
2
5
|
export interface WorkerPoolConfig {
|
|
3
6
|
workerCount?: number;
|
|
4
7
|
maxQueueSize?: number;
|
|
5
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Worker 环境类型
|
|
11
|
+
*/
|
|
6
12
|
export type WorkerEnvironment = 'node' | 'browser';
|
|
13
|
+
/**
|
|
14
|
+
* Worker 池管理器
|
|
15
|
+
* 负责创建和管理 Worker 池,支持 Node.js 和浏览器环境
|
|
16
|
+
*/
|
|
7
17
|
export declare class WorkerPoolManager {
|
|
8
18
|
private pool;
|
|
9
19
|
private environment;
|
|
10
20
|
private workerCount;
|
|
11
21
|
constructor(config?: WorkerPoolConfig);
|
|
22
|
+
/**
|
|
23
|
+
* 检测当前运行环境
|
|
24
|
+
*
|
|
25
|
+
* 优先检测 Worker 支持能力,而不仅仅依赖 process 对象的存在
|
|
26
|
+
* 这样可以正确识别 Electron/Obsidian 环境(有 Node.js API 但只支持 Web Workers)
|
|
27
|
+
*/
|
|
12
28
|
private detectEnvironment;
|
|
29
|
+
/**
|
|
30
|
+
* 计算最佳 Worker 数量
|
|
31
|
+
*/
|
|
13
32
|
private calculateOptimalWorkerCount;
|
|
33
|
+
/**
|
|
34
|
+
* 初始化 Worker 池
|
|
35
|
+
*
|
|
36
|
+
* 包含回退机制:如果 Node.js Worker Threads 初始化失败,
|
|
37
|
+
* 自动回退到 Web Workers(用于 Electron/Obsidian 等环境)
|
|
38
|
+
*/
|
|
14
39
|
initialize(): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* 初始化 Node.js Worker 池
|
|
42
|
+
*/
|
|
15
43
|
private initializeNodePool;
|
|
44
|
+
/**
|
|
45
|
+
* 初始化浏览器 Worker 池
|
|
46
|
+
*
|
|
47
|
+
* 在浏览器环境中,我们不使用文件,而是直接传递函数给 workerpool
|
|
48
|
+
* workerpool 会自动将函数序列化并在 Worker 中执行
|
|
49
|
+
*/
|
|
16
50
|
private initializeBrowserPool;
|
|
51
|
+
/**
|
|
52
|
+
* 执行 Worker 任务
|
|
53
|
+
*/
|
|
17
54
|
exec(task: WorkerTask): Promise<WorkerResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* 获取池统计信息
|
|
57
|
+
*/
|
|
18
58
|
getStats(): {
|
|
19
59
|
environment: WorkerEnvironment;
|
|
20
60
|
workerCount: number;
|
|
21
61
|
poolStats: any;
|
|
22
62
|
} | null;
|
|
63
|
+
/**
|
|
64
|
+
* 清理 Worker 池
|
|
65
|
+
*/
|
|
23
66
|
terminate(): Promise<void>;
|
|
24
67
|
}
|
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
import { PageTask } from '@pkg/page-filter';
|
|
2
|
+
/**
|
|
3
|
+
* Worker 任务类型
|
|
4
|
+
*/
|
|
2
5
|
export type WorkerTaskType = 'init' | 'process-batch' | 'stats' | 'cleanup';
|
|
6
|
+
/**
|
|
7
|
+
* Worker 任务
|
|
8
|
+
*/
|
|
3
9
|
export interface WorkerTask {
|
|
4
10
|
type: WorkerTaskType;
|
|
5
11
|
projDir?: string;
|
|
6
12
|
moduleDir?: string;
|
|
7
13
|
pageTasks?: PageTask[];
|
|
8
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Worker 响应
|
|
17
|
+
*/
|
|
9
18
|
export interface WorkerResponse {
|
|
10
19
|
success: boolean;
|
|
11
20
|
data?: any;
|
|
12
21
|
error?: string | undefined;
|
|
13
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* 处理 Worker 任务的主函数
|
|
25
|
+
*/
|
|
14
26
|
export declare function handleWorkerTask(task: WorkerTask): Promise<WorkerResponse>;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { PageTask } from '@pkg/page-filter';
|
|
2
|
+
/**
|
|
3
|
+
* 批量渲染结果
|
|
4
|
+
*/
|
|
2
5
|
export interface BatchRenderResult {
|
|
3
6
|
success: boolean;
|
|
4
7
|
processedCount: number;
|
|
@@ -6,14 +9,34 @@ export interface BatchRenderResult {
|
|
|
6
9
|
duration: number;
|
|
7
10
|
errors: string[];
|
|
8
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Worker 状态管理器
|
|
14
|
+
* 负责初始化和维护 Worker 的 SSG 环境
|
|
15
|
+
* 每个 Worker 初始化一次,然后复用来处理多个批次
|
|
16
|
+
*/
|
|
9
17
|
export declare class WorkerState {
|
|
10
18
|
private projDir;
|
|
11
19
|
private moduleDir;
|
|
12
20
|
private initialized;
|
|
13
21
|
constructor(projDir: string, moduleDir: string);
|
|
22
|
+
/**
|
|
23
|
+
* 初始化 Worker 环境(只执行一次)
|
|
24
|
+
*/
|
|
14
25
|
initialize(): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* 处理一个批次的页面任务
|
|
28
|
+
* 运行完整的 SSG 流程,但通过过滤器只处理指定任务
|
|
29
|
+
*
|
|
30
|
+
* @param pageTasks - 包含语言和路径信息的任务列表
|
|
31
|
+
*/
|
|
15
32
|
processBatch(pageTasks: PageTask[]): Promise<BatchRenderResult>;
|
|
33
|
+
/**
|
|
34
|
+
* 清理资源
|
|
35
|
+
*/
|
|
16
36
|
cleanup(): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* 获取统计信息
|
|
39
|
+
*/
|
|
17
40
|
getStats(): {
|
|
18
41
|
initialized: boolean;
|
|
19
42
|
projDir: string;
|
|
@@ -1,38 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application Layer: Workspace Management Service
|
|
3
|
+
*
|
|
4
|
+
* 职责:
|
|
5
|
+
* - 协调多个 domain 之间的交互
|
|
6
|
+
* - 提供应用级服务(如 Identity 需要 Workspace 存储)
|
|
7
|
+
* - 不包含业务逻辑(业务逻辑在 Domain 层)
|
|
8
|
+
*/
|
|
1
9
|
import { WorkspaceFactory, Workspace, Project } from '@internal/domain/workspace';
|
|
10
|
+
/**
|
|
11
|
+
* Application Service Options
|
|
12
|
+
*/
|
|
2
13
|
export interface WorkspaceAppServiceOptions {
|
|
3
14
|
workspaceFactory: WorkspaceFactory;
|
|
4
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Workspace Application Service
|
|
18
|
+
*
|
|
19
|
+
* 提供应用层的 Workspace 服务
|
|
20
|
+
*/
|
|
5
21
|
export declare class WorkspaceAppService {
|
|
6
22
|
private workspaceFactory;
|
|
7
23
|
constructor(options: WorkspaceAppServiceOptions);
|
|
24
|
+
/**
|
|
25
|
+
* Load workspace from path
|
|
26
|
+
*/
|
|
8
27
|
loadWorkspace(path?: string): Promise<Workspace>;
|
|
28
|
+
/**
|
|
29
|
+
* Create new workspace
|
|
30
|
+
*/
|
|
9
31
|
createWorkspace(path: string, options?: Parameters<WorkspaceFactory['create']>[1]): Promise<Workspace>;
|
|
32
|
+
/**
|
|
33
|
+
* Save workspace
|
|
34
|
+
*/
|
|
10
35
|
saveWorkspace(workspace: Workspace): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Find workspace root
|
|
38
|
+
*/
|
|
11
39
|
findWorkspaceRoot(startPath?: string): Promise<string | null>;
|
|
40
|
+
/**
|
|
41
|
+
* Create project in workspace
|
|
42
|
+
*/
|
|
12
43
|
createProject(workspace: Workspace, name: string, options?: Parameters<WorkspaceFactory['createProject']>[2]): Promise<Project>;
|
|
44
|
+
/**
|
|
45
|
+
* Create project from existing folder
|
|
46
|
+
*
|
|
47
|
+
* 扫描文件夹结构,识别 content、content.{lang}、static 文件夹
|
|
48
|
+
* 创建项目并链接到源文件夹
|
|
49
|
+
*/
|
|
13
50
|
createProjectFromFolder(workspace: Workspace, name: string, sourceFolderPath: string, options?: Parameters<WorkspaceFactory['createProjectFromFolder']>[3]): Promise<Project>;
|
|
14
51
|
createProjectFromFile(workspace: Workspace, name: string, sourceFilePath: string, options?: Parameters<WorkspaceFactory['createProjectFromFile']>[3]): Promise<Project>;
|
|
52
|
+
/**
|
|
53
|
+
* Delete project from workspace
|
|
54
|
+
*/
|
|
15
55
|
deleteProject(workspace: Workspace, projectIdOrName: string, options?: Parameters<WorkspaceFactory['deleteProject']>[2]): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Load workspace and find project by name or path
|
|
58
|
+
* Common pattern used by many CLI commands
|
|
59
|
+
*
|
|
60
|
+
* 统一行为:
|
|
61
|
+
* 1. 如果传入 projectNameOrPath,先按项目名查找
|
|
62
|
+
* 2. 如果按名字找不到,尝试按路径查找(可能是绝对路径)
|
|
63
|
+
* 3. 如果没传入参数,使用当前目录查找
|
|
64
|
+
*/
|
|
16
65
|
loadWorkspaceAndProject(projectNameOrPath?: string, workspacePath?: string): Promise<{
|
|
17
66
|
workspace: Workspace;
|
|
18
67
|
project: Project;
|
|
19
68
|
}>;
|
|
69
|
+
/**
|
|
70
|
+
* Create snapshot for project
|
|
71
|
+
*/
|
|
20
72
|
createSnapshot(project: Project, snapshotName?: string): Promise<import("@internal/domain/workspace").SnapshotMetadata>;
|
|
73
|
+
/**
|
|
74
|
+
* List snapshots for project
|
|
75
|
+
*/
|
|
21
76
|
listSnapshots(project: Project): Promise<import("@internal/domain/workspace").SnapshotMetadata[]>;
|
|
77
|
+
/**
|
|
78
|
+
* Restore snapshot
|
|
79
|
+
*/
|
|
22
80
|
restoreSnapshot(project: Project, snapshotId: string, outputDir?: string): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Delete snapshot
|
|
83
|
+
*/
|
|
23
84
|
deleteSnapshot(project: Project, snapshotId: string): Promise<void>;
|
|
85
|
+
/**
|
|
86
|
+
* Get snapshot metadata
|
|
87
|
+
*/
|
|
24
88
|
getSnapshot(project: Project, snapshotId: string): Promise<import("@internal/domain/workspace").SnapshotMetadata>;
|
|
89
|
+
/**
|
|
90
|
+
* Load a single project by path
|
|
91
|
+
*/
|
|
25
92
|
loadProject(projectPath: string): Promise<Project>;
|
|
93
|
+
/**
|
|
94
|
+
* Save a single project
|
|
95
|
+
*/
|
|
26
96
|
saveProject(project: Project): Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* Find project root from current directory
|
|
99
|
+
*/
|
|
27
100
|
findProjectRoot(startPath: string): Promise<string | null>;
|
|
101
|
+
/**
|
|
102
|
+
* Scan folder structure
|
|
103
|
+
*
|
|
104
|
+
* 扫描文件夹结构,识别 content、content.{lang}、static 文件夹
|
|
105
|
+
* 用于在创建项目前预览文件夹结构
|
|
106
|
+
*/
|
|
28
107
|
scanFolderStructure(folderPath: string): Promise<import("@internal/domain/workspace").FolderStructure>;
|
|
108
|
+
/**
|
|
109
|
+
* Create IdentityStorageProvider for a workspace
|
|
110
|
+
*
|
|
111
|
+
* 跨域协调:
|
|
112
|
+
* - Identity Domain 定义需要什么存储能力 (IdentityStorageProvider)
|
|
113
|
+
* - Workspace Domain 提供实现
|
|
114
|
+
* - Application Layer 负责组装
|
|
115
|
+
*/
|
|
29
116
|
createIdentityStorage(workspace: Workspace): import("../domain/identity").IdentityStorageProvider;
|
|
117
|
+
/**
|
|
118
|
+
* 设置项目的 baseURL 路径结构
|
|
119
|
+
* 在 public/ 目录下创建对应的 symlink 结构
|
|
120
|
+
*/
|
|
30
121
|
setupProjectBaseURLStructure(project: Project): Promise<{
|
|
31
122
|
serverRoot: string;
|
|
32
123
|
baseURL: string;
|
|
33
124
|
symlinkCreated: boolean;
|
|
34
125
|
}>;
|
|
126
|
+
/**
|
|
127
|
+
* 清理项目的 baseURL 路径结构
|
|
128
|
+
*/
|
|
35
129
|
cleanProjectBaseURLStructure(project: Project): Promise<void>;
|
|
130
|
+
/**
|
|
131
|
+
* 确保项目的 baseURL 路径结构正确
|
|
132
|
+
* 检查 baseURL 是否变化,如需要则重新创建
|
|
133
|
+
*/
|
|
36
134
|
ensureProjectBaseURLStructure(project: Project): Promise<{
|
|
37
135
|
serverRoot: string;
|
|
38
136
|
baseURL: string;
|
|
@@ -8,6 +8,10 @@ import { Language } from './language';
|
|
|
8
8
|
import { Taxonomy } from './taxonomy';
|
|
9
9
|
import { Dir } from "./dir";
|
|
10
10
|
import { Markdown } from './markdown';
|
|
11
|
+
/**
|
|
12
|
+
* Config entity that aggregates all configuration components
|
|
13
|
+
* Matches the golang version structure
|
|
14
|
+
*/
|
|
11
15
|
export declare class Config {
|
|
12
16
|
private configSourceFs;
|
|
13
17
|
private provider;
|
|
@@ -24,16 +28,52 @@ export declare class Config {
|
|
|
24
28
|
getProvider(): Provider;
|
|
25
29
|
theme(): string;
|
|
26
30
|
getDir(): Dir;
|
|
31
|
+
/**
|
|
32
|
+
* Get Root entity
|
|
33
|
+
*/
|
|
27
34
|
getRoot(): Root;
|
|
35
|
+
/**
|
|
36
|
+
* Get Module entity
|
|
37
|
+
*/
|
|
28
38
|
getModule(): Module;
|
|
39
|
+
/**
|
|
40
|
+
* Get Service entity
|
|
41
|
+
*/
|
|
29
42
|
getService(): Service;
|
|
43
|
+
/**
|
|
44
|
+
* Get Social entity
|
|
45
|
+
*/
|
|
30
46
|
getSocial(): Social;
|
|
47
|
+
/**
|
|
48
|
+
* Get Language entity (optional)
|
|
49
|
+
*/
|
|
31
50
|
getLanguage(): Language;
|
|
51
|
+
/**
|
|
52
|
+
* Get Taxonomy entity (optional)
|
|
53
|
+
*/
|
|
32
54
|
getTaxonomy(): Taxonomy;
|
|
55
|
+
/**
|
|
56
|
+
* Get Markdown entity
|
|
57
|
+
*/
|
|
33
58
|
getMarkdown(): Markdown;
|
|
59
|
+
/**
|
|
60
|
+
* Set Language entity
|
|
61
|
+
*/
|
|
34
62
|
setLanguage(language: Language): void;
|
|
63
|
+
/**
|
|
64
|
+
* Set Taxonomy entity
|
|
65
|
+
*/
|
|
35
66
|
setTaxonomy(taxonomy: Taxonomy): void;
|
|
67
|
+
/**
|
|
68
|
+
* Set Markdown entity
|
|
69
|
+
*/
|
|
36
70
|
setMarkdown(markdown: Markdown): void;
|
|
71
|
+
/**
|
|
72
|
+
* Validate the configuration
|
|
73
|
+
*/
|
|
37
74
|
validate(): boolean;
|
|
38
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Creates a new Config instance
|
|
78
|
+
*/
|
|
39
79
|
export declare function newConfig(configSourceFs: Fs, provider: Provider, root: Root, dir: Dir, module: Module, service: Service, social: Social, language: Language, taxonomy: Taxonomy, markdown: Markdown): Config;
|
|
@@ -1,23 +1,74 @@
|
|
|
1
1
|
import { LanguageConfig } from '../type';
|
|
2
|
+
/**
|
|
3
|
+
* Language entity holds language configuration
|
|
4
|
+
*/
|
|
2
5
|
export declare class Language {
|
|
3
6
|
private defaultLang;
|
|
4
7
|
private configs;
|
|
5
8
|
private indices;
|
|
6
9
|
constructor(configs: Record<string, LanguageConfig>);
|
|
10
|
+
/**
|
|
11
|
+
* Calculate default language based on weight (smallest weight wins)
|
|
12
|
+
*/
|
|
7
13
|
private calculateDefaultLanguage;
|
|
14
|
+
/**
|
|
15
|
+
* Get all language configurations
|
|
16
|
+
*/
|
|
8
17
|
languages(): LanguageConfig[];
|
|
18
|
+
/**
|
|
19
|
+
* Get default language
|
|
20
|
+
*/
|
|
9
21
|
defaultLanguage(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Check if a language is valid
|
|
24
|
+
*/
|
|
10
25
|
isLanguageValid(lang: string): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Get other language keys (excluding default)
|
|
28
|
+
*/
|
|
11
29
|
otherLanguageKeys(): string[];
|
|
30
|
+
/**
|
|
31
|
+
* Get relative directory for a language
|
|
32
|
+
*/
|
|
12
33
|
getRelDir(name: string, langKey: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* Validate language configuration
|
|
36
|
+
*/
|
|
13
37
|
validate(): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Set language indices (ordered list)
|
|
40
|
+
*/
|
|
14
41
|
private setIndices;
|
|
42
|
+
/**
|
|
43
|
+
* Get language keys in order
|
|
44
|
+
*/
|
|
15
45
|
languageKeys(): string[];
|
|
46
|
+
/**
|
|
47
|
+
* Get language indexes
|
|
48
|
+
*/
|
|
16
49
|
languageIndexes(): number[];
|
|
50
|
+
/**
|
|
51
|
+
* Get language index by language code
|
|
52
|
+
*/
|
|
17
53
|
getLanguageIndex(lang: string): number;
|
|
54
|
+
/**
|
|
55
|
+
* Get language by index
|
|
56
|
+
*/
|
|
18
57
|
getLanguageByIndex(idx: number): string;
|
|
58
|
+
/**
|
|
59
|
+
* Get language name by language code
|
|
60
|
+
*/
|
|
19
61
|
getLanguageName(lang: string): string;
|
|
62
|
+
/**
|
|
63
|
+
* Get language configuration by language code
|
|
64
|
+
*/
|
|
20
65
|
getLanguageConfig(lang: string): LanguageConfig | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Get all language configurations
|
|
68
|
+
*/
|
|
21
69
|
getConfigs(): Record<string, LanguageConfig>;
|
|
22
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Create a new Language instance from provider data
|
|
73
|
+
*/
|
|
23
74
|
export declare function newLanguage(data: any): Language;
|
|
@@ -1,16 +1,52 @@
|
|
|
1
1
|
import { MarkdownConfig, MarkdownPlugins } from '../type';
|
|
2
|
+
/**
|
|
3
|
+
* Markdown entity holds markdown renderer configuration
|
|
4
|
+
*/
|
|
2
5
|
export declare class Markdown {
|
|
3
6
|
private markdownConfig;
|
|
4
7
|
constructor(markdownConfig: MarkdownConfig);
|
|
8
|
+
/**
|
|
9
|
+
* Check if internal markdown renderer should be used
|
|
10
|
+
*/
|
|
5
11
|
useInternalRenderer(): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Check if wikilink plugin is enabled
|
|
14
|
+
*/
|
|
6
15
|
isWikilinkEnabled(): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Check if tag plugin is enabled
|
|
18
|
+
*/
|
|
7
19
|
isTagEnabled(): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Check if callout plugin is enabled
|
|
22
|
+
*/
|
|
8
23
|
isCalloutEnabled(): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Check if LaTeX plugin is enabled
|
|
26
|
+
*/
|
|
9
27
|
isLatexEnabled(): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Check if Mermaid plugin is enabled
|
|
30
|
+
*/
|
|
10
31
|
isMermaidEnabled(): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Get the markdown configuration
|
|
34
|
+
*/
|
|
11
35
|
getMarkdownConfig(): MarkdownConfig;
|
|
36
|
+
/**
|
|
37
|
+
* Get plugin configuration
|
|
38
|
+
*/
|
|
12
39
|
getPlugins(): MarkdownPlugins;
|
|
40
|
+
/**
|
|
41
|
+
* Check if any plugin is enabled
|
|
42
|
+
*/
|
|
13
43
|
hasEnabledPlugins(): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Validate the markdown configuration
|
|
46
|
+
*/
|
|
14
47
|
validate(): boolean;
|
|
15
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Create a new Markdown instance from provider data
|
|
51
|
+
*/
|
|
16
52
|
export declare function newMarkdown(data: any): Markdown;
|
|
@@ -1,16 +1,52 @@
|
|
|
1
1
|
import { ModuleConfig } from '../type';
|
|
2
|
+
/**
|
|
3
|
+
* Module entity holds module configuration
|
|
4
|
+
*/
|
|
2
5
|
export declare class Module {
|
|
3
6
|
private moduleConfig;
|
|
4
7
|
constructor(moduleConfig: ModuleConfig);
|
|
8
|
+
/**
|
|
9
|
+
* Get import paths from module imports
|
|
10
|
+
*/
|
|
5
11
|
importPaths(): string[];
|
|
12
|
+
/**
|
|
13
|
+
* Get the module configuration
|
|
14
|
+
*/
|
|
6
15
|
getModuleConfig(): ModuleConfig;
|
|
16
|
+
/**
|
|
17
|
+
* Get all imports
|
|
18
|
+
*/
|
|
7
19
|
getImports(): import("../type").Import[];
|
|
20
|
+
/**
|
|
21
|
+
* Get all mounts
|
|
22
|
+
*/
|
|
8
23
|
getMounts(): import("../type").Mount[];
|
|
24
|
+
/**
|
|
25
|
+
* Get import count
|
|
26
|
+
*/
|
|
9
27
|
importCount(): number;
|
|
28
|
+
/**
|
|
29
|
+
* Get mount count
|
|
30
|
+
*/
|
|
10
31
|
mountCount(): number;
|
|
32
|
+
/**
|
|
33
|
+
* Check if module has imports
|
|
34
|
+
*/
|
|
11
35
|
hasImports(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Check if module has mounts
|
|
38
|
+
*/
|
|
12
39
|
hasMounts(): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Find import by path
|
|
42
|
+
*/
|
|
13
43
|
findImport(path: string): import("../type").Import | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Find mount by source
|
|
46
|
+
*/
|
|
14
47
|
findMount(source: string): import("../type").Mount | undefined;
|
|
15
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Create a new Module instance from provider data
|
|
51
|
+
*/
|
|
16
52
|
export declare function newModule(data: any): Module;
|
|
@@ -1,18 +1,57 @@
|
|
|
1
1
|
import { RootConfig } from '../type';
|
|
2
|
+
/**
|
|
3
|
+
* Root entity holds the root configuration
|
|
4
|
+
*/
|
|
2
5
|
export declare class Root {
|
|
3
6
|
private rootConfig;
|
|
4
7
|
private rootParams;
|
|
5
8
|
constructor(rootConfig: RootConfig, rootParams?: Record<string, any>);
|
|
9
|
+
/**
|
|
10
|
+
* Get the default theme
|
|
11
|
+
*/
|
|
6
12
|
defaultTheme(): string;
|
|
13
|
+
/**
|
|
14
|
+
* Get the compiled timeout duration
|
|
15
|
+
*/
|
|
7
16
|
compiledTimeout(): number;
|
|
17
|
+
/**
|
|
18
|
+
* Get the base URL
|
|
19
|
+
*/
|
|
8
20
|
baseUrl(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Get configuration parameters
|
|
23
|
+
*/
|
|
9
24
|
configParams(): Record<string, any>;
|
|
25
|
+
/**
|
|
26
|
+
* Get site title
|
|
27
|
+
*/
|
|
10
28
|
siteTitle(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Get the root configuration
|
|
31
|
+
*/
|
|
11
32
|
getRootConfig(): RootConfig;
|
|
33
|
+
/**
|
|
34
|
+
* Get theme list
|
|
35
|
+
*/
|
|
12
36
|
getThemes(): string[];
|
|
37
|
+
/**
|
|
38
|
+
* Get default content language
|
|
39
|
+
*/
|
|
13
40
|
getDefaultContentLanguage(): string;
|
|
41
|
+
/**
|
|
42
|
+
* Check if drafts should be built
|
|
43
|
+
*/
|
|
14
44
|
shouldBuildDrafts(): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Check if future content should be built
|
|
47
|
+
*/
|
|
15
48
|
shouldBuildFuture(): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Check if expired content should be built
|
|
51
|
+
*/
|
|
16
52
|
shouldBuildExpired(): boolean;
|
|
17
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Create a new Root instance from provider data
|
|
56
|
+
*/
|
|
18
57
|
export declare function newRoot(data: any, params?: Record<string, any>): Root;
|
|
@@ -1,19 +1,55 @@
|
|
|
1
1
|
import { ServiceConfig } from '../type';
|
|
2
|
+
/**
|
|
3
|
+
* Service entity holds service configuration
|
|
4
|
+
*/
|
|
2
5
|
export declare class Service {
|
|
3
6
|
private serviceConfig;
|
|
4
7
|
constructor(serviceConfig: ServiceConfig);
|
|
8
|
+
/**
|
|
9
|
+
* Check if Google Analytics is enabled
|
|
10
|
+
*/
|
|
5
11
|
isGoogleAnalyticsEnabled(): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Get Google Analytics ID
|
|
14
|
+
*/
|
|
6
15
|
googleAnalyticsID(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Check if Google Analytics should respect Do Not Track
|
|
18
|
+
*/
|
|
7
19
|
isGoogleAnalyticsRespectDoNotTrack(): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Check if Disqus is enabled
|
|
22
|
+
*/
|
|
8
23
|
isDisqusEnabled(): boolean;
|
|
9
24
|
disqusShortname(): string;
|
|
10
25
|
isXRespectDoNotTrack(): boolean;
|
|
11
26
|
isXDisableInlineCSS(): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Get RSS limit
|
|
29
|
+
*/
|
|
12
30
|
rssLimit(): number;
|
|
31
|
+
/**
|
|
32
|
+
* Get the service configuration
|
|
33
|
+
*/
|
|
13
34
|
getServiceConfig(): ServiceConfig;
|
|
35
|
+
/**
|
|
36
|
+
* Get Google Analytics configuration
|
|
37
|
+
*/
|
|
14
38
|
getGoogleAnalytics(): import("../type").GoogleAnalytics;
|
|
39
|
+
/**
|
|
40
|
+
* Get Disqus configuration
|
|
41
|
+
*/
|
|
15
42
|
getDisqus(): import("../type").Disqus;
|
|
43
|
+
/**
|
|
44
|
+
* Get RSS configuration
|
|
45
|
+
*/
|
|
16
46
|
getRSS(): import("../type").RSS;
|
|
47
|
+
/**
|
|
48
|
+
* Check if any service is enabled
|
|
49
|
+
*/
|
|
17
50
|
hasEnabledServices(): boolean;
|
|
18
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Create a new Service instance from provider data
|
|
54
|
+
*/
|
|
19
55
|
export declare function newService(data: any): Service;
|