@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,6 +1,9 @@
|
|
|
1
1
|
import { ProjectMetadata } from '../value-object/project-metadata';
|
|
2
2
|
import { BuildHistoryEntry } from '../type';
|
|
3
3
|
import { FileSystemRepository } from '../repository/file-system';
|
|
4
|
+
/**
|
|
5
|
+
* Project Configuration Interface
|
|
6
|
+
*/
|
|
4
7
|
export interface ProjectConfig {
|
|
5
8
|
baseURL?: string;
|
|
6
9
|
title?: string;
|
|
@@ -13,37 +16,149 @@ export interface ProjectConfig {
|
|
|
13
16
|
}>;
|
|
14
17
|
[key: string]: any;
|
|
15
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Project Entity
|
|
21
|
+
* Represents a single MDFriday project within a workspace
|
|
22
|
+
*/
|
|
16
23
|
export declare class Project {
|
|
17
24
|
private metadata;
|
|
18
25
|
private projectPath;
|
|
19
26
|
private config;
|
|
20
27
|
private fileSystemRepo;
|
|
21
28
|
constructor(projectPath: string, metadata: ProjectMetadata, fileSystemRepo: FileSystemRepository);
|
|
29
|
+
/**
|
|
30
|
+
* Get project path
|
|
31
|
+
*/
|
|
22
32
|
getPath(): string;
|
|
33
|
+
/**
|
|
34
|
+
* Get project metadata
|
|
35
|
+
*/
|
|
23
36
|
getMetadata(): ProjectMetadata;
|
|
37
|
+
/**
|
|
38
|
+
* Get project ID
|
|
39
|
+
*/
|
|
24
40
|
getId(): string;
|
|
41
|
+
/**
|
|
42
|
+
* Get project name
|
|
43
|
+
*/
|
|
25
44
|
getName(): string;
|
|
45
|
+
/**
|
|
46
|
+
* Get project type
|
|
47
|
+
*/
|
|
48
|
+
getType(): string;
|
|
49
|
+
/**
|
|
50
|
+
* Get workspace ID
|
|
51
|
+
*/
|
|
26
52
|
getWorkspaceId(): string | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Get build history
|
|
55
|
+
*/
|
|
27
56
|
getBuildHistory(): BuildHistoryEntry[];
|
|
57
|
+
/**
|
|
58
|
+
* Add build history entry
|
|
59
|
+
*/
|
|
28
60
|
addBuildHistory(entry: BuildHistoryEntry): void;
|
|
61
|
+
/**
|
|
62
|
+
* Get last build timestamp
|
|
63
|
+
*/
|
|
29
64
|
getLastBuildTime(): number | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Update project name
|
|
67
|
+
*/
|
|
30
68
|
updateName(name: string): void;
|
|
69
|
+
/**
|
|
70
|
+
* Load project configuration
|
|
71
|
+
*/
|
|
31
72
|
loadConfig(): Promise<ProjectConfig>;
|
|
73
|
+
/**
|
|
74
|
+
* Get project configuration (cached)
|
|
75
|
+
*/
|
|
32
76
|
getConfig(): ProjectConfig | null;
|
|
77
|
+
/**
|
|
78
|
+
* Get content directories (支持多语言)
|
|
79
|
+
* Returns absolute paths
|
|
80
|
+
*/
|
|
33
81
|
getContentDirs(): Promise<string[]>;
|
|
82
|
+
/**
|
|
83
|
+
* Get publish directory (output directory)
|
|
84
|
+
* Returns absolute path
|
|
85
|
+
*/
|
|
34
86
|
getPublishDir(): Promise<string>;
|
|
87
|
+
/**
|
|
88
|
+
* Get static directory
|
|
89
|
+
* Returns absolute path
|
|
90
|
+
*/
|
|
35
91
|
getStaticDir(): string;
|
|
92
|
+
/**
|
|
93
|
+
* Get default content language
|
|
94
|
+
*/
|
|
36
95
|
getDefaultLanguage(): Promise<string>;
|
|
96
|
+
/**
|
|
97
|
+
* Get all configured languages
|
|
98
|
+
*/
|
|
37
99
|
getLanguages(): Promise<string[]>;
|
|
100
|
+
/**
|
|
101
|
+
* Get project configuration file path
|
|
102
|
+
*/
|
|
38
103
|
getConfigPath(): string;
|
|
104
|
+
/**
|
|
105
|
+
* Get configuration value by key (supports nested keys with dot notation)
|
|
106
|
+
*/
|
|
39
107
|
getConfigValue(key: string): any;
|
|
108
|
+
/**
|
|
109
|
+
* Set configuration value (supports nested keys with dot notation)
|
|
110
|
+
*/
|
|
40
111
|
setConfigValue(key: string, value: any): void;
|
|
112
|
+
/**
|
|
113
|
+
* Set entire configuration object (replaces current config)
|
|
114
|
+
*
|
|
115
|
+
* This method replaces the entire configuration with the provided object.
|
|
116
|
+
* Useful for bulk updates to avoid race conditions from multiple writes.
|
|
117
|
+
*/
|
|
41
118
|
setConfig(config: ProjectConfig): void;
|
|
119
|
+
/**
|
|
120
|
+
* Unset configuration value (supports nested keys with dot notation)
|
|
121
|
+
*/
|
|
42
122
|
unsetConfigValue(key: string): boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Save current configuration to file
|
|
125
|
+
*/
|
|
43
126
|
saveConfig(): Promise<void>;
|
|
44
127
|
private getNestedValue;
|
|
45
128
|
private setNestedValue;
|
|
46
129
|
private deleteNestedValue;
|
|
130
|
+
/**
|
|
131
|
+
* 读取项目根目录下的文件
|
|
132
|
+
*
|
|
133
|
+
* @param filename - 文件名(相对于项目根目录),如 'kb.json'
|
|
134
|
+
* @param encoding - 编码格式,默认 'utf-8'
|
|
135
|
+
* @returns 文件内容
|
|
136
|
+
*/
|
|
137
|
+
readFile(filename: string, encoding?: BufferEncoding): Promise<string>;
|
|
138
|
+
/**
|
|
139
|
+
* 写入项目根目录下的文件
|
|
140
|
+
* 若父目录不存在则自动创建
|
|
141
|
+
*
|
|
142
|
+
* @param filename - 文件名(相对于项目根目录),如 'kb.json'
|
|
143
|
+
* @param content - 文件内容
|
|
144
|
+
* @param encoding - 编码格式,默认 'utf-8'
|
|
145
|
+
*/
|
|
146
|
+
writeFile(filename: string, content: string, encoding?: BufferEncoding): Promise<void>;
|
|
147
|
+
/**
|
|
148
|
+
* 检查项目根目录下的文件是否存在
|
|
149
|
+
*
|
|
150
|
+
* @param filename - 文件名(相对于项目根目录)
|
|
151
|
+
*/
|
|
152
|
+
fileExists(filename: string): Promise<boolean>;
|
|
153
|
+
/**
|
|
154
|
+
* 获取项目根目录下文件的绝对路径
|
|
155
|
+
*
|
|
156
|
+
* @param filename - 文件名(相对于项目根目录)
|
|
157
|
+
*/
|
|
158
|
+
getFilePath(filename: string): string;
|
|
159
|
+
/**
|
|
160
|
+
* Get project info for display
|
|
161
|
+
*/
|
|
47
162
|
getInfo(): {
|
|
48
163
|
id: string;
|
|
49
164
|
name: string;
|
|
@@ -53,38 +168,90 @@ export declare class Project {
|
|
|
53
168
|
lastBuild?: Date;
|
|
54
169
|
buildCount: number;
|
|
55
170
|
};
|
|
171
|
+
/**
|
|
172
|
+
* Get snapshots directory path
|
|
173
|
+
*/
|
|
56
174
|
getSnapshotsDir(): string;
|
|
175
|
+
/**
|
|
176
|
+
* 检查项目是否有源文件夹链接
|
|
177
|
+
*/
|
|
57
178
|
hasSourceLinks(): boolean;
|
|
179
|
+
/**
|
|
180
|
+
* 获取内容链接信息
|
|
181
|
+
*/
|
|
58
182
|
getContentLinks(): Array<{
|
|
59
183
|
sourcePath: string;
|
|
60
184
|
languageCode: string;
|
|
61
185
|
weight: number;
|
|
62
186
|
}>;
|
|
187
|
+
/**
|
|
188
|
+
* 获取静态资源链接信息
|
|
189
|
+
*/
|
|
63
190
|
getStaticLink(): {
|
|
64
191
|
sourcePath: string;
|
|
65
192
|
} | null;
|
|
193
|
+
/**
|
|
194
|
+
* 获取文件链接信息(单文件项目)
|
|
195
|
+
*/
|
|
66
196
|
getFileLink(): {
|
|
67
197
|
sourcePath: string;
|
|
68
198
|
targetPath: string;
|
|
69
199
|
isSymlink: boolean;
|
|
70
200
|
} | null;
|
|
201
|
+
/**
|
|
202
|
+
* 设置内容链接
|
|
203
|
+
*/
|
|
71
204
|
setContentLinks(links: Array<{
|
|
72
205
|
sourcePath: string;
|
|
73
206
|
languageCode: string;
|
|
74
207
|
weight: number;
|
|
75
208
|
}>): void;
|
|
209
|
+
/**
|
|
210
|
+
* 设置静态资源链接
|
|
211
|
+
*/
|
|
76
212
|
setStaticLink(link: {
|
|
77
213
|
sourcePath: string;
|
|
78
214
|
} | null): void;
|
|
215
|
+
/**
|
|
216
|
+
* 添加内容链接
|
|
217
|
+
*/
|
|
79
218
|
addContentLink(sourcePath: string, languageCode: string, weight: number): void;
|
|
219
|
+
/**
|
|
220
|
+
* 获取默认内容源路径(weight 为 0)
|
|
221
|
+
*/
|
|
80
222
|
getDefaultContentSource(): string | null;
|
|
223
|
+
/**
|
|
224
|
+
* 获取所有内容源路径
|
|
225
|
+
*/
|
|
81
226
|
getAllContentSources(): string[];
|
|
227
|
+
/**
|
|
228
|
+
* 按语言代码获取内容源路径
|
|
229
|
+
*/
|
|
82
230
|
getContentSourceByLanguage(languageCode: string): string | null;
|
|
231
|
+
/**
|
|
232
|
+
* 获取项目支持的所有语言
|
|
233
|
+
*/
|
|
83
234
|
getSupportedLanguagesFromLinks(): string[];
|
|
235
|
+
/**
|
|
236
|
+
* 检查是否为链接项目(从外部文件夹创建)
|
|
237
|
+
*/
|
|
84
238
|
isLinkedProject(): boolean;
|
|
239
|
+
/**
|
|
240
|
+
* 获取所有链接的源路径(包括 fileLink 和 contentLinks)
|
|
241
|
+
* Returns absolute paths to original source files/folders
|
|
242
|
+
*/
|
|
85
243
|
getLinkDirs(): string[];
|
|
244
|
+
/**
|
|
245
|
+
* 获取 baseURL(从 Hugo config.json)
|
|
246
|
+
*/
|
|
86
247
|
getBaseURL(): Promise<string>;
|
|
248
|
+
/**
|
|
249
|
+
* 设置 baseURL(更新 Hugo config.json)
|
|
250
|
+
*/
|
|
87
251
|
setBaseURL(baseURL: string): Promise<void>;
|
|
252
|
+
/**
|
|
253
|
+
* 解析 baseURL 路径信息
|
|
254
|
+
*/
|
|
88
255
|
parseBaseURLPath(baseURL: string): {
|
|
89
256
|
isRoot: boolean;
|
|
90
257
|
pathParts: string[];
|
|
@@ -92,11 +259,17 @@ export declare class Project {
|
|
|
92
259
|
finalDirName: string;
|
|
93
260
|
relativeToPublic: string;
|
|
94
261
|
};
|
|
262
|
+
/**
|
|
263
|
+
* 获取当前 baseURL 结构信息
|
|
264
|
+
*/
|
|
95
265
|
getBaseURLStructure(): {
|
|
96
266
|
baseURL: string;
|
|
97
267
|
createdAt: number;
|
|
98
268
|
pathParts: string[];
|
|
99
269
|
} | null;
|
|
270
|
+
/**
|
|
271
|
+
* 更新 baseURL 结构记录
|
|
272
|
+
*/
|
|
100
273
|
updateBaseURLStructure(info: {
|
|
101
274
|
baseURL: string;
|
|
102
275
|
createdAt: number;
|
|
@@ -3,6 +3,15 @@ import { ProjectRegistry } from '../type';
|
|
|
3
3
|
import { Project } from './project';
|
|
4
4
|
import { Authentication } from './authentication';
|
|
5
5
|
import { FileSystemRepository } from '../repository/file-system';
|
|
6
|
+
/**
|
|
7
|
+
* Workspace Entity (Aggregate Root)
|
|
8
|
+
*
|
|
9
|
+
* 聚合根:
|
|
10
|
+
* - 持有所有 Project entities
|
|
11
|
+
* - 持有 Authentication entity
|
|
12
|
+
* - 统一对外提供服务
|
|
13
|
+
* - 确保数据一致性
|
|
14
|
+
*/
|
|
6
15
|
export declare class Workspace {
|
|
7
16
|
private readonly rootPath;
|
|
8
17
|
private metadata;
|
|
@@ -10,33 +19,109 @@ export declare class Workspace {
|
|
|
10
19
|
private authentication;
|
|
11
20
|
private fileSystemRepo;
|
|
12
21
|
constructor(rootPath: string, metadata: WorkspaceMetadata, projects: Map<string, Project>, authentication: Authentication, fileSystemRepo: FileSystemRepository);
|
|
22
|
+
/**
|
|
23
|
+
* Get workspace root path
|
|
24
|
+
*/
|
|
13
25
|
getPath(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Get workspace metadata (Value Object)
|
|
28
|
+
*/
|
|
14
29
|
getMetadata(): WorkspaceMetadata;
|
|
30
|
+
/**
|
|
31
|
+
* Get workspace ID
|
|
32
|
+
*/
|
|
15
33
|
getId(): string;
|
|
34
|
+
/**
|
|
35
|
+
* Get workspace name
|
|
36
|
+
*/
|
|
16
37
|
getName(): string;
|
|
38
|
+
/**
|
|
39
|
+
* Get modules directory path
|
|
40
|
+
*/
|
|
17
41
|
getModulesDir(): string;
|
|
42
|
+
/**
|
|
43
|
+
* Get projects directory path
|
|
44
|
+
*/
|
|
18
45
|
getProjectsDir(): string;
|
|
46
|
+
/**
|
|
47
|
+
* Update workspace metadata (creates new Value Object)
|
|
48
|
+
*/
|
|
19
49
|
updateMetadata(updates: Parameters<WorkspaceMetadata['update']>[0]): void;
|
|
50
|
+
/**
|
|
51
|
+
* Update workspace name
|
|
52
|
+
*/
|
|
20
53
|
updateName(name: string): void;
|
|
54
|
+
/**
|
|
55
|
+
* Get all projects (entities)
|
|
56
|
+
*/
|
|
21
57
|
getProjects(): Project[];
|
|
58
|
+
/**
|
|
59
|
+
* Get project by ID
|
|
60
|
+
*/
|
|
22
61
|
getProject(projectId: string): Project | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Get project by name
|
|
64
|
+
*/
|
|
23
65
|
getProjectByName(name: string): Project | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Get project by ID or name
|
|
68
|
+
*/
|
|
24
69
|
findProject(idOrName: string): Project | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Check if project exists
|
|
72
|
+
*/
|
|
25
73
|
hasProject(projectId: string): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Add project to workspace (aggregate root responsibility)
|
|
76
|
+
*/
|
|
26
77
|
addProject(project: Project): void;
|
|
78
|
+
/**
|
|
79
|
+
* Remove project from workspace (aggregate root responsibility)
|
|
80
|
+
*/
|
|
27
81
|
removeProject(projectId: string): Project | null;
|
|
82
|
+
/**
|
|
83
|
+
* Get project count
|
|
84
|
+
*/
|
|
28
85
|
getProjectCount(): number;
|
|
86
|
+
/**
|
|
87
|
+
* Generate project registry from current project entities
|
|
88
|
+
* This is used by Repository for persistence
|
|
89
|
+
*/
|
|
29
90
|
getProjectRegistry(): ProjectRegistry;
|
|
91
|
+
/**
|
|
92
|
+
* Get authentication entity (file system manager)
|
|
93
|
+
*/
|
|
30
94
|
getAuthentication(): Authentication;
|
|
95
|
+
/**
|
|
96
|
+
* Check if workspace has authentication file
|
|
97
|
+
*/
|
|
31
98
|
hasAuthentication(): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Get workspace configuration file path
|
|
101
|
+
*/
|
|
32
102
|
getConfigPath(): string;
|
|
103
|
+
/**
|
|
104
|
+
* Get configuration value by key (supports nested keys with dot notation)
|
|
105
|
+
*/
|
|
33
106
|
getConfig(key: string): Promise<any>;
|
|
107
|
+
/**
|
|
108
|
+
* Get all workspace configuration
|
|
109
|
+
*/
|
|
34
110
|
getAllConfig(): Promise<any>;
|
|
111
|
+
/**
|
|
112
|
+
* Set configuration value (supports nested keys with dot notation)
|
|
113
|
+
*/
|
|
35
114
|
setConfig(key: string, value: any): Promise<void>;
|
|
115
|
+
/**
|
|
116
|
+
* Unset configuration value (supports nested keys with dot notation)
|
|
117
|
+
*/
|
|
36
118
|
unsetConfig(key: string): Promise<boolean>;
|
|
37
119
|
private getNestedValue;
|
|
38
120
|
private setNestedValue;
|
|
39
121
|
private deleteNestedValue;
|
|
122
|
+
/**
|
|
123
|
+
* Get workspace info for display
|
|
124
|
+
*/
|
|
40
125
|
getInfo(): {
|
|
41
126
|
id: string;
|
|
42
127
|
name: string;
|
|
@@ -1,33 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace Factory
|
|
3
|
+
*
|
|
4
|
+
* 负责构建和持久化 Workspace 聚合根
|
|
5
|
+
* - 从文件系统加载完整的 Workspace(包含所有 Project entities)
|
|
6
|
+
* - 创建新的 Workspace
|
|
7
|
+
* - 保存 Workspace 到文件系统
|
|
8
|
+
*/
|
|
1
9
|
import { Workspace } from '../entity/workspace';
|
|
2
10
|
import { Project } from '../entity/project';
|
|
3
11
|
import { FolderStructure } from '../value-object/folder-structure';
|
|
4
12
|
import { WorkspaceRepository, ProjectRepository, SnapshotRepository, FileSystemRepository } from '../repository';
|
|
5
13
|
import { SnapshotMetadata } from '../type';
|
|
6
14
|
import type { IdentityStorageProvider } from '@internal/domain/identity/repository/index';
|
|
15
|
+
/**
|
|
16
|
+
* Workspace Factory Options
|
|
17
|
+
*/
|
|
7
18
|
export interface WorkspaceFactoryOptions {
|
|
8
19
|
workspaceRepo: WorkspaceRepository;
|
|
9
20
|
projectRepo: ProjectRepository;
|
|
10
21
|
snapshotRepo: SnapshotRepository;
|
|
11
22
|
fileSystemRepo: FileSystemRepository;
|
|
12
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Workspace Factory
|
|
26
|
+
*/
|
|
13
27
|
export declare class WorkspaceFactory {
|
|
14
28
|
private workspaceRepo;
|
|
15
29
|
private projectRepo;
|
|
16
30
|
private snapshotRepo;
|
|
17
31
|
private fileSystemRepo;
|
|
18
32
|
constructor(options: WorkspaceFactoryOptions);
|
|
33
|
+
/**
|
|
34
|
+
* Load workspace from file system
|
|
35
|
+
* Returns fully constructed Workspace aggregate root with all Project entities
|
|
36
|
+
*/
|
|
19
37
|
load(rootPath: string): Promise<Workspace>;
|
|
38
|
+
/**
|
|
39
|
+
* Check if auth file exists
|
|
40
|
+
*/
|
|
20
41
|
private checkAuthFile;
|
|
42
|
+
/**
|
|
43
|
+
* Create a new workspace
|
|
44
|
+
*/
|
|
21
45
|
create(rootPath: string, options?: {
|
|
22
46
|
name?: string;
|
|
23
47
|
modulesDir?: string;
|
|
24
48
|
projectsDir?: string;
|
|
25
49
|
}): Promise<Workspace>;
|
|
50
|
+
/**
|
|
51
|
+
* Save workspace aggregate root to file system
|
|
52
|
+
*/
|
|
26
53
|
save(workspace: Workspace): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Find workspace root by searching up the directory tree
|
|
56
|
+
*/
|
|
27
57
|
findWorkspaceRoot(startPath: string): Promise<string | null>;
|
|
58
|
+
/**
|
|
59
|
+
* Check if a path is a workspace
|
|
60
|
+
*/
|
|
28
61
|
isWorkspace(workspacePath: string): Promise<boolean>;
|
|
62
|
+
/**
|
|
63
|
+
* Load or find workspace from current directory
|
|
64
|
+
*/
|
|
29
65
|
loadOrFind(cwd?: string): Promise<Workspace>;
|
|
66
|
+
/**
|
|
67
|
+
* Create a new project in workspace
|
|
68
|
+
*/
|
|
30
69
|
createProject(workspace: Workspace, name: string, options?: {
|
|
70
|
+
type?: string;
|
|
31
71
|
theme?: string;
|
|
32
72
|
language?: string;
|
|
33
73
|
contentDir?: string;
|
|
@@ -35,37 +75,104 @@ export declare class WorkspaceFactory {
|
|
|
35
75
|
publishDir?: string;
|
|
36
76
|
baseURL?: string;
|
|
37
77
|
}): Promise<Project>;
|
|
78
|
+
/**
|
|
79
|
+
* Delete project from workspace
|
|
80
|
+
*/
|
|
38
81
|
deleteProject(workspace: Workspace, projectIdOrName: string, options?: {
|
|
39
82
|
deleteFiles?: boolean;
|
|
40
83
|
}): Promise<void>;
|
|
84
|
+
/**
|
|
85
|
+
* Create a new project from existing folder
|
|
86
|
+
*
|
|
87
|
+
* 扫描文件夹结构,识别 content、content.{lang}、static 文件夹
|
|
88
|
+
* 创建项目并链接到源文件夹
|
|
89
|
+
*/
|
|
41
90
|
createProjectFromFolder(workspace: Workspace, name: string, sourceFolderPath: string, options?: {
|
|
91
|
+
type?: string;
|
|
42
92
|
theme?: string;
|
|
43
93
|
language?: string;
|
|
44
94
|
}): Promise<Project>;
|
|
95
|
+
/**
|
|
96
|
+
* Create a new project from a single file
|
|
97
|
+
*
|
|
98
|
+
* 支持从单个 Markdown 文件创建项目
|
|
99
|
+
* 优先尝试创建符号链接,失败时回退到文件拷贝
|
|
100
|
+
*/
|
|
45
101
|
createProjectFromFile(workspace: Workspace, name: string, sourceFilePath: string, options?: {
|
|
102
|
+
type?: string;
|
|
46
103
|
theme?: string;
|
|
47
104
|
language?: string;
|
|
48
105
|
}): Promise<Project>;
|
|
106
|
+
/**
|
|
107
|
+
* Load a single project by path
|
|
108
|
+
*/
|
|
49
109
|
loadProject(projectPath: string): Promise<Project>;
|
|
110
|
+
/**
|
|
111
|
+
* Save a single project
|
|
112
|
+
*/
|
|
50
113
|
saveProject(project: Project): Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* Find project root from current directory
|
|
116
|
+
*/
|
|
51
117
|
findProjectRoot(startPath: string): Promise<string | null>;
|
|
118
|
+
/**
|
|
119
|
+
* Create snapshot for a project
|
|
120
|
+
*/
|
|
52
121
|
createSnapshot(project: Project, snapshotName?: string): Promise<SnapshotMetadata>;
|
|
122
|
+
/**
|
|
123
|
+
* List snapshots for a project
|
|
124
|
+
*/
|
|
53
125
|
listSnapshots(project: Project): Promise<SnapshotMetadata[]>;
|
|
126
|
+
/**
|
|
127
|
+
* Restore snapshot
|
|
128
|
+
*/
|
|
54
129
|
restoreSnapshot(project: Project, snapshotId: string, outputDir?: string): Promise<void>;
|
|
130
|
+
/**
|
|
131
|
+
* Delete snapshot
|
|
132
|
+
*/
|
|
55
133
|
deleteSnapshot(project: Project, snapshotId: string): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* Get snapshot metadata
|
|
136
|
+
*/
|
|
56
137
|
getSnapshot(project: Project, snapshotId: string): Promise<SnapshotMetadata>;
|
|
138
|
+
/**
|
|
139
|
+
* Create IdentityStorageProvider adapter for a workspace
|
|
140
|
+
*
|
|
141
|
+
* 依赖倒置实现:
|
|
142
|
+
* - Identity Domain 定义 IdentityStorageProvider 接口(它需要什么)
|
|
143
|
+
* - Workspace Domain 提供实现(如何存储)
|
|
144
|
+
* - 允许 Identity 将认证信息存储在 Workspace 中
|
|
145
|
+
*/
|
|
57
146
|
createIdentityStorage(workspace: Workspace): IdentityStorageProvider;
|
|
147
|
+
/**
|
|
148
|
+
* 在 public/ 目录下创建 baseURL 访问路径结构
|
|
149
|
+
*
|
|
150
|
+
* 例如:baseURL = "/blog/" 时,在 public/ 下创建 blog/ -> . (symlink)
|
|
151
|
+
*/
|
|
58
152
|
setupBaseURLStructure(project: Project): Promise<{
|
|
59
153
|
serverRoot: string;
|
|
60
154
|
baseURL: string;
|
|
61
155
|
symlinkCreated: boolean;
|
|
62
156
|
}>;
|
|
157
|
+
/**
|
|
158
|
+
* 清理 public/ 下的 baseURL 路径结构
|
|
159
|
+
*/
|
|
63
160
|
cleanBaseURLStructure(project: Project): Promise<void>;
|
|
161
|
+
/**
|
|
162
|
+
* 确保 baseURL 结构正确
|
|
163
|
+
* 检查 baseURL 是否变化,如需要则重新创建
|
|
164
|
+
*/
|
|
64
165
|
ensureBaseURLStructure(project: Project): Promise<{
|
|
65
166
|
serverRoot: string;
|
|
66
167
|
baseURL: string;
|
|
67
168
|
recreated: boolean;
|
|
68
169
|
}>;
|
|
170
|
+
/**
|
|
171
|
+
* Scan folder structure
|
|
172
|
+
*
|
|
173
|
+
* 扫描文件夹结构,识别 content、content.{lang}、static 文件夹
|
|
174
|
+
* 用于在创建项目前预览文件夹结构
|
|
175
|
+
*/
|
|
69
176
|
scanFolderStructure(folderPath: string): Promise<FolderStructure>;
|
|
70
177
|
private createSampleContent;
|
|
71
178
|
}
|