@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,12 +1,40 @@
|
|
|
1
1
|
import { SnapshotRepository } from '@internal/domain/workspace/repository';
|
|
2
2
|
import { SnapshotMetadata } from '@internal/domain/workspace/type';
|
|
3
|
+
/**
|
|
4
|
+
* Node.js implementation of Snapshot Repository
|
|
5
|
+
* Handles snapshot creation, listing, restoration and deletion using fs
|
|
6
|
+
*/
|
|
3
7
|
export declare class NodeSnapshotRepository implements SnapshotRepository {
|
|
8
|
+
/**
|
|
9
|
+
* Create a snapshot by copying output directory to snapshot storage
|
|
10
|
+
*/
|
|
4
11
|
createSnapshot(projectPath: string, snapshotId: string, outputDir: string): Promise<SnapshotMetadata>;
|
|
12
|
+
/**
|
|
13
|
+
* List all snapshots for a project
|
|
14
|
+
*/
|
|
5
15
|
listSnapshots(projectPath: string): Promise<SnapshotMetadata[]>;
|
|
16
|
+
/**
|
|
17
|
+
* Get snapshot metadata
|
|
18
|
+
*/
|
|
6
19
|
getSnapshot(projectPath: string, snapshotId: string): Promise<SnapshotMetadata>;
|
|
20
|
+
/**
|
|
21
|
+
* Restore a snapshot by copying from storage to output directory
|
|
22
|
+
*/
|
|
7
23
|
restoreSnapshot(projectPath: string, snapshotId: string, outputDir: string): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Delete a snapshot
|
|
26
|
+
*/
|
|
8
27
|
deleteSnapshot(projectPath: string, snapshotId: string): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Copy directory recursively
|
|
30
|
+
*/
|
|
9
31
|
private copyDirectory;
|
|
32
|
+
/**
|
|
33
|
+
* Get total size of directory in bytes
|
|
34
|
+
*/
|
|
10
35
|
private getDirectorySize;
|
|
36
|
+
/**
|
|
37
|
+
* Count files in directory recursively
|
|
38
|
+
*/
|
|
11
39
|
private countFiles;
|
|
12
40
|
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Node.js File System Implementation of Workspace Repository
|
|
3
|
+
*/
|
|
1
4
|
import { WorkspaceRepository, ProjectRepository, WorkspaceMetadataData, ProjectMetadataData } from '@internal/domain/workspace/repository';
|
|
2
5
|
import { ProjectRegistry } from '@internal/domain/workspace/type';
|
|
6
|
+
/**
|
|
7
|
+
* Node.js implementation of WorkspaceRepository
|
|
8
|
+
*/
|
|
3
9
|
export declare class NodeWorkspaceRepository implements WorkspaceRepository {
|
|
4
10
|
isWorkspace(workspacePath: string): Promise<boolean>;
|
|
5
11
|
initWorkspaceStructure(workspacePath: string, modulesDir: string, projectsDir: string): Promise<void>;
|
|
@@ -8,6 +14,9 @@ export declare class NodeWorkspaceRepository implements WorkspaceRepository {
|
|
|
8
14
|
saveProjectRegistry(workspacePath: string, registry: ProjectRegistry): Promise<void>;
|
|
9
15
|
loadProjectRegistry(workspacePath: string): Promise<ProjectRegistry>;
|
|
10
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Node.js implementation of ProjectRepository
|
|
19
|
+
*/
|
|
11
20
|
export declare class NodeProjectRepository implements ProjectRepository {
|
|
12
21
|
isProject(projectPath: string): Promise<boolean>;
|
|
13
22
|
initProjectStructure(projectPath: string, contentDir: string, staticDir: string, publishDir: string): Promise<void>;
|
|
@@ -1,34 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 并发安全的缓存实现,专为站点构建场景优化
|
|
3
|
+
* 支持多个页面并发访问时避免重复创建相同对象
|
|
4
|
+
*/
|
|
1
5
|
export declare class ConcurrentCache<K, V> {
|
|
2
6
|
private cache;
|
|
3
7
|
private pendingPromises;
|
|
4
8
|
private deletedKeys;
|
|
5
9
|
constructor();
|
|
10
|
+
/**
|
|
11
|
+
* Get value from cache
|
|
12
|
+
*/
|
|
6
13
|
get(key: K): V | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Set value in cache
|
|
16
|
+
*/
|
|
7
17
|
set(key: K, value: V): void;
|
|
18
|
+
/**
|
|
19
|
+
* Check if key exists in cache
|
|
20
|
+
*/
|
|
8
21
|
has(key: K): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Check if key is currently being created
|
|
24
|
+
*/
|
|
9
25
|
isPending(key: K): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Remove key from cache
|
|
28
|
+
*/
|
|
10
29
|
delete(key: K): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Clear all cache entries and pending promises
|
|
32
|
+
*/
|
|
11
33
|
clear(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Get cache size
|
|
36
|
+
*/
|
|
12
37
|
size(): number;
|
|
38
|
+
/**
|
|
39
|
+
* Get pending promises count
|
|
40
|
+
*/
|
|
13
41
|
pendingCount(): number;
|
|
42
|
+
/**
|
|
43
|
+
* 并发安全的获取或创建值
|
|
44
|
+
* 如果多个并发请求访问同一个key,只会创建一次
|
|
45
|
+
*/
|
|
14
46
|
getOrCreate(key: K, create: (key: K) => Promise<V>): Promise<V>;
|
|
47
|
+
/**
|
|
48
|
+
* 创建并缓存值
|
|
49
|
+
*/
|
|
15
50
|
private createAndCache;
|
|
51
|
+
/**
|
|
52
|
+
* 执行创建函数,包装错误处理
|
|
53
|
+
*/
|
|
16
54
|
private executeCreate;
|
|
55
|
+
/**
|
|
56
|
+
* 获取缓存统计信息
|
|
57
|
+
*/
|
|
17
58
|
getStats(): CacheStats;
|
|
59
|
+
/**
|
|
60
|
+
* 批量预加载数据
|
|
61
|
+
*/
|
|
18
62
|
preload(entries: Array<{
|
|
19
63
|
key: K;
|
|
20
64
|
create: (key: K) => Promise<V>;
|
|
21
65
|
}>): Promise<void>;
|
|
22
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* 缓存统计信息
|
|
69
|
+
*/
|
|
23
70
|
export interface CacheStats {
|
|
24
71
|
size: number;
|
|
25
72
|
pendingCount: number;
|
|
26
73
|
keys: unknown[];
|
|
27
74
|
pendingKeys: unknown[];
|
|
28
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* DynaCache interface implementation
|
|
78
|
+
*/
|
|
29
79
|
export interface DynaCache<K, V> {
|
|
30
80
|
getOrCreate(key: K, create: (key: K) => Promise<V>): Promise<V>;
|
|
31
81
|
getStats?(): CacheStats;
|
|
32
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* 创建一个新的并发缓存实例
|
|
85
|
+
*/
|
|
33
86
|
export declare function createCache<K, V>(): ConcurrentCache<K, V>;
|
|
87
|
+
/**
|
|
88
|
+
* 全局缓存实例,用于站点构建时的数据共享
|
|
89
|
+
*/
|
|
34
90
|
export declare const globalBuildCache: ConcurrentCache<string, any>;
|
|
@@ -1,6 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language Data
|
|
3
|
+
* Contains mapping of language codes to language names with direction support
|
|
4
|
+
*/
|
|
1
5
|
import { LanguageInfo } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* LTR (Left-to-Right) Languages
|
|
8
|
+
* Currently supported languages that read from left to right
|
|
9
|
+
*/
|
|
2
10
|
export declare const LTR_LANGUAGES: LanguageInfo[];
|
|
11
|
+
/**
|
|
12
|
+
* RTL (Right-to-Left) Languages
|
|
13
|
+
* Languages that read from right to left (to be supported in the future)
|
|
14
|
+
*/
|
|
3
15
|
export declare const RTL_LANGUAGES: LanguageInfo[];
|
|
16
|
+
/**
|
|
17
|
+
* All supported languages (LTR + RTL)
|
|
18
|
+
*/
|
|
4
19
|
export declare const ALL_LANGUAGES: LanguageInfo[];
|
|
20
|
+
/**
|
|
21
|
+
* Create a map of language code to language info
|
|
22
|
+
*/
|
|
5
23
|
export declare const LANGUAGE_MAP: Record<string, LanguageInfo>;
|
|
24
|
+
/**
|
|
25
|
+
* Create a simple code-to-name mapping
|
|
26
|
+
*/
|
|
6
27
|
export declare const CODE_NAME_MAP: Record<string, string>;
|
|
@@ -1,18 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language Package
|
|
3
|
+
* Basic language code to name mapping service with LTR/RTL support
|
|
4
|
+
*/
|
|
1
5
|
export type { LanguageDirection, LanguageInfo, LanguageService } from './types';
|
|
2
6
|
export { LTR_LANGUAGES, RTL_LANGUAGES, ALL_LANGUAGES, LANGUAGE_MAP, CODE_NAME_MAP } from './data';
|
|
3
7
|
export { DefaultLanguageService, getLanguageService, createLanguageService } from './service';
|
|
8
|
+
/**
|
|
9
|
+
* Default language service instance
|
|
10
|
+
*/
|
|
4
11
|
export declare const lang: import("./types").LanguageService;
|
|
12
|
+
/**
|
|
13
|
+
* Convenience functions using the default service
|
|
14
|
+
*/
|
|
5
15
|
export declare const languages: {
|
|
16
|
+
/**
|
|
17
|
+
* Get all language codes
|
|
18
|
+
*/
|
|
6
19
|
getAllCodes: () => string[];
|
|
20
|
+
/**
|
|
21
|
+
* Get all language names
|
|
22
|
+
*/
|
|
7
23
|
getAllNames: () => string[];
|
|
24
|
+
/**
|
|
25
|
+
* Get language codes by direction
|
|
26
|
+
*/
|
|
8
27
|
getCodesByDirection: (direction: "ltr" | "rtl") => string[];
|
|
28
|
+
/**
|
|
29
|
+
* Get language names by direction
|
|
30
|
+
*/
|
|
9
31
|
getNamesByDirection: (direction: "ltr" | "rtl") => string[];
|
|
32
|
+
/**
|
|
33
|
+
* Get code-name mapping
|
|
34
|
+
*/
|
|
10
35
|
getCodeNameMap: () => Record<string, string>;
|
|
36
|
+
/**
|
|
37
|
+
* Get code-name mapping by direction
|
|
38
|
+
*/
|
|
11
39
|
getCodeNameMapByDirection: (direction: "ltr" | "rtl") => Record<string, string>;
|
|
40
|
+
/**
|
|
41
|
+
* Get language name by code
|
|
42
|
+
*/
|
|
12
43
|
getNameByCode: (code: string) => string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Get language info by code
|
|
46
|
+
*/
|
|
13
47
|
getLanguageInfo: (code: string) => import("./types").LanguageInfo | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Check if language is supported
|
|
50
|
+
*/
|
|
14
51
|
isSupported: (code: string) => boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Get language direction
|
|
54
|
+
*/
|
|
15
55
|
getDirection: (code: string) => import("./types").LanguageDirection | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Check if language is LTR
|
|
58
|
+
*/
|
|
16
59
|
isLTR: (code: string) => boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Check if language is RTL
|
|
62
|
+
*/
|
|
17
63
|
isRTL: (code: string) => boolean;
|
|
18
64
|
};
|
|
@@ -1,17 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language Service Implementation
|
|
3
|
+
* Provides methods to query language information
|
|
4
|
+
*/
|
|
1
5
|
import { LanguageInfo, LanguageDirection, LanguageService } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* Default implementation of LanguageService
|
|
8
|
+
*/
|
|
2
9
|
export declare class DefaultLanguageService implements LanguageService {
|
|
10
|
+
/**
|
|
11
|
+
* Get all supported language codes
|
|
12
|
+
*/
|
|
3
13
|
getAllCodes(): string[];
|
|
14
|
+
/**
|
|
15
|
+
* Get all supported language names
|
|
16
|
+
*/
|
|
4
17
|
getAllNames(): string[];
|
|
18
|
+
/**
|
|
19
|
+
* Get language codes for a specific direction
|
|
20
|
+
*/
|
|
5
21
|
getCodesByDirection(direction: LanguageDirection): string[];
|
|
22
|
+
/**
|
|
23
|
+
* Get language names for a specific direction
|
|
24
|
+
*/
|
|
6
25
|
getNamesByDirection(direction: LanguageDirection): string[];
|
|
26
|
+
/**
|
|
27
|
+
* Get code-to-name mapping for all languages
|
|
28
|
+
*/
|
|
7
29
|
getCodeNameMap(): Record<string, string>;
|
|
30
|
+
/**
|
|
31
|
+
* Get code-to-name mapping for a specific direction
|
|
32
|
+
*/
|
|
8
33
|
getCodeNameMapByDirection(direction: LanguageDirection): Record<string, string>;
|
|
34
|
+
/**
|
|
35
|
+
* Get language name by code
|
|
36
|
+
*/
|
|
9
37
|
getNameByCode(code: string): string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Get complete language information by code
|
|
40
|
+
*/
|
|
10
41
|
getLanguageInfo(code: string): LanguageInfo | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Check if a language code is supported
|
|
44
|
+
*/
|
|
11
45
|
isSupported(code: string): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Get language direction by code
|
|
48
|
+
*/
|
|
12
49
|
getDirection(code: string): LanguageDirection | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Check if a language is LTR (Left-to-Right)
|
|
52
|
+
*/
|
|
13
53
|
isLTR(code: string): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Check if a language is RTL (Right-to-Left)
|
|
56
|
+
*/
|
|
14
57
|
isRTL(code: string): boolean;
|
|
15
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Get the singleton language service instance
|
|
61
|
+
*/
|
|
16
62
|
export declare function getLanguageService(): LanguageService;
|
|
63
|
+
/**
|
|
64
|
+
* Create a new language service instance
|
|
65
|
+
*/
|
|
17
66
|
export declare function createLanguageService(): LanguageService;
|
|
@@ -1,21 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language Package Types
|
|
3
|
+
* Basic language code to name mapping with LTR/RTL support
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Language direction type
|
|
7
|
+
*/
|
|
1
8
|
export type LanguageDirection = 'ltr' | 'rtl';
|
|
9
|
+
/**
|
|
10
|
+
* Language information interface
|
|
11
|
+
*/
|
|
2
12
|
export interface LanguageInfo {
|
|
13
|
+
/** Language code (ISO 639-1) */
|
|
3
14
|
code: string;
|
|
15
|
+
/** Native language name */
|
|
4
16
|
name: string;
|
|
17
|
+
/** Language direction */
|
|
5
18
|
direction: LanguageDirection;
|
|
19
|
+
/** English name (optional, for reference) */
|
|
6
20
|
englishName?: string;
|
|
7
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Language service interface
|
|
24
|
+
*/
|
|
8
25
|
export interface LanguageService {
|
|
26
|
+
/** Get all language codes */
|
|
9
27
|
getAllCodes(): string[];
|
|
28
|
+
/** Get all language names */
|
|
10
29
|
getAllNames(): string[];
|
|
30
|
+
/** Get all language codes for a specific direction */
|
|
11
31
|
getCodesByDirection(direction: LanguageDirection): string[];
|
|
32
|
+
/** Get all language names for a specific direction */
|
|
12
33
|
getNamesByDirection(direction: LanguageDirection): string[];
|
|
34
|
+
/** Get code-name mapping for all languages */
|
|
13
35
|
getCodeNameMap(): Record<string, string>;
|
|
36
|
+
/** Get code-name mapping for a specific direction */
|
|
14
37
|
getCodeNameMapByDirection(direction: LanguageDirection): Record<string, string>;
|
|
38
|
+
/** Get language name by code */
|
|
15
39
|
getNameByCode(code: string): string | undefined;
|
|
40
|
+
/** Get language information by code */
|
|
16
41
|
getLanguageInfo(code: string): LanguageInfo | undefined;
|
|
42
|
+
/** Check if a language code is supported */
|
|
17
43
|
isSupported(code: string): boolean;
|
|
44
|
+
/** Get language direction by code */
|
|
18
45
|
getDirection(code: string): LanguageDirection | undefined;
|
|
46
|
+
/** Check if a language is LTR */
|
|
19
47
|
isLTR(code: string): boolean;
|
|
48
|
+
/** Check if a language is RTL */
|
|
20
49
|
isRTL(code: string): boolean;
|
|
21
50
|
}
|
|
@@ -2,8 +2,24 @@ import { Logger } from './logger';
|
|
|
2
2
|
export declare class HTTPErrorLogger {
|
|
3
3
|
private logger;
|
|
4
4
|
constructor(logger: Logger);
|
|
5
|
+
/**
|
|
6
|
+
* Process HTTP error messages and log them appropriately
|
|
7
|
+
* Similar to Go's httpErrorLog.Write method
|
|
8
|
+
*/
|
|
5
9
|
write(message: string): void;
|
|
10
|
+
/**
|
|
11
|
+
* Create a write stream compatible function for HTTP servers
|
|
12
|
+
* This can be used with HTTP server error handlers
|
|
13
|
+
*/
|
|
6
14
|
getWriteFunction(): (message: string) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Create a Node.js compatible writable stream interface
|
|
17
|
+
* This allows the logger to be used where a writable stream is expected
|
|
18
|
+
*/
|
|
7
19
|
createWritableStream(): NodeJS.WritableStream;
|
|
8
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Create a new HTTP error logger
|
|
23
|
+
* Similar to Go's NewHTTPErrorLog function
|
|
24
|
+
*/
|
|
9
25
|
export declare function NewHTTPErrorLogger(logger: Logger): HTTPErrorLogger;
|
|
@@ -1,26 +1,83 @@
|
|
|
1
1
|
import { Logger } from './logger';
|
|
2
2
|
import { LogLevel, LoggerConfig } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Global Logger Manager
|
|
5
|
+
* Manages logger instances across different domains with unified configuration
|
|
6
|
+
*/
|
|
3
7
|
export declare class LoggerManager {
|
|
4
8
|
private static instance;
|
|
5
9
|
private globalConfig;
|
|
6
10
|
private loggers;
|
|
7
11
|
private constructor();
|
|
12
|
+
/**
|
|
13
|
+
* Get the singleton instance of LoggerManager
|
|
14
|
+
*/
|
|
8
15
|
static getInstance(): LoggerManager;
|
|
16
|
+
/**
|
|
17
|
+
* Set global logger configuration
|
|
18
|
+
* This affects all new logger instances created after this call
|
|
19
|
+
*/
|
|
9
20
|
setGlobalConfig(config: Partial<LoggerConfig>): void;
|
|
21
|
+
/**
|
|
22
|
+
* Get global logger configuration
|
|
23
|
+
*/
|
|
10
24
|
getGlobalConfig(): LoggerConfig;
|
|
25
|
+
/**
|
|
26
|
+
* Get logger for a specific domain/component
|
|
27
|
+
* Creates and caches logger instances per domain
|
|
28
|
+
*/
|
|
11
29
|
getLogger(domain: string, additionalFields?: Record<string, any>): Logger;
|
|
30
|
+
/**
|
|
31
|
+
* Get logger for a specific domain with component information
|
|
32
|
+
*/
|
|
12
33
|
getComponentLogger(domain: string, component: string, additionalFields?: Record<string, any>): Logger;
|
|
34
|
+
/**
|
|
35
|
+
* Clear all cached loggers
|
|
36
|
+
* Useful when you want to force recreation with new configuration
|
|
37
|
+
*/
|
|
13
38
|
clearCache(): void;
|
|
39
|
+
/**
|
|
40
|
+
* Get all cached logger domains
|
|
41
|
+
*/
|
|
14
42
|
getCachedDomains(): string[];
|
|
43
|
+
/**
|
|
44
|
+
* Set log level for all existing and future loggers
|
|
45
|
+
*/
|
|
15
46
|
setLogLevel(level: LogLevel): void;
|
|
47
|
+
/**
|
|
48
|
+
* Enable or disable caller information for all loggers
|
|
49
|
+
*/
|
|
16
50
|
setCallerEnabled(enabled: boolean): void;
|
|
51
|
+
/**
|
|
52
|
+
* Set JSON format for all loggers
|
|
53
|
+
*/
|
|
17
54
|
setJsonFormat(enabled: boolean): void;
|
|
18
55
|
}
|
|
19
56
|
declare const globalLoggerManager: LoggerManager;
|
|
57
|
+
/**
|
|
58
|
+
* Initialize global logger configuration
|
|
59
|
+
* Call this once at application startup
|
|
60
|
+
*/
|
|
20
61
|
export declare function initLogger(config: Partial<LoggerConfig>): void;
|
|
62
|
+
/**
|
|
63
|
+
* Get logger for a domain
|
|
64
|
+
* Convenience function to avoid accessing LoggerManager directly
|
|
65
|
+
*/
|
|
21
66
|
export declare function getDomainLogger(domain: string, additionalFields?: Record<string, any>): Logger;
|
|
67
|
+
/**
|
|
68
|
+
* Get logger for a specific component within a domain
|
|
69
|
+
*/
|
|
22
70
|
export declare function getComponentLogger(domain: string, component: string, additionalFields?: Record<string, any>): Logger;
|
|
71
|
+
/**
|
|
72
|
+
* Set global log level
|
|
73
|
+
*/
|
|
23
74
|
export declare function setGlobalLogLevel(level: LogLevel): void;
|
|
75
|
+
/**
|
|
76
|
+
* Enable or disable caller information globally
|
|
77
|
+
*/
|
|
24
78
|
export declare function setGlobalCallerEnabled(enabled: boolean): void;
|
|
79
|
+
/**
|
|
80
|
+
* Set JSON format globally
|
|
81
|
+
*/
|
|
25
82
|
export declare function setGlobalJsonFormat(enabled: boolean): void;
|
|
26
83
|
export { globalLoggerManager };
|
|
@@ -1,13 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scratch is a writable context used for stateful operations in Page/Node rendering.
|
|
3
|
+
* TypeScript equivalent of Go's maps.Scratch
|
|
4
|
+
*/
|
|
1
5
|
export declare class Scratch {
|
|
2
6
|
private values;
|
|
3
7
|
constructor();
|
|
8
|
+
/**
|
|
9
|
+
* Add will, for single values, add (using the + operator) the addend to the existing addend (if found).
|
|
10
|
+
* Supports numeric values and strings.
|
|
11
|
+
* If the first add for a key is an array or slice, then the next value(s) will be appended.
|
|
12
|
+
*/
|
|
4
13
|
add(key: string, newAddend: any): string;
|
|
5
14
|
Add(key: string, newAddend: any): string;
|
|
15
|
+
/**
|
|
16
|
+
* Set stores a value with the given key in the Node context.
|
|
17
|
+
* This value can later be retrieved with Get.
|
|
18
|
+
*/
|
|
6
19
|
set(key: string, value: any): string;
|
|
7
20
|
Set(key: string, value: any): string;
|
|
21
|
+
/**
|
|
22
|
+
* Delete deletes the given key.
|
|
23
|
+
*/
|
|
8
24
|
delete(key: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Get returns a value previously set by Add or Set.
|
|
27
|
+
*/
|
|
9
28
|
get(key: string): any;
|
|
10
29
|
Get(key: string): any;
|
|
30
|
+
/**
|
|
31
|
+
* Values returns the raw backing map.
|
|
32
|
+
*/
|
|
11
33
|
getValues(): Map<string, any>;
|
|
34
|
+
/**
|
|
35
|
+
* SetInMap stores a value to a map with the given key in the Node context.
|
|
36
|
+
*/
|
|
12
37
|
setInMap(key: string, mapKey: string, value: any): string;
|
|
13
38
|
}
|
|
@@ -33,12 +33,12 @@ export declare class Item {
|
|
|
33
33
|
export declare enum ItemType {
|
|
34
34
|
tError = 0,
|
|
35
35
|
tEOF = 1,
|
|
36
|
-
TypeLeadSummaryDivider = 2
|
|
36
|
+
TypeLeadSummaryDivider = 2,// <!--more-->, # more
|
|
37
37
|
TypeFrontMatterYAML = 3,
|
|
38
38
|
TypeFrontMatterTOML = 4,
|
|
39
39
|
TypeFrontMatterJSON = 5,
|
|
40
40
|
TypeFrontMatterORG = 6,
|
|
41
|
-
TypeIgnore = 7
|
|
41
|
+
TypeIgnore = 7,// The BOM Unicode byte order marker and possibly others
|
|
42
42
|
tLeftDelimScNoMarkup = 8,
|
|
43
43
|
tRightDelimScNoMarkup = 9,
|
|
44
44
|
tLeftDelimScWithMarkup = 10,
|
|
@@ -49,7 +49,7 @@ export declare enum ItemType {
|
|
|
49
49
|
tScParam = 15,
|
|
50
50
|
tScParamVal = 16,
|
|
51
51
|
tIndentation = 17,
|
|
52
|
-
tText = 18
|
|
52
|
+
tText = 18,// plain text
|
|
53
53
|
tKeywordMarker = 19
|
|
54
54
|
}
|
|
55
55
|
export type Items = Item[];
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
export interface SuffixInfo {
|
|
2
|
+
/** Suffix without the delimiter, e.g. "xml" */
|
|
2
3
|
suffix: string;
|
|
4
|
+
/** Full suffix with delimiter, e.g. ".xml" */
|
|
3
5
|
fullSuffix: string;
|
|
4
6
|
}
|
|
5
7
|
export declare class MediaType {
|
|
8
|
+
/** Full MIME type string, e.g. "application/rss+xml" */
|
|
6
9
|
type: string;
|
|
10
|
+
/** Main type, e.g. "application" */
|
|
7
11
|
mainType: string;
|
|
12
|
+
/** Subtype, e.g. "rss" */
|
|
8
13
|
subType: string;
|
|
14
|
+
/** Delimiter before the suffix, e.g. "." */
|
|
9
15
|
delimiter: string;
|
|
16
|
+
/** First suffix (not exposed to external JSON) */
|
|
10
17
|
firstSuffix: SuffixInfo;
|
|
18
|
+
/** Optional MIME suffix after "+", e.g. "xml" */
|
|
11
19
|
private mimeSuffix;
|
|
20
|
+
/** CSV of alternative suffixes, for internal comparison only */
|
|
12
21
|
private suffixesCSV;
|
|
13
22
|
constructor(init: {
|
|
14
23
|
type: string;
|
|
@@ -19,7 +28,17 @@ export declare class MediaType {
|
|
|
19
28
|
mimeSuffix: string;
|
|
20
29
|
suffixesCSV: string;
|
|
21
30
|
});
|
|
31
|
+
/**
|
|
32
|
+
* Returns the subtype part of the MIME type.
|
|
33
|
+
* If subType is empty, try to extract it from the full type string.
|
|
34
|
+
*/
|
|
22
35
|
sub(): string;
|
|
36
|
+
/**
|
|
37
|
+
* Returns the MIME suffix, e.g. "xml" from "application/rss+xml"
|
|
38
|
+
*/
|
|
23
39
|
getMimeSuffix(): string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Returns the list of suffixes if defined.
|
|
42
|
+
*/
|
|
24
43
|
getSuffixList(): string[];
|
|
25
44
|
}
|
|
@@ -1,14 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 页面任务:包含语言和路径信息
|
|
3
|
+
*/
|
|
1
4
|
export interface PageTask {
|
|
2
5
|
language: string;
|
|
3
6
|
pagePath: string;
|
|
4
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* 全局页面过滤器
|
|
10
|
+
* 纯工具类,用于控制哪些页面需要处理
|
|
11
|
+
*
|
|
12
|
+
* 统一模式:始终使用 (language, pagePath) 对进行过滤
|
|
13
|
+
*/
|
|
5
14
|
declare class PageFilterManager {
|
|
6
15
|
private filterSet;
|
|
7
16
|
private currentLanguage;
|
|
17
|
+
/**
|
|
18
|
+
* 设置页面过滤器
|
|
19
|
+
* @param tasks Array of {language, pagePath}
|
|
20
|
+
*/
|
|
8
21
|
setFilter(tasks: PageTask[]): void;
|
|
22
|
+
/**
|
|
23
|
+
* 设置当前处理的语言
|
|
24
|
+
*/
|
|
9
25
|
setCurrentLanguage(language: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* 清除过滤器
|
|
28
|
+
*/
|
|
10
29
|
clearFilter(): void;
|
|
30
|
+
/**
|
|
31
|
+
* 检查是否应该处理此页面 (O(1) 查找)
|
|
32
|
+
*
|
|
33
|
+
* @param language 语言代码
|
|
34
|
+
* @param pagePath 页面路径
|
|
35
|
+
* @returns true 如果应该处理,false 如果应该跳过
|
|
36
|
+
*/
|
|
11
37
|
shouldProcess(language: string, pagePath: string): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* 获取过滤器大小
|
|
40
|
+
*/
|
|
12
41
|
getFilterSize(): number;
|
|
13
42
|
}
|
|
14
43
|
export declare const pageFilter: PageFilterManager;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sanitize a string for use in URLs
|
|
3
|
+
*/
|
|
1
4
|
export declare function sanitize(input: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* Add context root to a path
|
|
7
|
+
*/
|
|
2
8
|
export declare function addContextRoot(root: string, path: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Create a permalink by joining base URL and path
|
|
11
|
+
*/
|
|
3
12
|
export declare function makePermalink(baseURL: string, path: string): URL;
|
|
4
13
|
export declare function dir(s: string): string;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { LiveReloadConfig, LiveReloadServer } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Node.js 环境下的 LiveReload 服务器实现
|
|
4
|
+
* 使用 WebSocket 进行实时通信
|
|
5
|
+
*
|
|
6
|
+
* 对于 Electron 环境,请使用 ElectronLiveReloadServer
|
|
7
|
+
* 或通过 createLiveReloadServer() 工厂函数自动选择合适的实现
|
|
8
|
+
*/
|
|
2
9
|
export declare class FoundryLiveReloadServer implements LiveReloadServer {
|
|
3
10
|
private httpServer;
|
|
4
11
|
private wsServer;
|
|
@@ -8,6 +8,9 @@ export declare class ContentFileWatcher implements FileWatcher {
|
|
|
8
8
|
private callbacks;
|
|
9
9
|
private isSingleFileMode;
|
|
10
10
|
constructor(config: WatcherConfig);
|
|
11
|
+
/**
|
|
12
|
+
* 检测是否所有路径都是单个文件
|
|
13
|
+
*/
|
|
11
14
|
private detectSingleFileMode;
|
|
12
15
|
startWatching(): Promise<void>;
|
|
13
16
|
onFileChange(callback: (events: FileChangeEvent[]) => Promise<void>): void;
|