obsidian-dev-utils 19.1.2-beta.2 → 19.1.2-beta.3
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/CHANGELOG.md +4 -0
- package/dist/lib/cjs/Debug.d.cts +1 -1
- package/dist/lib/cjs/Library.cjs +1 -1
- package/dist/lib/cjs/ScriptUtils/CliUtils.d.cts +1 -1
- package/dist/lib/cjs/ScriptUtils/ESLint/index.d.cts +2 -2
- package/dist/lib/cjs/ScriptUtils/Fs.d.cts +1 -1
- package/dist/lib/cjs/ScriptUtils/JSON.d.cts +1 -1
- package/dist/lib/cjs/ScriptUtils/Npm.d.cts +1 -1
- package/dist/lib/cjs/ScriptUtils/Root.d.cts +1 -1
- package/dist/lib/cjs/ScriptUtils/esbuild/ObsidianPluginBuilder.d.cts +1 -1
- package/dist/lib/cjs/ScriptUtils/esbuild/index.d.cts +9 -9
- package/dist/lib/cjs/ScriptUtils/index.d.cts +17 -17
- package/dist/lib/cjs/String.d.cts +1 -1
- package/dist/lib/cjs/Transformers/DateTransformer.d.cts +1 -1
- package/dist/lib/cjs/Transformers/DurationTransformer.d.cts +1 -1
- package/dist/lib/cjs/Transformers/GroupTransformer.d.cts +1 -1
- package/dist/lib/cjs/Transformers/SkipPrivatePropertyTransformer.d.cts +1 -1
- package/dist/lib/cjs/Transformers/TypedTransformer.d.cts +1 -1
- package/dist/lib/cjs/Transformers/index.d.cts +6 -6
- package/dist/lib/cjs/ValueProvider.d.cts +1 -1
- package/dist/lib/cjs/codemirror/index.d.cts +1 -1
- package/dist/lib/cjs/index.d.cts +20 -20
- package/dist/lib/cjs/obsidian/@types/Dataview/api/data-array.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/api/extensions.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/api/inline-api.d.cts +9 -9
- package/dist/lib/cjs/obsidian/@types/Dataview/api/plugin-api.d.cts +10 -10
- package/dist/lib/cjs/obsidian/@types/Dataview/data-import/csv.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/data-import/inline-field.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/data-import/markdown-file.d.cts +3 -3
- package/dist/lib/cjs/obsidian/@types/Dataview/data-import/persister.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/data-import/web-worker/import-impl.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/data-index/index.d.cts +5 -5
- package/dist/lib/cjs/obsidian/@types/Dataview/data-index/resolver.d.cts +4 -4
- package/dist/lib/cjs/obsidian/@types/Dataview/data-model/markdown.d.cts +4 -4
- package/dist/lib/cjs/obsidian/@types/Dataview/data-model/serialized/markdown.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/data-model/value.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/expression/binaryop.d.cts +4 -4
- package/dist/lib/cjs/obsidian/@types/Dataview/expression/context.d.cts +6 -6
- package/dist/lib/cjs/obsidian/@types/Dataview/expression/field.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/expression/functions.d.cts +3 -3
- package/dist/lib/cjs/obsidian/@types/Dataview/expression/parse.d.cts +4 -4
- package/dist/lib/cjs/obsidian/@types/Dataview/index.d.cts +11 -11
- package/dist/lib/cjs/obsidian/@types/Dataview/main.d.cts +4 -4
- package/dist/lib/cjs/obsidian/@types/Dataview/query/engine.d.cts +9 -9
- package/dist/lib/cjs/obsidian/@types/Dataview/query/parse.d.cts +3 -3
- package/dist/lib/cjs/obsidian/@types/Dataview/query/query.d.cts +2 -2
- package/dist/lib/cjs/obsidian/@types/Dataview/typings/obsidian-ex.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/export/markdown.d.cts +3 -3
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/lp-render.d.cts +3 -3
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/markdown.d.cts +3 -3
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/refreshable-view.d.cts +2 -2
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/render.d.cts +2 -2
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/calendar-view.d.cts +4 -4
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/inline-field-live-preview.d.cts +2 -2
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/inline-view.d.cts +4 -4
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/js-view.d.cts +2 -2
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/list-view.d.cts +3 -3
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/table-view.d.cts +3 -3
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/task-view.d.cts +4 -4
- package/dist/lib/cjs/obsidian/@types/Dataview/util/media.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/util/normalize.d.cts +2 -2
- package/dist/lib/cjs/obsidian/AttachmentPath.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Backlink.d.cts +2 -2
- package/dist/lib/cjs/obsidian/Callout.d.cts +2 -2
- package/dist/lib/cjs/obsidian/Components/DateComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/DateTimeComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/EmailComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/FileComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/MonthComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/MultipleDropdownComponent.d.cts +4 -4
- package/dist/lib/cjs/obsidian/Components/MultipleEmailComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/MultipleFileComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/MultipleTextComponent.d.cts +4 -4
- package/dist/lib/cjs/obsidian/Components/NumberComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/TimeComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/TypedRangeTextComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/TypedTextComponent.d.cts +5 -5
- package/dist/lib/cjs/obsidian/Components/UrlComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/ValidatorComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/ValueComponentWithChangeTracking.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/WeekComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/index.d.cts +17 -17
- package/dist/lib/cjs/obsidian/Dataview.d.cts +6 -6
- package/dist/lib/cjs/obsidian/DataviewLink.d.cts +2 -2
- package/dist/lib/cjs/obsidian/FileChange.d.cts +3 -3
- package/dist/lib/cjs/obsidian/FileManager.d.cts +4 -4
- package/dist/lib/cjs/obsidian/Link.d.cts +3 -3
- package/dist/lib/cjs/obsidian/Logger.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Loop.d.cts +1 -1
- package/dist/lib/cjs/obsidian/MarkdownCodeBlockProcessor.d.cts +1 -1
- package/dist/lib/cjs/obsidian/MetadataCache.d.cts +3 -3
- package/dist/lib/cjs/obsidian/Modals/ModalBase.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Modals/Prompt.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Modals/index.d.cts +5 -5
- package/dist/lib/cjs/obsidian/Plugin/EmptySettings.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Plugin/PluginBase.d.cts +3 -3
- package/dist/lib/cjs/obsidian/Plugin/PluginSettingsBase.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Plugin/PluginSettingsTabBase.d.cts +5 -5
- package/dist/lib/cjs/obsidian/Plugin/index.d.cts +8 -8
- package/dist/lib/cjs/obsidian/Queue.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Reference.d.cts +1 -1
- package/dist/lib/cjs/obsidian/SettingEx.d.cts +13 -13
- package/dist/lib/cjs/obsidian/Vault.d.cts +3 -3
- package/dist/lib/cjs/obsidian/VaultEx.d.cts +1 -1
- package/dist/lib/cjs/obsidian/index.d.cts +29 -29
- package/dist/lib/esm/@types/debug.d.mts +16 -1
- package/dist/lib/esm/Async.d.mts +153 -1
- package/dist/lib/esm/Blob.d.mts +40 -1
- package/dist/lib/esm/CssClass.d.mts +97 -1
- package/dist/lib/esm/Debug.d.mts +41 -1
- package/dist/lib/esm/DebugController.d.mts +85 -1
- package/dist/lib/esm/Enum.d.mts +20 -1
- package/dist/lib/esm/Error.d.mts +45 -1
- package/dist/lib/esm/Function.d.mts +28 -1
- package/dist/lib/esm/HTMLElement.d.mts +49 -1
- package/dist/lib/esm/Library.d.mts +16 -1
- package/dist/lib/esm/Library.mjs +1 -1
- package/dist/lib/esm/Object.d.mts +211 -1
- package/dist/lib/esm/Path.d.mts +133 -1
- package/dist/lib/esm/RegExp.d.mts +18 -1
- package/dist/lib/esm/ScriptUtils/CliUtils.d.mts +70 -1
- package/dist/lib/esm/ScriptUtils/CodeGenerator.d.mts +12 -1
- package/dist/lib/esm/ScriptUtils/ESLint/@types/@guardian__eslint-plugin-tsdoc-required.d.mts +13 -1
- package/dist/lib/esm/ScriptUtils/ESLint/@types/eslint-plugin-modules-newlines.d.mts +13 -1
- package/dist/lib/esm/ScriptUtils/ESLint/@types/eslint-plugin-verify-tsdoc.d.mts +13 -1
- package/dist/lib/esm/ScriptUtils/ESLint/ESLint.d.mts +13 -1
- package/dist/lib/esm/ScriptUtils/ESLint/eslint.config.d.mts +16 -1
- package/dist/lib/esm/ScriptUtils/ESLint/index.d.mts +2 -1
- package/dist/lib/esm/ScriptUtils/Exec.d.mts +83 -1
- package/dist/lib/esm/ScriptUtils/Fs.d.mts +72 -1
- package/dist/lib/esm/ScriptUtils/JSON.d.mts +64 -1
- package/dist/lib/esm/ScriptUtils/NodeModules.d.mts +14 -1
- package/dist/lib/esm/ScriptUtils/Npm.d.mts +151 -1
- package/dist/lib/esm/ScriptUtils/NpmPublish.d.mts +9 -1
- package/dist/lib/esm/ScriptUtils/ObsidianDevUtilsRepoPaths.d.mts +106 -1
- package/dist/lib/esm/ScriptUtils/Root.d.mts +67 -1
- package/dist/lib/esm/ScriptUtils/build.d.mts +41 -1
- package/dist/lib/esm/ScriptUtils/cli.d.mts +14 -1
- package/dist/lib/esm/ScriptUtils/esbuild/Dependency.d.mts +18 -1
- package/dist/lib/esm/ScriptUtils/esbuild/ObsidianPluginBuilder.d.mts +53 -1
- package/dist/lib/esm/ScriptUtils/esbuild/changeExtensionPlugin.d.mts +12 -1
- package/dist/lib/esm/ScriptUtils/esbuild/copyToObsidianPluginsFolderPlugin.d.mts +18 -1
- package/dist/lib/esm/ScriptUtils/esbuild/fixEsmPlugin.d.mts +11 -1
- package/dist/lib/esm/ScriptUtils/esbuild/fixSourceMapsPlugin.d.mts +17 -1
- package/dist/lib/esm/ScriptUtils/esbuild/index.d.mts +9 -1
- package/dist/lib/esm/ScriptUtils/esbuild/preprocessPlugin.d.mts +23 -1
- package/dist/lib/esm/ScriptUtils/esbuild/renameCssPlugin.d.mts +8 -1
- package/dist/lib/esm/ScriptUtils/esbuild/svelteWrapperPlugin.d.mts +8 -1
- package/dist/lib/esm/ScriptUtils/format.d.mts +10 -1
- package/dist/lib/esm/ScriptUtils/index.d.mts +17 -1
- package/dist/lib/esm/ScriptUtils/spellcheck.d.mts +14 -1
- package/dist/lib/esm/ScriptUtils/version.d.mts +171 -1
- package/dist/lib/esm/String.d.mts +138 -1
- package/dist/lib/esm/Transformers/DateTransformer.d.mts +35 -1
- package/dist/lib/esm/Transformers/DurationTransformer.d.mts +34 -1
- package/dist/lib/esm/Transformers/GroupTransformer.d.mts +65 -1
- package/dist/lib/esm/Transformers/SkipPrivatePropertyTransformer.d.mts +32 -1
- package/dist/lib/esm/Transformers/Transformer.d.mts +67 -1
- package/dist/lib/esm/Transformers/TypedTransformer.d.mts +37 -1
- package/dist/lib/esm/Transformers/index.d.mts +6 -1
- package/dist/lib/esm/ValueProvider.d.mts +22 -1
- package/dist/lib/esm/codemirror/StateFieldSpec.d.mts +68 -1
- package/dist/lib/esm/codemirror/index.d.mts +1 -1
- package/dist/lib/esm/index.d.mts +20 -1
- package/dist/lib/esm/obsidian/@types/Dataview/api/data-array.d.mts +136 -1
- package/dist/lib/esm/obsidian/@types/Dataview/api/extensions.d.mts +15 -1
- package/dist/lib/esm/obsidian/@types/Dataview/api/inline-api.d.mts +186 -1
- package/dist/lib/esm/obsidian/@types/Dataview/api/plugin-api.d.mts +209 -1
- package/dist/lib/esm/obsidian/@types/Dataview/api/result.d.mts +38 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-import/common.d.mts +3 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-import/csv.d.mts +3 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-import/inline-field.d.mts +42 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-import/markdown-file.d.mts +52 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-import/persister.d.mts +32 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-import/web-worker/import-entry.d.mts +1 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-import/web-worker/import-impl.d.mts +6 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-import/web-worker/import-manager.d.mts +37 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-index/index.d.mts +186 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-index/resolver.d.mts +23 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-index/source.d.mts +71 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-model/markdown.d.mts +115 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-model/serialized/markdown.d.mts +106 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-model/transferable.d.mts +7 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-model/value.d.mts +175 -1
- package/dist/lib/esm/obsidian/@types/Dataview/expression/binaryop.d.mts +43 -1
- package/dist/lib/esm/obsidian/@types/Dataview/expression/context.d.mts +49 -1
- package/dist/lib/esm/obsidian/@types/Dataview/expression/field.d.mts +82 -1
- package/dist/lib/esm/obsidian/@types/Dataview/expression/functions.d.mts +149 -1
- package/dist/lib/esm/obsidian/@types/Dataview/expression/parse.d.mts +163 -1
- package/dist/lib/esm/obsidian/@types/Dataview/index.d.mts +55 -1
- package/dist/lib/esm/obsidian/@types/Dataview/main.d.mts +52 -1
- package/dist/lib/esm/obsidian/@types/Dataview/query/engine.d.mts +103 -1
- package/dist/lib/esm/obsidian/@types/Dataview/query/parse.d.mts +44 -1
- package/dist/lib/esm/obsidian/@types/Dataview/query/query.d.mts +95 -1
- package/dist/lib/esm/obsidian/@types/Dataview/settings.d.mts +60 -1
- package/dist/lib/esm/obsidian/@types/Dataview/typings/obsidian-ex.d.mts +28 -1
- package/dist/lib/esm/obsidian/@types/Dataview/typings/workers.d.mts +4 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/export/markdown.d.mts +15 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/lp-render.d.mts +37 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/markdown.d.mts +86 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/refreshable-view.d.mts +18 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/render.d.mts +33 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/views/calendar-view.d.mts +17 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/views/inline-field-live-preview.d.mts +42 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/views/inline-view.d.mts +28 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/views/js-view.d.mts +23 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/views/list-view.d.mts +25 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/views/table-view.d.mts +28 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/views/task-view.d.mts +51 -1
- package/dist/lib/esm/obsidian/@types/Dataview/util/hash.d.mts +1 -1
- package/dist/lib/esm/obsidian/@types/Dataview/util/locale.d.mts +2 -1
- package/dist/lib/esm/obsidian/@types/Dataview/util/media.d.mts +6 -1
- package/dist/lib/esm/obsidian/@types/Dataview/util/normalize.d.mts +44 -1
- package/dist/lib/esm/obsidian/App.d.mts +30 -1
- package/dist/lib/esm/obsidian/AttachmentPath.d.mts +54 -1
- package/dist/lib/esm/obsidian/Backlink.d.mts +60 -1
- package/dist/lib/esm/obsidian/Callout.d.mts +55 -1
- package/dist/lib/esm/obsidian/Components/DateComponent.d.mts +36 -1
- package/dist/lib/esm/obsidian/Components/DateTimeComponent.d.mts +36 -1
- package/dist/lib/esm/obsidian/Components/EmailComponent.d.mts +29 -1
- package/dist/lib/esm/obsidian/Components/FileComponent.d.mts +41 -1
- package/dist/lib/esm/obsidian/Components/MonthComponent.d.mts +49 -1
- package/dist/lib/esm/obsidian/Components/MultipleDropdownComponent.d.mts +73 -1
- package/dist/lib/esm/obsidian/Components/MultipleEmailComponent.d.mts +36 -1
- package/dist/lib/esm/obsidian/Components/MultipleFileComponent.d.mts +41 -1
- package/dist/lib/esm/obsidian/Components/MultipleTextComponent.d.mts +67 -1
- package/dist/lib/esm/obsidian/Components/NumberComponent.d.mts +29 -1
- package/dist/lib/esm/obsidian/Components/TimeComponent.d.mts +37 -1
- package/dist/lib/esm/obsidian/Components/TypedRangeTextComponent.d.mts +31 -1
- package/dist/lib/esm/obsidian/Components/TypedTextComponent.d.mts +84 -1
- package/dist/lib/esm/obsidian/Components/UrlComponent.d.mts +29 -1
- package/dist/lib/esm/obsidian/Components/ValidatorComponent.d.mts +22 -1
- package/dist/lib/esm/obsidian/Components/ValueComponentWithChangeTracking.d.mts +17 -1
- package/dist/lib/esm/obsidian/Components/WeekComponent.d.mts +49 -1
- package/dist/lib/esm/obsidian/Components/index.d.mts +17 -1
- package/dist/lib/esm/obsidian/Dataview.d.mts +215 -1
- package/dist/lib/esm/obsidian/DataviewLink.d.mts +23 -1
- package/dist/lib/esm/obsidian/FileChange.d.mts +68 -1
- package/dist/lib/esm/obsidian/FileManager.d.mts +38 -1
- package/dist/lib/esm/obsidian/FileSystem.d.mts +185 -1
- package/dist/lib/esm/obsidian/Frontmatter.d.mts +69 -1
- package/dist/lib/esm/obsidian/Link.d.mts +366 -1
- package/dist/lib/esm/obsidian/Logger.d.mts +13 -1
- package/dist/lib/esm/obsidian/Loop.d.mts +36 -1
- package/dist/lib/esm/obsidian/Markdown.d.mts +24 -1
- package/dist/lib/esm/obsidian/MarkdownCodeBlockProcessor.d.mts +23 -1
- package/dist/lib/esm/obsidian/MarkdownView.d.mts +12 -1
- package/dist/lib/esm/obsidian/MetadataCache.d.mts +87 -1
- package/dist/lib/esm/obsidian/Modals/Alert.d.mts +39 -1
- package/dist/lib/esm/obsidian/Modals/Confirm.d.mts +43 -1
- package/dist/lib/esm/obsidian/Modals/ModalBase.d.mts +35 -1
- package/dist/lib/esm/obsidian/Modals/Prompt.d.mts +50 -1
- package/dist/lib/esm/obsidian/Modals/SelectItem.d.mts +41 -1
- package/dist/lib/esm/obsidian/Modals/index.d.mts +5 -1
- package/dist/lib/esm/obsidian/ObsidianSettings.d.mts +17 -1
- package/dist/lib/esm/obsidian/Pdf.d.mts +24 -1
- package/dist/lib/esm/obsidian/Plugin/EmptySettings.d.mts +14 -1
- package/dist/lib/esm/obsidian/Plugin/ObsidianPluginRepoPaths.d.mts +53 -1
- package/dist/lib/esm/obsidian/Plugin/Plugin.d.mts +21 -1
- package/dist/lib/esm/obsidian/Plugin/PluginBase.d.mts +108 -1
- package/dist/lib/esm/obsidian/Plugin/PluginContext.d.mts +12 -1
- package/dist/lib/esm/obsidian/Plugin/PluginId.d.mts +20 -1
- package/dist/lib/esm/obsidian/Plugin/PluginSettingsBase.d.mts +31 -1
- package/dist/lib/esm/obsidian/Plugin/PluginSettingsTabBase.d.mts +99 -1
- package/dist/lib/esm/obsidian/Plugin/index.d.mts +8 -1
- package/dist/lib/esm/obsidian/Queue.d.mts +30 -1
- package/dist/lib/esm/obsidian/Reference.d.mts +21 -1
- package/dist/lib/esm/obsidian/RenameDeleteHandler.d.mts +49 -1
- package/dist/lib/esm/obsidian/ResourceUrl.d.mts +14 -1
- package/dist/lib/esm/obsidian/SettingEx.d.mts +124 -1
- package/dist/lib/esm/obsidian/Vault.d.mts +130 -1
- package/dist/lib/esm/obsidian/VaultEx.d.mts +27 -1
- package/dist/lib/esm/obsidian/index.d.mts +29 -1
- package/dist/lib/esm/url.d.mts +11 -1
- package/package.json +1 -1
@@ -1 +1,171 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* @packageDocumentation version
|
3
|
+
* This module provides functions for managing version updates in a project.
|
4
|
+
* It includes tasks such as validating version update types, checking the state
|
5
|
+
* of Git and GitHub CLI, updating version numbers in files, and performing
|
6
|
+
* Git operations such as tagging and pushing.
|
7
|
+
*
|
8
|
+
* The main function, `updateVersion`, coordinates these tasks to ensure that
|
9
|
+
* version updates are handled consistently and correctly. It also integrates
|
10
|
+
* with Obsidian plugins, if applicable, by updating relevant files and releasing
|
11
|
+
* new versions on GitHub.
|
12
|
+
*/
|
13
|
+
/**
|
14
|
+
* Enum representing different types of version updates.
|
15
|
+
*/
|
16
|
+
export declare enum VersionUpdateType {
|
17
|
+
Beta = "beta",
|
18
|
+
Invalid = "invalid",
|
19
|
+
Major = "major",
|
20
|
+
Manual = "manual",
|
21
|
+
Minor = "minor",
|
22
|
+
Patch = "patch"
|
23
|
+
}
|
24
|
+
/**
|
25
|
+
* Type representing the manifest file format for Obsidian plugins.
|
26
|
+
*/
|
27
|
+
export interface Manifest {
|
28
|
+
/**
|
29
|
+
* The minimum Obsidian version required for the plugin.
|
30
|
+
*/
|
31
|
+
minAppVersion: string;
|
32
|
+
/**
|
33
|
+
* The version of the plugin.
|
34
|
+
*/
|
35
|
+
version: string;
|
36
|
+
}
|
37
|
+
/**
|
38
|
+
* Type representing the structure of Obsidian releases JSON.
|
39
|
+
*/
|
40
|
+
export interface ObsidianReleasesJson {
|
41
|
+
/**
|
42
|
+
* The name of the Obsidian release.
|
43
|
+
*/
|
44
|
+
name: string;
|
45
|
+
}
|
46
|
+
/**
|
47
|
+
* Creates a Git tag for the new version.
|
48
|
+
*
|
49
|
+
* @param newVersion - The new version number to use for the tag.
|
50
|
+
* @returns A promise that resolves when the tag has been created.
|
51
|
+
*/
|
52
|
+
export declare function addGitTag(newVersion: string): Promise<void>;
|
53
|
+
/**
|
54
|
+
* Adds updated files to the Git staging area and commits them with the new version message.
|
55
|
+
*
|
56
|
+
* @param newVersion - The new version number used as the commit message.
|
57
|
+
* @returns A promise that resolves when the files have been added and committed.
|
58
|
+
*/
|
59
|
+
export declare function addUpdatedFilesToGit(newVersion: string): Promise<void>;
|
60
|
+
/**
|
61
|
+
* Checks if the GitHub CLI is installed on the system.
|
62
|
+
*
|
63
|
+
* Throws an error if the GitHub CLI is not installed.
|
64
|
+
*
|
65
|
+
* @throws Error if the GitHub CLI is not installed.
|
66
|
+
*/
|
67
|
+
export declare function checkGitHubCliInstalled(): Promise<void>;
|
68
|
+
/**
|
69
|
+
* Checks if Git is installed on the system.
|
70
|
+
*
|
71
|
+
* Throws an error if Git is not installed.
|
72
|
+
*
|
73
|
+
* @throws Error if Git is not installed.
|
74
|
+
*/
|
75
|
+
export declare function checkGitInstalled(): Promise<void>;
|
76
|
+
/**
|
77
|
+
* Checks if the Git repository is clean, meaning there are no uncommitted changes.
|
78
|
+
*
|
79
|
+
* Throws an error if the Git repository is not clean.
|
80
|
+
*
|
81
|
+
* @throws Error if the Git repository is not clean.
|
82
|
+
*/
|
83
|
+
export declare function checkGitRepoClean(): Promise<void>;
|
84
|
+
/**
|
85
|
+
* Copies the updated manifest file to the distribution build directory.
|
86
|
+
*
|
87
|
+
* @returns A promise that resolves when the copy operation is complete.
|
88
|
+
*/
|
89
|
+
export declare function copyUpdatedManifest(): Promise<void>;
|
90
|
+
/**
|
91
|
+
* Generates a new version string based on the current version and the specified update type.
|
92
|
+
*
|
93
|
+
* @param versionUpdateType - The type of version update (major, minor, patch, beta, or manual).
|
94
|
+
* @returns A `Promise` that resolves to the new version string.
|
95
|
+
* @throws Error if the current version format is invalid.
|
96
|
+
*/
|
97
|
+
export declare function getNewVersion(versionUpdateType: string): Promise<string>;
|
98
|
+
/**
|
99
|
+
* Retrieves the release notes for a specific version from the changelog.
|
100
|
+
*
|
101
|
+
* @param newVersion - The new version number for which to get the release notes.
|
102
|
+
* @returns A promise that resolves to the release notes for the specified version.
|
103
|
+
*/
|
104
|
+
export declare function getReleaseNotes(newVersion: string): Promise<string>;
|
105
|
+
/**
|
106
|
+
* Determines the type of version update based on the input string.
|
107
|
+
*
|
108
|
+
* @param versionUpdateType - The input string representing the version update type.
|
109
|
+
* @returns The corresponding `VersionUpdateType`.
|
110
|
+
*/
|
111
|
+
export declare function getVersionUpdateType(versionUpdateType: string): VersionUpdateType;
|
112
|
+
/**
|
113
|
+
* Pushes commits and tags to the remote Git repository.
|
114
|
+
*
|
115
|
+
* @returns A promise that resolves when the push operation is complete.
|
116
|
+
*/
|
117
|
+
export declare function gitPush(): Promise<void>;
|
118
|
+
/**
|
119
|
+
* Publishes a GitHub release for the new version.
|
120
|
+
*
|
121
|
+
* Handles the creation of a release and uploading files for either an Obsidian plugin or another project.
|
122
|
+
*
|
123
|
+
* @param newVersion - The new version number for the release.
|
124
|
+
* @param isObsidianPlugin - A boolean indicating if the project is an Obsidian plugin.
|
125
|
+
* @returns A promise that resolves when the release has been published.
|
126
|
+
*/
|
127
|
+
export declare function publishGitHubRelease(newVersion: string, isObsidianPlugin: boolean): Promise<void>;
|
128
|
+
/**
|
129
|
+
* Updates the changelog file with new version information and commit messages.
|
130
|
+
*
|
131
|
+
* This function reads the current changelog, appends new entries for the latest version,
|
132
|
+
* and prompts the user to review the changes.
|
133
|
+
*
|
134
|
+
* @param newVersion - The new version number to be added to the changelog.
|
135
|
+
* @returns A promise that resolves when the changelog update is complete.
|
136
|
+
*/
|
137
|
+
export declare function updateChangelog(newVersion: string): Promise<void>;
|
138
|
+
/**
|
139
|
+
* Updates the version of the project based on the specified update type.
|
140
|
+
*
|
141
|
+
* This function performs a series of tasks to handle version updates:
|
142
|
+
* 1. Validates the version update type.
|
143
|
+
* 2. Checks if Git and GitHub CLI are installed.
|
144
|
+
* 3. Verifies that the Git repository is clean.
|
145
|
+
* 4. Runs spellcheck and linting.
|
146
|
+
* 5. Builds the project.
|
147
|
+
* 6. Updates version in files and changelog.
|
148
|
+
* 7. Adds updated files to Git, tags the commit, and pushes to the repository.
|
149
|
+
* 8. If an Obsidian plugin, copies the updated manifest and publishes a GitHub release.
|
150
|
+
*
|
151
|
+
* @param versionUpdateType - The type of version update to perform (major, minor, patch, beta, or x.y.z[-beta:u]).
|
152
|
+
* @param prepareGitHubRelease - A callback function to prepare the GitHub release.
|
153
|
+
* @returns A promise that resolves when the version update is complete.
|
154
|
+
*/
|
155
|
+
export declare function updateVersion(versionUpdateType?: string, prepareGitHubRelease?: (newVersion: string) => Promise<void>): Promise<void>;
|
156
|
+
/**
|
157
|
+
* Updates the version in various files, including `package.json`, `package-lock.json`,
|
158
|
+
* and Obsidian plugin manifests if applicable.
|
159
|
+
*
|
160
|
+
* @param newVersion - The new version string to update in the files.
|
161
|
+
* @returns A `Promise` that resolves when the update is complete.
|
162
|
+
*/
|
163
|
+
export declare function updateVersionInFiles(newVersion: string): Promise<void>;
|
164
|
+
/**
|
165
|
+
* Validates the version update type to ensure it is either a recognized type
|
166
|
+
* or a valid manual version string.
|
167
|
+
*
|
168
|
+
* @param versionUpdateType - The version update type to validate.
|
169
|
+
* @throws Error if the version update type is invalid.
|
170
|
+
*/
|
171
|
+
export declare function validate(versionUpdateType: string): void;
|
@@ -1 +1,138 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* @packageDocumentation String
|
3
|
+
* Contains utility functions for string operations.
|
4
|
+
*/
|
5
|
+
import type { ValueProvider } from './ValueProvider.d.mts';
|
6
|
+
/**
|
7
|
+
* A synchronous/asynchronous function that generates replacement strings, or a string to replace with.
|
8
|
+
*/
|
9
|
+
export type AsyncReplacer<ReplaceGroupArgs extends string[]> = ValueProvider<StringReplacement, [ReplaceCommonArgs, ...ReplaceGroupArgs]>;
|
10
|
+
/**
|
11
|
+
* Common arguments for the `replaceAll`/`replaceAllAsync` functions.
|
12
|
+
*/
|
13
|
+
export interface ReplaceCommonArgs {
|
14
|
+
/**
|
15
|
+
* The groups of the match.
|
16
|
+
*/
|
17
|
+
groups: Record<string, string | undefined> | undefined;
|
18
|
+
/**
|
19
|
+
* The offset of the match.
|
20
|
+
*/
|
21
|
+
offset: number;
|
22
|
+
/**
|
23
|
+
* The source of the match.
|
24
|
+
*/
|
25
|
+
source: string;
|
26
|
+
/**
|
27
|
+
* The substring of the match.
|
28
|
+
*/
|
29
|
+
substring: string;
|
30
|
+
}
|
31
|
+
/**
|
32
|
+
* A synchronous function that generates replacement strings, or a string to replace with.
|
33
|
+
*/
|
34
|
+
export type Replacer<ReplaceGroupArgs extends string[]> = ((...args: [ReplaceCommonArgs, ...ReplaceGroupArgs]) => StringReplacement) | StringReplacement;
|
35
|
+
type StringReplacement = string | void;
|
36
|
+
/**
|
37
|
+
* Ensures that a string ends with the specified suffix, adding it if necessary.
|
38
|
+
*
|
39
|
+
* @param str - The string to check.
|
40
|
+
* @param suffix - The suffix to ensure.
|
41
|
+
* @returns The string that ends with the suffix.
|
42
|
+
*/
|
43
|
+
export declare function ensureEndsWith(str: string, suffix: string): string;
|
44
|
+
/**
|
45
|
+
* Ensures that a string starts with the specified prefix, adding it if necessary.
|
46
|
+
*
|
47
|
+
* @param str - The string to check.
|
48
|
+
* @param prefix - The prefix to ensure.
|
49
|
+
* @returns The string that starts with the prefix.
|
50
|
+
*/
|
51
|
+
export declare function ensureStartsWith(str: string, prefix: string): string;
|
52
|
+
/**
|
53
|
+
* Escapes special characters in a string.
|
54
|
+
*
|
55
|
+
* @param str - The string to escape.
|
56
|
+
* @returns The escaped string.
|
57
|
+
*/
|
58
|
+
export declare function escape(str: string): string;
|
59
|
+
/**
|
60
|
+
* Inserts a substring at a specified position in a string.
|
61
|
+
*
|
62
|
+
* @param str - The string to insert the substring into.
|
63
|
+
* @param substring - The substring to insert.
|
64
|
+
* @param startIndex - The index to insert the substring at.
|
65
|
+
* @param endIndex - The index to end the substring at.
|
66
|
+
* @returns The modified string with the substring inserted.
|
67
|
+
*/
|
68
|
+
export declare function insertAt(str: string, substring: string, startIndex: number, endIndex?: number): string;
|
69
|
+
/**
|
70
|
+
* Converts a string into a valid JavaScript variable name by replacing invalid characters with underscores.
|
71
|
+
*
|
72
|
+
* @param str - The string to convert.
|
73
|
+
* @returns The valid variable name.
|
74
|
+
*/
|
75
|
+
export declare function makeValidVariableName(str: string): string;
|
76
|
+
/**
|
77
|
+
* Normalizes a string by converting it to the NFC form and replacing non-breaking spaces with regular spaces.
|
78
|
+
*
|
79
|
+
* @param str - The string to normalize.
|
80
|
+
* @returns The normalized string.
|
81
|
+
*/
|
82
|
+
export declare function normalize(str: string): string;
|
83
|
+
/**
|
84
|
+
* Replaces occurrences of strings in a given string based on a replacements map.
|
85
|
+
*
|
86
|
+
* @param str - The string to perform replacements on.
|
87
|
+
* @param replacementsMap - An object mapping strings to their replacement values.
|
88
|
+
* @returns The modified string with replacements applied.
|
89
|
+
*/
|
90
|
+
export declare function replace(str: string, replacementsMap: Record<string, string>): string;
|
91
|
+
/**
|
92
|
+
* Replaces all occurrences of a search string or pattern with the results of an replacer function.
|
93
|
+
*
|
94
|
+
* @typeParam ReplaceGroupArgs - The type of additional arguments passed to the replacer function.
|
95
|
+
* @param str - The string in which to perform replacements.
|
96
|
+
* @param searchValue - The string or regular expression to search for.
|
97
|
+
* @param replacer - A replacer function that generates replacement strings, or a string to replace with.
|
98
|
+
* @returns The string with all replacements made.
|
99
|
+
*/
|
100
|
+
export declare function replaceAll<ReplaceGroupArgs extends string[]>(str: string, searchValue: RegExp | string, replacer: Replacer<ReplaceGroupArgs>): string;
|
101
|
+
/**
|
102
|
+
* Asynchronously replaces all occurrences of a search string or pattern with the results of an asynchronous replacer function.
|
103
|
+
*
|
104
|
+
* @typeParam ReplaceGroupArgs - The type of additional arguments passed to the replacer function.
|
105
|
+
* @param str - The string in which to perform replacements.
|
106
|
+
* @param searchValue - The string or regular expression to search for.
|
107
|
+
* @param replacer - A synchronous/asynchronous function that generates replacement strings, or a string to replace with.
|
108
|
+
* @returns A promise that resolves to the string with all replacements made.
|
109
|
+
*/
|
110
|
+
export declare function replaceAllAsync<ReplaceGroupArgs extends string[]>(str: string, searchValue: RegExp | string, replacer: AsyncReplacer<ReplaceGroupArgs>): Promise<string>;
|
111
|
+
/**
|
112
|
+
* Trims the specified suffix from the end of a string.
|
113
|
+
*
|
114
|
+
* @param str - The string to trim.
|
115
|
+
* @param suffix - The suffix to remove from the end of the string.
|
116
|
+
* @param shouldValidate - If true, throws an error if the string does not end with the suffix.
|
117
|
+
* @returns The trimmed string.
|
118
|
+
* @throws If `validate` is true and the string does not end with the suffix.
|
119
|
+
*/
|
120
|
+
export declare function trimEnd(str: string, suffix: string, shouldValidate?: boolean): string;
|
121
|
+
/**
|
122
|
+
* Trims the specified prefix from the start of a string.
|
123
|
+
*
|
124
|
+
* @param str - The string to trim.
|
125
|
+
* @param prefix - The prefix to remove from the start of the string.
|
126
|
+
* @param validate - If true, throws an error if the string does not start with the prefix.
|
127
|
+
* @returns The trimmed string.
|
128
|
+
* @throws If `validate` is true and the string does not start with the prefix.
|
129
|
+
*/
|
130
|
+
export declare function trimStart(str: string, prefix: string, validate?: boolean): string;
|
131
|
+
/**
|
132
|
+
* Unescapes a string by replacing escape sequences with their corresponding characters.
|
133
|
+
*
|
134
|
+
* @param str - The string to unescape.
|
135
|
+
* @returns The unescaped string.
|
136
|
+
*/
|
137
|
+
export declare function unescape(str: string): string;
|
138
|
+
export {};
|
@@ -1 +1,35 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* @packageDocumentation DateTransformer
|
3
|
+
* A transformer that can transform Date to an ISO string and back.
|
4
|
+
*/
|
5
|
+
import { TypedTransformer } from './TypedTransformer.d.mts';
|
6
|
+
/**
|
7
|
+
* A transformer that can transform Date to an ISO string and back.
|
8
|
+
*/
|
9
|
+
export declare class DateTransformer extends TypedTransformer<Date, string> {
|
10
|
+
/**
|
11
|
+
* The id of the transformer.
|
12
|
+
*/
|
13
|
+
get id(): string;
|
14
|
+
/**
|
15
|
+
* Determines if the value is a Date.
|
16
|
+
*
|
17
|
+
* @param value - The value to check.
|
18
|
+
* @returns A boolean indicating if the value is a Date.
|
19
|
+
*/
|
20
|
+
canTransform(value: unknown): value is Date;
|
21
|
+
/**
|
22
|
+
* Restores the value from a string.
|
23
|
+
*
|
24
|
+
* @param transformedValue - The transformed value.
|
25
|
+
* @returns The restored value.
|
26
|
+
*/
|
27
|
+
restoreValue(transformedValue: string): Date;
|
28
|
+
/**
|
29
|
+
* Transforms the value to a string.
|
30
|
+
*
|
31
|
+
* @param value - The value to transform.
|
32
|
+
* @returns The transformed value.
|
33
|
+
*/
|
34
|
+
transformValue(value: Date): string;
|
35
|
+
}
|
@@ -1 +1,34 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* @packageDocumentation DurationTransformer
|
3
|
+
* A transformer that can transform Duration to an ISO string and back.
|
4
|
+
*/
|
5
|
+
import type { Duration } from 'moment';
|
6
|
+
import { TypedTransformer } from './TypedTransformer.d.mts';
|
7
|
+
/**
|
8
|
+
* A transformer that converts a Duration to an ISO string and back.
|
9
|
+
*/
|
10
|
+
export declare class DurationTransformer extends TypedTransformer<Duration, string> {
|
11
|
+
/**
|
12
|
+
* The ID of the transformer.
|
13
|
+
* @returns The ID of the transformer.
|
14
|
+
*/
|
15
|
+
get id(): string;
|
16
|
+
/**
|
17
|
+
* Checks if the value is a Duration.
|
18
|
+
* @param value - The value to check.
|
19
|
+
* @returns True if the value is a Duration, false otherwise.
|
20
|
+
*/
|
21
|
+
canTransform(value: unknown): value is Duration;
|
22
|
+
/**
|
23
|
+
* Restores the value from a string.
|
24
|
+
* @param transformedValue - The string to restore the value from.
|
25
|
+
* @returns The restored value.
|
26
|
+
*/
|
27
|
+
restoreValue(transformedValue: string): Duration;
|
28
|
+
/**
|
29
|
+
* Transforms the value to a string.
|
30
|
+
* @param value - The value to transform.
|
31
|
+
* @returns The transformed value.
|
32
|
+
*/
|
33
|
+
transformValue(value: Duration): string;
|
34
|
+
}
|
@@ -1 +1,65 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* @packageDocumentation GroupTransformer
|
3
|
+
* A transformer that combines multiple transformers.
|
4
|
+
*/
|
5
|
+
import { Transformer } from './Transformer.d.mts';
|
6
|
+
/**
|
7
|
+
* A transformer that combines multiple transformers.
|
8
|
+
*/
|
9
|
+
export declare class GroupTransformer extends Transformer {
|
10
|
+
private readonly transformers;
|
11
|
+
/**
|
12
|
+
* The id of the transformer.
|
13
|
+
*/
|
14
|
+
get id(): string;
|
15
|
+
/**
|
16
|
+
* The transformers to combine.
|
17
|
+
*/
|
18
|
+
constructor(transformers: Transformer[]);
|
19
|
+
/**
|
20
|
+
* Determines if the value can be transformed by any of the transformers.
|
21
|
+
*
|
22
|
+
* @param value - The value to check.
|
23
|
+
* @param key - The key of the value to check.
|
24
|
+
* @returns A boolean indicating if the value can be transformed.
|
25
|
+
*/
|
26
|
+
canTransform(value: unknown, key: string): boolean;
|
27
|
+
/**
|
28
|
+
* Gets the transformer with the given id.
|
29
|
+
*
|
30
|
+
* @param transformerId - The id of the transformer to get.
|
31
|
+
* @returns The transformer with the given id.
|
32
|
+
*/
|
33
|
+
getTransformer(transformerId: string): Transformer;
|
34
|
+
/**
|
35
|
+
* Transforms the value using the first transformer that can transform it.
|
36
|
+
*
|
37
|
+
* @param value - The value to transform.
|
38
|
+
* @param key - The key of the value to transform.
|
39
|
+
* @returns The transformed value.
|
40
|
+
*/
|
41
|
+
transformValue(value: unknown, key: string): unknown;
|
42
|
+
/**
|
43
|
+
* Gets the id of the transformer that can transform the given value.
|
44
|
+
*
|
45
|
+
* @param value - The value to get the transformer id for.
|
46
|
+
* @param key - The key of the value to get the transformer id for.
|
47
|
+
* @returns The id of the transformer that can transform the given value.
|
48
|
+
*/
|
49
|
+
protected getTransformerId(value: unknown, key: string): null | string;
|
50
|
+
/**
|
51
|
+
* Restores the value using the first transformer that can restore it.
|
52
|
+
*
|
53
|
+
* @param value - The value to restore.
|
54
|
+
* @returns The restored value.
|
55
|
+
*/
|
56
|
+
protected restoreValue(): unknown;
|
57
|
+
/**
|
58
|
+
* Gets the first transformer that can transform the given value.
|
59
|
+
*
|
60
|
+
* @param value - The value to get the first transformer for.
|
61
|
+
* @param key - The key of the value to get the first transformer for.
|
62
|
+
* @returns The first transformer that can transform the given value.
|
63
|
+
*/
|
64
|
+
private getFirstTransformerThatCanTransform;
|
65
|
+
}
|
@@ -1 +1,32 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* @packageDocumentation SkipPrivatePropertyTransformer
|
3
|
+
* A transformer that skips private properties.
|
4
|
+
*/
|
5
|
+
import { Transformer } from './Transformer.d.mts';
|
6
|
+
/**
|
7
|
+
* A transformer that skips private properties.
|
8
|
+
*/
|
9
|
+
export declare class SkipPrivatePropertyTransformer extends Transformer {
|
10
|
+
/**
|
11
|
+
* The id of the transformer.
|
12
|
+
*/
|
13
|
+
get id(): string;
|
14
|
+
/**
|
15
|
+
* Determines if the transformer can transform the given value.
|
16
|
+
*
|
17
|
+
* @param _value - The value to check.
|
18
|
+
* @param key - The key of the value to check.
|
19
|
+
* @returns A boolean indicating if the transformer can transform the value.
|
20
|
+
*/
|
21
|
+
canTransform(_value: unknown, key: string): boolean;
|
22
|
+
/**
|
23
|
+
* Transforms the given value.
|
24
|
+
*
|
25
|
+
* @returns The transformed value.
|
26
|
+
*/
|
27
|
+
transformValue(): unknown;
|
28
|
+
/**
|
29
|
+
* Restores the given value.
|
30
|
+
*/
|
31
|
+
protected restoreValue(): unknown;
|
32
|
+
}
|
@@ -1 +1,67 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* @packageDocumentation Transformer
|
3
|
+
* A base class for transformers.
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* A base class for transformers.
|
7
|
+
*/
|
8
|
+
export declare abstract class Transformer {
|
9
|
+
/**
|
10
|
+
* The id of the transformer.
|
11
|
+
*/
|
12
|
+
abstract get id(): string;
|
13
|
+
/**
|
14
|
+
* Determines if the transformer can transform the given value.
|
15
|
+
*
|
16
|
+
* @param value - The value to check.
|
17
|
+
* @param key - The key of the value to check.
|
18
|
+
* @returns A boolean indicating if the transformer can transform the value.
|
19
|
+
*/
|
20
|
+
abstract canTransform(value: unknown, key: string): boolean;
|
21
|
+
/**
|
22
|
+
* Gets the transformer with the given id.
|
23
|
+
*
|
24
|
+
* @param transformerId - The id of the transformer to get.
|
25
|
+
* @returns The transformer with the given id.
|
26
|
+
*/
|
27
|
+
getTransformer(transformerId: string): Transformer;
|
28
|
+
/**
|
29
|
+
* Transforms the given object recursively.
|
30
|
+
*
|
31
|
+
* @param value - The value to transform.
|
32
|
+
* @returns The transformed value.
|
33
|
+
*/
|
34
|
+
transformObjectRecursively(value: object): Record<string, unknown>;
|
35
|
+
/**
|
36
|
+
* Transforms the given value.
|
37
|
+
*
|
38
|
+
* @param value - The value to transform.
|
39
|
+
* @param key - The key of the value to transform.
|
40
|
+
* @returns The transformed value.
|
41
|
+
*/
|
42
|
+
abstract transformValue(value: unknown, key: string): unknown;
|
43
|
+
/**
|
44
|
+
* Gets the id of the transformer that can transform the given value.
|
45
|
+
*
|
46
|
+
* @param value - The value to get the transformer id for.
|
47
|
+
* @param key - The key of the value to get the transformer id for.
|
48
|
+
* @returns The id of the transformer that can transform the given value.
|
49
|
+
*/
|
50
|
+
protected getTransformerId(value: unknown, key: string): null | string;
|
51
|
+
/**
|
52
|
+
* Restores the given value.
|
53
|
+
*
|
54
|
+
* @param transformedValue - The value to restore.
|
55
|
+
* @param key - The key of the value to restore.
|
56
|
+
* @returns The restored value.
|
57
|
+
*/
|
58
|
+
protected abstract restoreValue(transformedValue: unknown, key: string): unknown;
|
59
|
+
/**
|
60
|
+
* Transforms the given value recursively.
|
61
|
+
*
|
62
|
+
* @param value - The value to transform.
|
63
|
+
* @param key - The key of the value to transform.
|
64
|
+
* @returns The transformed value.
|
65
|
+
*/
|
66
|
+
private transformValueRecursively;
|
67
|
+
}
|
@@ -1 +1,37 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* @packageDocumentation TypedTransformer
|
3
|
+
* A base class for transformers that can transform and restore a specific type.
|
4
|
+
*/
|
5
|
+
import { Transformer } from './Transformer.d.mts';
|
6
|
+
/**
|
7
|
+
* A transformer that can transform and restore a specific type.
|
8
|
+
*
|
9
|
+
* @typeParam Source - The type of the source value.
|
10
|
+
* @typeParam Transformed - The type of the transformed value.
|
11
|
+
*/
|
12
|
+
export declare abstract class TypedTransformer<Source, Transformed> extends Transformer {
|
13
|
+
/**
|
14
|
+
* Determines if the transformer can transform the given value.
|
15
|
+
*
|
16
|
+
* @param value - The value to check.
|
17
|
+
* @param key - The key of the value to check.
|
18
|
+
* @returns A boolean indicating if the transformer can transform the value.
|
19
|
+
*/
|
20
|
+
abstract canTransform(value: unknown, key: string): value is Source;
|
21
|
+
/**
|
22
|
+
* Restores the given value.
|
23
|
+
*
|
24
|
+
* @param transformedValue - The value to restore.
|
25
|
+
* @param key - The key of the value to restore.
|
26
|
+
* @returns The restored value.
|
27
|
+
*/
|
28
|
+
abstract restoreValue(transformedValue: Transformed, key: string): Source;
|
29
|
+
/**
|
30
|
+
* Transforms the given value.
|
31
|
+
*
|
32
|
+
* @param value - The value to transform.
|
33
|
+
* @param key - The key of the value to transform.
|
34
|
+
* @returns The transformed value.
|
35
|
+
*/
|
36
|
+
abstract transformValue(value: Source, key: string): Transformed;
|
37
|
+
}
|
@@ -1 +1,6 @@
|
|
1
|
-
export * from '
|
1
|
+
export * as DateTransformer from './DateTransformer.d.mts';
|
2
|
+
export * as DurationTransformer from './DurationTransformer.d.mts';
|
3
|
+
export * as GroupTransformer from './GroupTransformer.d.mts';
|
4
|
+
export * as SkipPrivatePropertyTransformer from './SkipPrivatePropertyTransformer.d.mts';
|
5
|
+
export * as Transformer from './Transformer.d.mts';
|
6
|
+
export * as TypedTransformer from './TypedTransformer.d.mts';
|
@@ -1 +1,22 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* @packageDocumentation ValueProvider
|
3
|
+
* Contains utility types and functions for handling value providers, which can be either direct values or functions that return values.
|
4
|
+
*/
|
5
|
+
import type { MaybePromise } from './Async.d.mts';
|
6
|
+
/**
|
7
|
+
* Represents a value provider that can either be a direct value of type `Value` or a function that returns a value of type `Value`.
|
8
|
+
*
|
9
|
+
* @typeParam Value - The type of the value provided.
|
10
|
+
* @typeParam Args - The types of arguments passed to the function if the provider is a function.
|
11
|
+
*/
|
12
|
+
export type ValueProvider<Value, Args extends unknown[] = []> = ((...args: Args) => MaybePromise<Value>) | Value;
|
13
|
+
/**
|
14
|
+
* Resolves a value from a value provider, which can be either a direct value or a function that returns a value.
|
15
|
+
*
|
16
|
+
* @typeParam Args - The types of arguments passed to the function if the provider is a function.
|
17
|
+
* @typeParam Value - The type of the value provided.
|
18
|
+
* @param provider - The value provider to resolve.
|
19
|
+
* @param args - The arguments to pass to the function if the provider is a function.
|
20
|
+
* @returns A promise that resolves with the value provided by the value provider.
|
21
|
+
*/
|
22
|
+
export declare function resolveValue<Value, Args extends unknown[]>(provider: ValueProvider<Value, Args>, ...args: Args): Promise<Value>;
|