@mdfriday/foundry 26.4.20 → 26.5.2
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 +2 -2
- package/dist/cjs/worker/worker-node.js +2 -2
- 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 +66 -0
- 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 +236 -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 +132 -0
- 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 +310 -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 +24 -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 +20 -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 +40 -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/pricing.d.ts +64 -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/token-usage.d.ts +26 -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 +36 -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 +71 -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 +22 -0
- package/dist/types/internal/infrastructure/llm/openai-compatible-provider.d.ts +75 -0
- package/dist/types/internal/infrastructure/llm/provider-factory.d.ts +36 -0
- package/dist/types/internal/infrastructure/llm/provider.d.ts +90 -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
|
@@ -2,9 +2,15 @@ import { FsService } from '../type';
|
|
|
2
2
|
import { PageTreesNode, WeightedTermTreeNode } from './pagetrees';
|
|
3
3
|
import { PageBuilder } from './pagebuilder';
|
|
4
4
|
import { NodeShiftTree, TreeShiftTree } from '@pkg/doctree';
|
|
5
|
+
/**
|
|
6
|
+
* Term class - exact replica of Go's Term struct
|
|
7
|
+
*/
|
|
5
8
|
export declare class Term {
|
|
6
9
|
terms: Record<string, string[]>;
|
|
7
10
|
fsSvc: FsService;
|
|
8
11
|
constructor(fsSvc: FsService);
|
|
12
|
+
/**
|
|
13
|
+
* Assemble - exact replica of Go's Assemble method
|
|
14
|
+
*/
|
|
9
15
|
assemble(pages: NodeShiftTree<PageTreesNode>, entries: TreeShiftTree<WeightedTermTreeNode>, pb: PageBuilder, langIdx: number): Promise<Error | null>;
|
|
10
16
|
}
|
|
@@ -10,10 +10,32 @@ export declare class Translator {
|
|
|
10
10
|
private contentLanguage;
|
|
11
11
|
private translateFuncs;
|
|
12
12
|
constructor(contentLanguage: string);
|
|
13
|
+
/**
|
|
14
|
+
* Translate a translation ID for a specific language
|
|
15
|
+
* @param lang Language code (e.g., 'en', 'cn', 'zh-TW')
|
|
16
|
+
* @param translationID Translation identifier
|
|
17
|
+
* @returns Translated string or fallback
|
|
18
|
+
*/
|
|
13
19
|
translate(lang: string, translationID: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Setup translation functions from i18n files
|
|
22
|
+
* @param fsService File system service to read i18n files
|
|
23
|
+
*/
|
|
14
24
|
setupTranslateFuncs(fsService: FsService): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Read i18n file content from FileMetaInfo
|
|
27
|
+
*/
|
|
15
28
|
private readI18nFile;
|
|
29
|
+
/**
|
|
30
|
+
* Parse YAML content into translation items
|
|
31
|
+
*/
|
|
16
32
|
private parseI18nContent;
|
|
33
|
+
/**
|
|
34
|
+
* Get available languages
|
|
35
|
+
*/
|
|
17
36
|
getAvailableLanguages(): string[];
|
|
37
|
+
/**
|
|
38
|
+
* Check if a language is supported
|
|
39
|
+
*/
|
|
18
40
|
hasLanguage(lang: string): boolean;
|
|
19
41
|
}
|
|
@@ -293,10 +293,16 @@ export interface PageSorter {
|
|
|
293
293
|
less(i: number, j: number): boolean;
|
|
294
294
|
}
|
|
295
295
|
export type CollatorStringCompare = (getString: (page: Page) => string, p1: Page, p2: Page) => number;
|
|
296
|
+
/**
|
|
297
|
+
* OrdinalWeightPage - TypeScript equivalent of Go's OrdinalWeightPage interface
|
|
298
|
+
*/
|
|
296
299
|
export interface OrdinalWeightPage {
|
|
297
300
|
weight(): number;
|
|
298
301
|
ordinal(): number;
|
|
299
302
|
page(): Page;
|
|
300
303
|
owner(): Page;
|
|
301
304
|
}
|
|
305
|
+
/**
|
|
306
|
+
* WalkTaxonomyFunc - TypeScript equivalent of Go's WalkTaxonomyFunc
|
|
307
|
+
*/
|
|
302
308
|
export type WalkTaxonomyFunc = (taxonomy: string, term: string, page: OrdinalWeightPage) => Promise<void>;
|
|
@@ -4,12 +4,36 @@ export declare class Classifier {
|
|
|
4
4
|
private files;
|
|
5
5
|
constructor(files: FileInfo[]);
|
|
6
6
|
static newClassifier(fis: FileMetaInfo[]): Promise<Classifier>;
|
|
7
|
+
/**
|
|
8
|
+
* Sort files using the same logic as Go version
|
|
9
|
+
*/
|
|
7
10
|
private sort;
|
|
11
|
+
/**
|
|
12
|
+
* GetLeaf - returns the first leaf bundle file
|
|
13
|
+
*/
|
|
8
14
|
getLeaf(): FileInfo | null;
|
|
15
|
+
/**
|
|
16
|
+
* Get all files
|
|
17
|
+
*/
|
|
9
18
|
getFiles(): FileInfo[];
|
|
19
|
+
/**
|
|
20
|
+
* Get number of files
|
|
21
|
+
*/
|
|
10
22
|
length(): number;
|
|
23
|
+
/**
|
|
24
|
+
* Get file at index
|
|
25
|
+
*/
|
|
11
26
|
at(index: number): FileInfo | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Filter files by predicate
|
|
29
|
+
*/
|
|
12
30
|
filter(predicate: (file: FileInfo) => boolean): FileInfo[];
|
|
31
|
+
/**
|
|
32
|
+
* Find first file matching predicate
|
|
33
|
+
*/
|
|
13
34
|
find(predicate: (file: FileInfo) => boolean): FileInfo | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Check if empty
|
|
37
|
+
*/
|
|
14
38
|
isEmpty(): boolean;
|
|
15
39
|
}
|
|
@@ -1,25 +1,90 @@
|
|
|
1
1
|
import { FrontMatter, FrontMatterParser, LangService, TaxonomyService } from '../type';
|
|
2
2
|
export type Params = Record<string, any>;
|
|
3
|
+
/**
|
|
4
|
+
* NewFrontMatter creates a new FrontMatter instance with default values
|
|
5
|
+
* Modified: Don't set default date - will be set from file modTime
|
|
6
|
+
*/
|
|
3
7
|
export declare function newFrontMatter(): FrontMatter;
|
|
8
|
+
/**
|
|
9
|
+
* FrontMatterParser class - exact replica of Go's FrontMatterParser struct
|
|
10
|
+
*/
|
|
4
11
|
export declare class FrontMatterParserImpl implements FrontMatterParser {
|
|
5
12
|
params: Record<string, any> | undefined;
|
|
6
13
|
langSvc: LangService;
|
|
7
14
|
taxonomySvc: TaxonomyService;
|
|
8
15
|
constructor(params: Record<string, any> | undefined, langSvc: LangService, taxonomySvc: TaxonomyService);
|
|
16
|
+
/**
|
|
17
|
+
* Parse front matter from parameters
|
|
18
|
+
* Exact replica of Go version: func (b *FrontMatterParser) Parse() (*FrontMatter, error)
|
|
19
|
+
*/
|
|
9
20
|
parse(baseURL: string): Promise<FrontMatter>;
|
|
21
|
+
/**
|
|
22
|
+
* Parse date field
|
|
23
|
+
* Modified: Don't set default date here, let applyFrontMatter handle it based on file modTime
|
|
24
|
+
*/
|
|
10
25
|
private parseDate;
|
|
26
|
+
/**
|
|
27
|
+
* Parse weight field
|
|
28
|
+
* Exact replica of Go version: func (b *FrontMatterParser) parseWeight(fm *FrontMatter) error
|
|
29
|
+
*/
|
|
11
30
|
private parseWeight;
|
|
31
|
+
/**
|
|
32
|
+
* Parse title field
|
|
33
|
+
* Exact replica of Go version: func (b *FrontMatterParser) parseTitle(fm *FrontMatter) error
|
|
34
|
+
*/
|
|
12
35
|
private parseTitle;
|
|
13
36
|
private parseDescription;
|
|
37
|
+
/**
|
|
38
|
+
* Parse customized fields (path, lang, kind)
|
|
39
|
+
* Exact replica of Go version: func (b *FrontMatterParser) parseCustomized(fm *FrontMatter) error
|
|
40
|
+
*/
|
|
14
41
|
private parseCustomized;
|
|
42
|
+
/**
|
|
43
|
+
* Parse terms (taxonomies)
|
|
44
|
+
* Exact replica of Go version: func (b *FrontMatterParser) parseTerms(fm *FrontMatter) error
|
|
45
|
+
*/
|
|
15
46
|
private parseTerms;
|
|
47
|
+
/**
|
|
48
|
+
* Parse organization field
|
|
49
|
+
* Parses organization configuration from front matter parameters
|
|
50
|
+
*/
|
|
16
51
|
private parseOrganization;
|
|
52
|
+
/**
|
|
53
|
+
* Parse menu field
|
|
54
|
+
* Parses menu configuration from front matter parameters
|
|
55
|
+
*/
|
|
17
56
|
private parseMenu;
|
|
57
|
+
/**
|
|
58
|
+
* Parse menu items array
|
|
59
|
+
* Helper method to parse an array of menu item objects
|
|
60
|
+
*/
|
|
18
61
|
private parseMenuItems;
|
|
62
|
+
/**
|
|
63
|
+
* Parse author field
|
|
64
|
+
* Parses author configuration from front matter parameters
|
|
65
|
+
*/
|
|
19
66
|
private parseAuthor;
|
|
67
|
+
/**
|
|
68
|
+
* Parse contact information (shared between Organization and Author)
|
|
69
|
+
*/
|
|
20
70
|
private parseContact;
|
|
71
|
+
/**
|
|
72
|
+
* Parse social information (shared between Organization and Author)
|
|
73
|
+
*/
|
|
21
74
|
private parseSocial;
|
|
75
|
+
/**
|
|
76
|
+
* Convert path to slash preserving leading slash
|
|
77
|
+
* Equivalent to Go's paths.ToSlashPreserveLeading
|
|
78
|
+
*/
|
|
22
79
|
private toSlashPreserveLeading;
|
|
23
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Get parameter with case-insensitive key lookup (lowercase version)
|
|
83
|
+
* Exact replica of Go version: func GetParamToLower(m maps.Params, key string) any
|
|
84
|
+
*/
|
|
24
85
|
export declare function getParamToLower(m: Params, key: string): any;
|
|
86
|
+
/**
|
|
87
|
+
* Get parameter with case-insensitive key lookup
|
|
88
|
+
* Exact replica of Go version: func GetParam(p maps.Params, key string, stringToLower bool) any
|
|
89
|
+
*/
|
|
25
90
|
export declare function getParam(p: Record<string, any>, key: string, stringToLower: boolean): any;
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the page kind given a string, empty if not found.
|
|
3
|
+
* Note that this will not return any temporary kinds (e.g. robotstxt).
|
|
4
|
+
*/
|
|
1
5
|
export declare function getKindMain(s: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Returns whether the given kind is a branch node.
|
|
8
|
+
*/
|
|
2
9
|
export declare function isBranch(kind: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the new kind if the given kind is deprecated.
|
|
12
|
+
*/
|
|
3
13
|
export declare function isDeprecatedAndReplacedWith(s: string): string;
|
|
@@ -3,12 +3,31 @@ export declare class BaseFs implements Fs {
|
|
|
3
3
|
private readonly fs;
|
|
4
4
|
private readonly roots;
|
|
5
5
|
constructor(fs: Fs, roots: string[]);
|
|
6
|
+
/**
|
|
7
|
+
* Convert relative path to absolute path using the first root
|
|
8
|
+
* In BaseFs context, all paths are relative to the BaseFs root, even if they start with "/"
|
|
9
|
+
*/
|
|
6
10
|
private toAbsolutePath;
|
|
7
11
|
private isSameRootedPath;
|
|
12
|
+
/**
|
|
13
|
+
* Stat returns file info with opener function
|
|
14
|
+
*/
|
|
8
15
|
stat(name: string): Promise<IFileInfo>;
|
|
16
|
+
/**
|
|
17
|
+
* Open opens a file or directory
|
|
18
|
+
*/
|
|
9
19
|
open(name: string): Promise<IFile>;
|
|
20
|
+
/**
|
|
21
|
+
* Private method to open a file internally
|
|
22
|
+
*/
|
|
10
23
|
private openInternal;
|
|
24
|
+
/**
|
|
25
|
+
* Get the matching root path for a given name
|
|
26
|
+
*/
|
|
11
27
|
private getRoot;
|
|
28
|
+
/**
|
|
29
|
+
* Private method to open a directory
|
|
30
|
+
*/
|
|
12
31
|
private openDir;
|
|
13
32
|
create(name: string): Promise<IFile>;
|
|
14
33
|
mkdir(name: string, perm: number): Promise<void>;
|
|
@@ -22,4 +41,8 @@ export declare class BaseFs implements Fs {
|
|
|
22
41
|
chown(name: string, uid: number, gid: number): Promise<void>;
|
|
23
42
|
chtimes(name: string, atime: Date, mtime: Date): Promise<void>;
|
|
24
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Creates a new BaseFs instance
|
|
46
|
+
* TypeScript version of Go's NewBaseFs function
|
|
47
|
+
*/
|
|
25
48
|
export declare function newBaseFs(fs: Fs, roots: string[]): BaseFs;
|
|
@@ -2,6 +2,10 @@ import { FileMetaInfo, Fs as IFs, WalkCallback, WalkwayConfig } from '../type';
|
|
|
2
2
|
import { OriginFs } from './originfs';
|
|
3
3
|
import { OverlayFs } from './overlayfs';
|
|
4
4
|
import { Service } from "@internal/domain/fs";
|
|
5
|
+
/**
|
|
6
|
+
* Fs entity - main filesystem entity
|
|
7
|
+
* TypeScript version of Go's Fs struct
|
|
8
|
+
*/
|
|
5
9
|
export declare class Fs {
|
|
6
10
|
readonly originFs: OriginFs;
|
|
7
11
|
readonly prompts: OverlayFs;
|
|
@@ -14,7 +18,13 @@ export declare class Fs {
|
|
|
14
18
|
readonly work: IFs;
|
|
15
19
|
readonly service: Service;
|
|
16
20
|
constructor(originFs: OriginFs, prompts: OverlayFs, workflows: OverlayFs, content: OverlayFs[], layouts: OverlayFs, statics: OverlayFs, assets: OverlayFs, i18n: OverlayFs, work: IFs);
|
|
21
|
+
/**
|
|
22
|
+
* Get the OS filesystem
|
|
23
|
+
*/
|
|
17
24
|
os(): IFs;
|
|
25
|
+
/**
|
|
26
|
+
* Get the work filesystem
|
|
27
|
+
*/
|
|
18
28
|
workFs(): IFs;
|
|
19
29
|
workflowFs(): IFs;
|
|
20
30
|
promptFs(): IFs;
|
|
@@ -27,6 +37,9 @@ export declare class Fs {
|
|
|
27
37
|
newFileMetaInfo(filename: string): FileMetaInfo;
|
|
28
38
|
newFileMetaInfoWithContent(content: string): FileMetaInfo;
|
|
29
39
|
getFileMetaInfos(paths: string[]): Promise<Map<string, FileMetaInfo>>;
|
|
40
|
+
/**
|
|
41
|
+
* Create new base path filesystem
|
|
42
|
+
*/
|
|
30
43
|
newBasePathFs(source: IFs, path: string): IFs;
|
|
31
44
|
walkPrompts(start: string, cb: WalkCallback, conf: WalkwayConfig): Promise<void>;
|
|
32
45
|
walkWorkflows(start: string, cb: WalkCallback, conf: WalkwayConfig): Promise<void>;
|
|
@@ -4,7 +4,13 @@ export declare class OriginFs {
|
|
|
4
4
|
readonly origin: IFs;
|
|
5
5
|
readonly publishDir: IFs;
|
|
6
6
|
constructor(source: IFs, origin: IFs, publishDir: IFs);
|
|
7
|
+
/**
|
|
8
|
+
* Get the source filesystem
|
|
9
|
+
*/
|
|
7
10
|
getSource(): IFs;
|
|
11
|
+
/**
|
|
12
|
+
* Get the origin filesystem
|
|
13
|
+
*/
|
|
8
14
|
getOrigin(): IFs;
|
|
9
15
|
publish(): IFs;
|
|
10
16
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { File, FileInfo, DirsMerger, InfoFunc, OverlayDirOptions, Fs } from '../type';
|
|
2
|
+
/**
|
|
3
|
+
* OverlayDir entity - represents a merged directory from multiple filesystems
|
|
4
|
+
* TypeScript version of Go's Dir struct
|
|
5
|
+
*/
|
|
2
6
|
export declare class OverlayDir implements File {
|
|
3
7
|
private _name;
|
|
4
8
|
private fss;
|
|
@@ -10,14 +14,41 @@ export declare class OverlayDir implements File {
|
|
|
10
14
|
private fis;
|
|
11
15
|
private closed;
|
|
12
16
|
constructor(options?: OverlayDirOptions);
|
|
17
|
+
/**
|
|
18
|
+
* Get file name
|
|
19
|
+
*/
|
|
13
20
|
name(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Check if directory is closed
|
|
23
|
+
*/
|
|
14
24
|
private isClosed;
|
|
25
|
+
/**
|
|
26
|
+
* Read directory entries
|
|
27
|
+
*/
|
|
15
28
|
readdir(count: number): Promise<FileInfo[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Read directory names
|
|
31
|
+
*/
|
|
16
32
|
readdirnames(n: number): Promise<string[]>;
|
|
33
|
+
/**
|
|
34
|
+
* Load directory entries from all filesystems
|
|
35
|
+
*/
|
|
17
36
|
private loadDirectoryEntries;
|
|
37
|
+
/**
|
|
38
|
+
* Read directory entries from a specific filesystem or file
|
|
39
|
+
*/
|
|
18
40
|
private readFromFilesystem;
|
|
41
|
+
/**
|
|
42
|
+
* Get file statistics
|
|
43
|
+
*/
|
|
19
44
|
stat(): Promise<FileInfo>;
|
|
45
|
+
/**
|
|
46
|
+
* Close directory
|
|
47
|
+
*/
|
|
20
48
|
close(): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* Not supported operations for directories
|
|
51
|
+
*/
|
|
21
52
|
private notSupported;
|
|
22
53
|
read(buffer: Uint8Array): Promise<{
|
|
23
54
|
bytesRead: number;
|
|
@@ -42,7 +73,20 @@ export declare class OverlayDir implements File {
|
|
|
42
73
|
bytesWritten: number;
|
|
43
74
|
}>;
|
|
44
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Get a directory from the pool
|
|
78
|
+
*/
|
|
45
79
|
export declare function getDir(): OverlayDir;
|
|
80
|
+
/**
|
|
81
|
+
* Release a directory back to the pool
|
|
82
|
+
*/
|
|
46
83
|
export declare function releaseDir(dir: OverlayDir): void;
|
|
84
|
+
/**
|
|
85
|
+
* Open a new merged directory
|
|
86
|
+
* TypeScript version of Go's OpenDir function
|
|
87
|
+
*/
|
|
47
88
|
export declare function openDir(name: string, merge: DirsMerger | null, info: InfoFunc | null, fss: Fs[]): Promise<OverlayDir>;
|
|
89
|
+
/**
|
|
90
|
+
* Create a new OverlayDir instance
|
|
91
|
+
*/
|
|
48
92
|
export declare function newOverlayDir(options?: OverlayDirOptions): OverlayDir;
|
|
@@ -1,33 +1,112 @@
|
|
|
1
1
|
import { Fs, File, FileInfo, OverlayFs as IOverlayFs, DirsMerger, OverlayFsOptions } from '../type';
|
|
2
2
|
import { OverlayOptions } from '@internal/domain/fs/vo/overlayoptions';
|
|
3
|
+
/**
|
|
4
|
+
* OverlayFs entity - main overlay filesystem implementation
|
|
5
|
+
* TypeScript version of Go's OverlayFs struct
|
|
6
|
+
*/
|
|
3
7
|
export declare class OverlayFs implements IOverlayFs {
|
|
4
8
|
private fss;
|
|
5
9
|
private mergeDirs;
|
|
6
10
|
private firstWritable;
|
|
7
11
|
constructor(options: OverlayOptions);
|
|
12
|
+
/**
|
|
13
|
+
* Get filesystem name
|
|
14
|
+
*/
|
|
8
15
|
name(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Implementation of FilesystemIterator interface
|
|
18
|
+
*/
|
|
9
19
|
filesystem(i: number): Fs | null;
|
|
20
|
+
/**
|
|
21
|
+
* Get number of filesystems in overlay
|
|
22
|
+
*/
|
|
10
23
|
numFilesystems(): number;
|
|
24
|
+
/**
|
|
25
|
+
* Append filesystems to overlay (returns new instance)
|
|
26
|
+
*/
|
|
11
27
|
append(...fss: Fs[]): OverlayFs;
|
|
28
|
+
/**
|
|
29
|
+
* Set directory merger (returns new instance)
|
|
30
|
+
*/
|
|
12
31
|
withDirsMerger(merger: DirsMerger): OverlayFs;
|
|
32
|
+
/**
|
|
33
|
+
* Get writable filesystem (first filesystem if firstWritable is true)
|
|
34
|
+
*/
|
|
13
35
|
private writeFs;
|
|
36
|
+
/**
|
|
37
|
+
* Collect directories from all filesystems
|
|
38
|
+
*/
|
|
14
39
|
private collectDirs;
|
|
40
|
+
/**
|
|
41
|
+
* Recursively collect directories from filesystem hierarchy
|
|
42
|
+
*/
|
|
15
43
|
private collectDirsRecursive;
|
|
44
|
+
/**
|
|
45
|
+
* Stat file/directory across all filesystems
|
|
46
|
+
*/
|
|
16
47
|
private statInternal;
|
|
48
|
+
/**
|
|
49
|
+
* Recursive stat implementation
|
|
50
|
+
*/
|
|
17
51
|
private statRecursive;
|
|
52
|
+
/**
|
|
53
|
+
* Check if error is "not exist" error
|
|
54
|
+
*/
|
|
18
55
|
private isNotExistError;
|
|
56
|
+
/**
|
|
57
|
+
* Create a file (write operation)
|
|
58
|
+
*/
|
|
19
59
|
create(name: string): Promise<File>;
|
|
60
|
+
/**
|
|
61
|
+
* Create directory (write operation)
|
|
62
|
+
*/
|
|
20
63
|
mkdir(name: string, perm: number): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Create directory tree (write operation)
|
|
66
|
+
*/
|
|
21
67
|
mkdirAll(path: string, perm: number): Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Open file for reading (searches all filesystems)
|
|
70
|
+
*/
|
|
22
71
|
open(name: string): Promise<File>;
|
|
72
|
+
/**
|
|
73
|
+
* Open file with flags (write operations use first filesystem)
|
|
74
|
+
*/
|
|
23
75
|
openFile(name: string, flag: number, perm: number): Promise<File>;
|
|
76
|
+
/**
|
|
77
|
+
* Remove file (write operation)
|
|
78
|
+
*/
|
|
24
79
|
remove(name: string): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* Remove directory tree (write operation)
|
|
82
|
+
*/
|
|
25
83
|
removeAll(path: string): Promise<void>;
|
|
84
|
+
/**
|
|
85
|
+
* Rename file (write operation)
|
|
86
|
+
*/
|
|
26
87
|
rename(oldname: string, newname: string): Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Get file info (searches all filesystems)
|
|
90
|
+
*/
|
|
27
91
|
stat(name: string): Promise<FileInfo>;
|
|
92
|
+
/**
|
|
93
|
+
* Change file mode (write operation)
|
|
94
|
+
*/
|
|
28
95
|
chmod(name: string, mode: number): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Change file ownership (write operation)
|
|
98
|
+
*/
|
|
29
99
|
chown(name: string, uid: number, gid: number): Promise<void>;
|
|
100
|
+
/**
|
|
101
|
+
* Change file times (write operation)
|
|
102
|
+
*/
|
|
30
103
|
chtimes(name: string, atime: Date, mtime: Date): Promise<void>;
|
|
31
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Factory function to create new OverlayFs
|
|
107
|
+
*/
|
|
32
108
|
export declare function newOverlayFs(options: OverlayOptions): OverlayFs;
|
|
109
|
+
/**
|
|
110
|
+
* Create OverlayFs from raw options
|
|
111
|
+
*/
|
|
33
112
|
export declare function createOverlayFs(opts: OverlayFsOptions): OverlayFs;
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import { FileMetaInfo } from '../type';
|
|
2
|
+
/**
|
|
3
|
+
* Service class for filesystem entity operations
|
|
4
|
+
* TypeScript equivalent of Go's Service struct
|
|
5
|
+
*/
|
|
2
6
|
export declare class Service {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new FileMetaInfo with the given filename
|
|
9
|
+
* TypeScript equivalent of Go's NewFileMetaInfo method
|
|
10
|
+
*/
|
|
3
11
|
newFileMetaInfo(filename: string): FileMetaInfo;
|
|
12
|
+
/**
|
|
13
|
+
* Creates a new FileMetaInfo with the given content
|
|
14
|
+
* TypeScript equivalent of Go's NewFileMetaInfoWithContent method
|
|
15
|
+
*/
|
|
4
16
|
newFileMetaInfoWithContent(content: string): FileMetaInfo;
|
|
5
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Creates a new Service instance
|
|
20
|
+
*/
|
|
6
21
|
export declare function newService(): Service;
|
|
7
22
|
export default Service;
|
|
@@ -36,20 +36,69 @@ export interface File {
|
|
|
36
36
|
}>;
|
|
37
37
|
}
|
|
38
38
|
export interface Fs {
|
|
39
|
+
/**
|
|
40
|
+
* Create creates a file in the filesystem, returning the file and an
|
|
41
|
+
* error, if any happens.
|
|
42
|
+
*/
|
|
39
43
|
create(name: string): Promise<File>;
|
|
44
|
+
/**
|
|
45
|
+
* Mkdir creates a directory in the filesystem, return an error if any
|
|
46
|
+
* happens.
|
|
47
|
+
*/
|
|
40
48
|
mkdir(name: string, perm: number): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* MkdirAll creates a directory path and all parents that does not exist
|
|
51
|
+
* yet.
|
|
52
|
+
*/
|
|
41
53
|
mkdirAll(path: string, perm: number): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Open opens a file, returning it or an error, if any happens.
|
|
56
|
+
*/
|
|
42
57
|
open(name: string): Promise<File>;
|
|
58
|
+
/**
|
|
59
|
+
* OpenFile opens a file using the given flags and the given mode.
|
|
60
|
+
*/
|
|
43
61
|
openFile(name: string, flag: number, perm: number): Promise<File>;
|
|
62
|
+
/**
|
|
63
|
+
* Remove removes a file identified by name, returning an error, if any
|
|
64
|
+
* happens.
|
|
65
|
+
*/
|
|
44
66
|
remove(name: string): Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* RemoveAll removes a directory path and any children it contains. It
|
|
69
|
+
* does not fail if the path does not exist (return null).
|
|
70
|
+
*/
|
|
45
71
|
removeAll(path: string): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Rename renames a file.
|
|
74
|
+
*/
|
|
46
75
|
rename(oldname: string, newname: string): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Stat returns a FileInfo describing the named file, or an error, if any
|
|
78
|
+
* happens.
|
|
79
|
+
*/
|
|
47
80
|
stat(name: string): Promise<FileInfo>;
|
|
81
|
+
/**
|
|
82
|
+
* The name of this FileSystem
|
|
83
|
+
*/
|
|
48
84
|
name(): string;
|
|
85
|
+
/**
|
|
86
|
+
* Chmod changes the mode of the named file to mode.
|
|
87
|
+
*/
|
|
49
88
|
chmod(name: string, mode: number): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* Chown changes the uid and gid of the named file.
|
|
91
|
+
*/
|
|
50
92
|
chown(name: string, uid: number, gid: number): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Chtimes changes the access and modification times of the named file
|
|
95
|
+
*/
|
|
51
96
|
chtimes(name: string, atime: Date, mtime: Date): Promise<void>;
|
|
52
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* File system error constants
|
|
100
|
+
* Equivalent to Go's afero error variables
|
|
101
|
+
*/
|
|
53
102
|
export declare class FsError extends Error {
|
|
54
103
|
code?: string | undefined;
|
|
55
104
|
constructor(message: string, code?: string | undefined);
|
|
@@ -60,6 +109,9 @@ export declare const ErrTooLarge: FsError;
|
|
|
60
109
|
export declare const ErrFileNotFound: FsError;
|
|
61
110
|
export declare const ErrFileExists: FsError;
|
|
62
111
|
export declare const ErrDestinationExists: FsError;
|
|
112
|
+
/**
|
|
113
|
+
* File open flags (equivalent to Go's vo package flags)
|
|
114
|
+
*/
|
|
63
115
|
export declare enum OpenFlags {
|
|
64
116
|
O_RDONLY = 0,
|
|
65
117
|
O_WRONLY = 1,
|
|
@@ -77,13 +129,25 @@ export interface FileMetaInfo extends FileInfo {
|
|
|
77
129
|
root(): string;
|
|
78
130
|
open(): Promise<File>;
|
|
79
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Walk function type - called for each file/directory during walk
|
|
134
|
+
*/
|
|
80
135
|
export type WalkFunc = (path: string, info: FileMetaInfo) => Promise<void | Error>;
|
|
136
|
+
/**
|
|
137
|
+
* Walk hook function type - called before/after processing directory contents
|
|
138
|
+
*/
|
|
81
139
|
export type WalkHook = (dir: FileMetaInfo, path: string, readdir: FileMetaInfo[]) => Promise<FileMetaInfo[]>;
|
|
140
|
+
/**
|
|
141
|
+
* WalkCallback structure containing hooks and walk function
|
|
142
|
+
*/
|
|
82
143
|
export interface WalkCallback {
|
|
83
144
|
hookPre?: WalkHook;
|
|
84
145
|
walkFn: WalkFunc;
|
|
85
146
|
hookPost?: WalkHook;
|
|
86
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* WalkwayConfig structure containing hooks and walk function
|
|
150
|
+
*/
|
|
87
151
|
export interface WalkwayConfig {
|
|
88
152
|
info?: FileMetaInfo;
|
|
89
153
|
dirEntries?: FileMetaInfo[];
|
|
@@ -91,24 +155,52 @@ export interface WalkwayConfig {
|
|
|
91
155
|
failOnNotExist?: boolean;
|
|
92
156
|
sortDirEntries?: boolean;
|
|
93
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* Walk-related errors
|
|
160
|
+
*/
|
|
94
161
|
export declare const ErrSkipDir: Error;
|
|
95
162
|
export declare const ErrWalkAlreadyWalked: FsError;
|
|
163
|
+
/**
|
|
164
|
+
* Filesystem iterator interface for iterating over wrapped filesystems
|
|
165
|
+
* TypeScript version of Go's FilesystemIterator
|
|
166
|
+
*/
|
|
96
167
|
export interface FilesystemIterator {
|
|
97
168
|
filesystem(i: number): Fs | null;
|
|
98
169
|
numFilesystems(): number;
|
|
99
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* Directory merger function type
|
|
173
|
+
* TypeScript version of Go's DirsMerger
|
|
174
|
+
*/
|
|
100
175
|
export type DirsMerger = (lofi: FileInfo[], bofi: FileInfo[]) => FileInfo[];
|
|
176
|
+
/**
|
|
177
|
+
* OverlayFs options configuration
|
|
178
|
+
* TypeScript version of Go's Options
|
|
179
|
+
*/
|
|
101
180
|
export interface OverlayFsOptions {
|
|
102
181
|
fss: Fs[];
|
|
103
182
|
firstWritable?: boolean;
|
|
104
183
|
dirsMerger?: DirsMerger;
|
|
105
184
|
}
|
|
185
|
+
/**
|
|
186
|
+
* OverlayFs interface extending base Fs functionality
|
|
187
|
+
* TypeScript version of Go's OverlayFs interface
|
|
188
|
+
*/
|
|
106
189
|
export interface OverlayFs extends Fs, FilesystemIterator {
|
|
107
190
|
append(...fss: Fs[]): OverlayFs;
|
|
108
191
|
withDirsMerger(merger: DirsMerger): OverlayFs;
|
|
109
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* Directory opener function type
|
|
195
|
+
*/
|
|
110
196
|
export type DirOpener = () => Promise<File>;
|
|
197
|
+
/**
|
|
198
|
+
* Info function type for directory stats
|
|
199
|
+
*/
|
|
111
200
|
export type InfoFunc = () => Promise<FileInfo>;
|
|
201
|
+
/**
|
|
202
|
+
* Overlay directory options
|
|
203
|
+
*/
|
|
112
204
|
export interface OverlayDirOptions {
|
|
113
205
|
name?: string;
|
|
114
206
|
fss?: Fs[];
|
|
@@ -116,6 +208,9 @@ export interface OverlayDirOptions {
|
|
|
116
208
|
info?: InfoFunc;
|
|
117
209
|
merge?: DirsMerger;
|
|
118
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* OverlayFs errors
|
|
213
|
+
*/
|
|
119
214
|
export declare class OverlayFsError extends FsError {
|
|
120
215
|
constructor(message: string, code?: string);
|
|
121
216
|
}
|