@mnaoumov/obsidian-dev-toolkit 0.0.0 → 1.0.0
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/LICENSE +21 -0
- package/README.md +7 -1
- package/bundlers/esbuild/package.json +6 -0
- package/bundlers/esbuild-impl/copy-to-obsidian-plugins-folder-plugin/package.json +6 -0
- package/bundlers/esbuild-impl/dependency/package.json +6 -0
- package/bundlers/esbuild-impl/fix-source-maps-plugin/package.json +6 -0
- package/bundlers/esbuild-impl/index/package.json +6 -0
- package/bundlers/esbuild-impl/obsidian-plugin-builder/package.json +6 -0
- package/bundlers/esbuild-impl/package.json +6 -0
- package/bundlers/esbuild-impl/preprocess-plugin/package.json +6 -0
- package/bundlers/esbuild-impl/rename-css-plugin/package.json +6 -0
- package/bundlers/index/package.json +6 -0
- package/bundlers/package.json +6 -0
- package/dist/demo-vault-helper/main.js +782 -0
- package/dist/demo-vault-helper/manifest.json +9 -0
- package/dist/integration-test-plugin/main.js +45388 -0
- package/dist/integration-test-plugin/manifest.json +8 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/copy-to-obsidian-plugins-folder-plugin.cjs +335 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/copy-to-obsidian-plugins-folder-plugin.d.cts +38 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/dependency.cjs +253 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/dependency.d.cts +20 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/fix-source-maps-plugin.cjs +226 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/fix-source-maps-plugin.d.cts +34 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/index.cjs +192 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/index.d.cts +7 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/obsidian-plugin-builder.cjs +375 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/obsidian-plugin-builder.d.cts +98 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/preprocess-plugin.cjs +247 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/preprocess-plugin.d.cts +30 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/rename-css-plugin.cjs +184 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/rename-css-plugin.d.cts +14 -0
- package/dist/lib/cjs/bundlers/esbuild.cjs +177 -0
- package/dist/lib/cjs/bundlers/esbuild.d.cts +11 -0
- package/dist/lib/cjs/bundlers/index.cjs +180 -0
- package/dist/lib/cjs/bundlers/index.d.cts +3 -0
- package/dist/lib/cjs/demo-vault-app-json.cjs +199 -0
- package/dist/lib/cjs/demo-vault-app-json.d.cts +93 -0
- package/dist/lib/cjs/demo-vault-buttons.cjs +580 -0
- package/dist/lib/cjs/demo-vault-buttons.d.cts +259 -0
- package/dist/lib/cjs/demo-vault-coverage.cjs +725 -0
- package/dist/lib/cjs/demo-vault-coverage.d.cts +533 -0
- package/dist/lib/cjs/demo-vault.cjs +309 -0
- package/dist/lib/cjs/demo-vault.d.cts +33 -0
- package/dist/lib/cjs/formatters/dprint.cjs +173 -0
- package/dist/lib/cjs/formatters/dprint.d.cts +15 -0
- package/dist/lib/cjs/formatters/index.cjs +177 -0
- package/dist/lib/cjs/formatters/index.d.cts +2 -0
- package/dist/lib/cjs/index.cjs +207 -0
- package/dist/lib/cjs/index.d.cts +16 -0
- package/dist/lib/cjs/integration-test-setup.cjs +142 -0
- package/dist/lib/cjs/integration-test-setup.d.cts +33 -0
- package/dist/lib/cjs/integration-test-vitest-global-setup.cjs +176 -0
- package/dist/lib/cjs/integration-test-vitest-global-setup.d.cts +39 -0
- package/dist/lib/cjs/jest-setup.cjs +147 -0
- package/dist/lib/cjs/jest-setup.d.cts +13 -0
- package/dist/lib/cjs/linters/eslint-config.cjs +365 -0
- package/dist/lib/cjs/linters/eslint-config.d.cts +25 -0
- package/dist/lib/cjs/linters/eslint-rules/index.cjs +201 -0
- package/dist/lib/cjs/linters/eslint-rules/index.d.cts +10 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-description.cjs +268 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-description.d.cts +54 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-helpers.cjs +231 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-helpers.d.cts +141 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-id.cjs +228 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-id.d.cts +32 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-name.cjs +229 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-name.d.cts +30 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-schema.cjs +329 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-schema.d.cts +45 -0
- package/dist/lib/cjs/linters/eslint-rules/no-over-cap-wait-in-eval-in-obsidian.cjs +670 -0
- package/dist/lib/cjs/linters/eslint-rules/no-over-cap-wait-in-eval-in-obsidian.d.cts +10 -0
- package/dist/lib/cjs/linters/eslint-rules/no-untrusted-input-events.cjs +260 -0
- package/dist/lib/cjs/linters/eslint-rules/no-untrusted-input-events.d.cts +10 -0
- package/dist/lib/cjs/linters/eslint-rules/obsidian-dev-utils-plugin.cjs +186 -0
- package/dist/lib/cjs/linters/eslint-rules/obsidian-dev-utils-plugin.d.cts +13 -0
- package/dist/lib/cjs/linters/eslint-rules/require-component-suffix.cjs +291 -0
- package/dist/lib/cjs/linters/eslint-rules/require-component-suffix.d.cts +18 -0
- package/dist/lib/cjs/linters/eslint.cjs +173 -0
- package/dist/lib/cjs/linters/eslint.d.cts +15 -0
- package/dist/lib/cjs/linters/index.cjs +189 -0
- package/dist/lib/cjs/linters/index.d.cts +6 -0
- package/dist/lib/cjs/linters/markdownlint.cjs +173 -0
- package/dist/lib/cjs/linters/markdownlint.d.cts +15 -0
- package/dist/lib/cjs/linters/obsidianmd-rule-custom-message.cjs +189 -0
- package/dist/lib/cjs/linters/obsidianmd-rule-custom-message.d.cts +40 -0
- package/dist/lib/cjs/obsidian-plugin-repo-paths.cjs +229 -0
- package/dist/lib/cjs/obsidian-plugin-repo-paths.d.cts +253 -0
- package/dist/lib/cjs/setup.cjs +176 -0
- package/dist/lib/cjs/setup.d.cts +21 -0
- package/dist/lib/cjs/templates.cjs +185 -0
- package/dist/lib/cjs/templates.d.cts +13 -0
- package/dist/lib/cjs/test-runners/index.cjs +183 -0
- package/dist/lib/cjs/test-runners/index.d.cts +4 -0
- package/dist/lib/cjs/test-runners/integration-test-plugin.cjs +224 -0
- package/dist/lib/cjs/test-runners/integration-test-plugin.d.cts +44 -0
- package/dist/lib/cjs/test-runners/performance-eval-cap.cjs +170 -0
- package/dist/lib/cjs/test-runners/performance-eval-cap.d.cts +27 -0
- package/dist/lib/cjs/test-runners/stale-build-global-setup.cjs +230 -0
- package/dist/lib/cjs/test-runners/stale-build-global-setup.d.cts +86 -0
- package/dist/lib/cjs/test-runners/vitest-config.cjs +497 -0
- package/dist/lib/cjs/test-runners/vitest-config.d.cts +200 -0
- package/dist/lib/cjs/version.cjs +275 -0
- package/dist/lib/cjs/version.d.cts +92 -0
- package/dist/lib/cjs/vitest-setup.cjs +147 -0
- package/dist/lib/cjs/vitest-setup.d.cts +11 -0
- package/dist/lib/esm/bundlers/esbuild-impl/copy-to-obsidian-plugins-folder-plugin.d.mts +38 -0
- package/dist/lib/esm/bundlers/esbuild-impl/copy-to-obsidian-plugins-folder-plugin.mjs +226 -0
- package/dist/lib/esm/bundlers/esbuild-impl/dependency.d.mts +20 -0
- package/dist/lib/esm/bundlers/esbuild-impl/dependency.mjs +138 -0
- package/dist/lib/esm/bundlers/esbuild-impl/fix-source-maps-plugin.d.mts +34 -0
- package/dist/lib/esm/bundlers/esbuild-impl/fix-source-maps-plugin.mjs +116 -0
- package/dist/lib/esm/bundlers/esbuild-impl/index.d.mts +7 -0
- package/dist/lib/esm/bundlers/esbuild-impl/index.mjs +64 -0
- package/dist/lib/esm/bundlers/esbuild-impl/obsidian-plugin-builder.d.mts +98 -0
- package/dist/lib/esm/bundlers/esbuild-impl/obsidian-plugin-builder.mjs +255 -0
- package/dist/lib/esm/bundlers/esbuild-impl/preprocess-plugin.d.mts +30 -0
- package/dist/lib/esm/bundlers/esbuild-impl/preprocess-plugin.mjs +134 -0
- package/dist/lib/esm/bundlers/esbuild-impl/rename-css-plugin.d.mts +14 -0
- package/dist/lib/esm/bundlers/esbuild-impl/rename-css-plugin.mjs +71 -0
- package/dist/lib/esm/bundlers/esbuild.d.mts +11 -0
- package/dist/lib/esm/bundlers/esbuild.mjs +66 -0
- package/dist/lib/esm/bundlers/index.d.mts +3 -0
- package/dist/lib/esm/bundlers/index.mjs +56 -0
- package/dist/lib/esm/demo-vault-app-json.d.mts +93 -0
- package/dist/lib/esm/demo-vault-app-json.mjs +83 -0
- package/dist/lib/esm/demo-vault-buttons.d.mts +259 -0
- package/dist/lib/esm/demo-vault-buttons.mjs +460 -0
- package/dist/lib/esm/demo-vault-coverage.d.mts +533 -0
- package/dist/lib/esm/demo-vault-coverage.mjs +626 -0
- package/dist/lib/esm/demo-vault.d.mts +33 -0
- package/dist/lib/esm/demo-vault.mjs +205 -0
- package/dist/lib/esm/formatters/dprint.d.mts +15 -0
- package/dist/lib/esm/formatters/dprint.mjs +60 -0
- package/dist/lib/esm/formatters/index.d.mts +2 -0
- package/dist/lib/esm/formatters/index.mjs +54 -0
- package/dist/lib/esm/index.d.mts +16 -0
- package/dist/lib/esm/index.mjs +74 -0
- package/dist/lib/esm/integration-test-setup.d.mts +33 -0
- package/dist/lib/esm/integration-test-setup.mjs +52 -0
- package/dist/lib/esm/integration-test-vitest-global-setup.d.mts +39 -0
- package/dist/lib/esm/integration-test-vitest-global-setup.mjs +65 -0
- package/dist/lib/esm/jest-setup.d.mts +13 -0
- package/dist/lib/esm/jest-setup.mjs +61 -0
- package/dist/lib/esm/linters/eslint-config.d.mts +25 -0
- package/dist/lib/esm/linters/eslint-config.mjs +247 -0
- package/dist/lib/esm/linters/eslint-rules/index.d.mts +10 -0
- package/dist/lib/esm/linters/eslint-rules/index.mjs +70 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-description.d.mts +54 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-description.mjs +154 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-helpers.d.mts +141 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-helpers.mjs +98 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-id.d.mts +32 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-id.mjs +117 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-name.d.mts +30 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-name.mjs +118 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-schema.d.mts +45 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-schema.mjs +220 -0
- package/dist/lib/esm/linters/eslint-rules/no-over-cap-wait-in-eval-in-obsidian.d.mts +10 -0
- package/dist/lib/esm/linters/eslint-rules/no-over-cap-wait-in-eval-in-obsidian.mjs +559 -0
- package/dist/lib/esm/linters/eslint-rules/no-untrusted-input-events.d.mts +10 -0
- package/dist/lib/esm/linters/eslint-rules/no-untrusted-input-events.mjs +146 -0
- package/dist/lib/esm/linters/eslint-rules/obsidian-dev-utils-plugin.d.mts +13 -0
- package/dist/lib/esm/linters/eslint-rules/obsidian-dev-utils-plugin.mjs +73 -0
- package/dist/lib/esm/linters/eslint-rules/require-component-suffix.d.mts +18 -0
- package/dist/lib/esm/linters/eslint-rules/require-component-suffix.mjs +175 -0
- package/dist/lib/esm/linters/eslint.d.mts +15 -0
- package/dist/lib/esm/linters/eslint.mjs +60 -0
- package/dist/lib/esm/linters/index.d.mts +6 -0
- package/dist/lib/esm/linters/index.mjs +62 -0
- package/dist/lib/esm/linters/markdownlint.d.mts +15 -0
- package/dist/lib/esm/linters/markdownlint.mjs +60 -0
- package/dist/lib/esm/linters/obsidianmd-rule-custom-message.d.mts +40 -0
- package/dist/lib/esm/linters/obsidianmd-rule-custom-message.mjs +75 -0
- package/dist/lib/esm/obsidian-plugin-repo-paths.d.mts +253 -0
- package/dist/lib/esm/obsidian-plugin-repo-paths.mjs +116 -0
- package/dist/lib/esm/setup.d.mts +21 -0
- package/dist/lib/esm/setup.mjs +63 -0
- package/dist/lib/esm/templates.d.mts +13 -0
- package/dist/lib/esm/templates.mjs +65 -0
- package/dist/lib/esm/test-runners/index.d.mts +4 -0
- package/dist/lib/esm/test-runners/index.mjs +58 -0
- package/dist/lib/esm/test-runners/integration-test-plugin.d.mts +44 -0
- package/dist/lib/esm/test-runners/integration-test-plugin.mjs +102 -0
- package/dist/lib/esm/test-runners/performance-eval-cap.d.mts +27 -0
- package/dist/lib/esm/test-runners/performance-eval-cap.mjs +56 -0
- package/dist/lib/esm/test-runners/stale-build-global-setup.d.mts +86 -0
- package/dist/lib/esm/test-runners/stale-build-global-setup.mjs +123 -0
- package/dist/lib/esm/test-runners/vitest-config.d.mts +200 -0
- package/dist/lib/esm/test-runners/vitest-config.mjs +377 -0
- package/dist/lib/esm/version.d.mts +92 -0
- package/dist/lib/esm/version.mjs +168 -0
- package/dist/lib/esm/vitest-setup.d.mts +11 -0
- package/dist/lib/esm/vitest-setup.mjs +61 -0
- package/dist/templates/.markdownlint-cli2.mjs +4 -0
- package/dist/templates/.nano-staged.mjs +4 -0
- package/dist/templates/commitlint.config.ts +3 -0
- package/dist/templates/dprint.json +26 -0
- package/dist/templates/eslint.config.mts +3 -0
- package/dist/templates/scripts/build/build-clean.ts +4 -0
- package/dist/templates/scripts/build/build-compile-svelte.ts +4 -0
- package/dist/templates/scripts/build/build-compile-typescript.ts +4 -0
- package/dist/templates/scripts/build/build-compile.ts +4 -0
- package/dist/templates/scripts/build/build-templates.ts +4 -0
- package/dist/templates/scripts/bundlers/esbuild/build.ts +4 -0
- package/dist/templates/scripts/bundlers/esbuild/dev.ts +4 -0
- package/dist/templates/scripts/commitlint-config.ts +3 -0
- package/dist/templates/scripts/eslint-config.ts +10 -0
- package/dist/templates/scripts/formatters/dprint/format-check.ts +8 -0
- package/dist/templates/scripts/formatters/dprint/format.ts +8 -0
- package/dist/templates/scripts/gate/gate.ts +10 -0
- package/dist/templates/scripts/linters/cspell/spellcheck.ts +8 -0
- package/dist/templates/scripts/linters/eslint/lint-fix.ts +8 -0
- package/dist/templates/scripts/linters/eslint/lint.ts +8 -0
- package/dist/templates/scripts/linters/markdownlint/lint-md-fix.ts +8 -0
- package/dist/templates/scripts/linters/markdownlint/lint-md.ts +8 -0
- package/dist/templates/scripts/linters/over-exposure/find-overexposed-fix.ts +25 -0
- package/dist/templates/scripts/linters/over-exposure/find-overexposed.ts +15 -0
- package/dist/templates/scripts/markdownlint-cli2-config.ts +3 -0
- package/dist/templates/scripts/nano-staged-config.ts +3 -0
- package/dist/templates/scripts/test-runners/vitest/test-coverage.ts +4 -0
- package/dist/templates/scripts/test-runners/vitest/test-watch.ts +4 -0
- package/dist/templates/scripts/test-runners/vitest/test.ts +4 -0
- package/dist/templates/scripts/version/version.ts +10 -0
- package/dist/templates/scripts/vitest-config.ts +3 -0
- package/dist/templates/vitest.config.ts +3 -0
- package/formatters/dprint/package.json +6 -0
- package/formatters/index/package.json +6 -0
- package/formatters/package.json +6 -0
- package/linters/eslint/package.json +6 -0
- package/linters/eslint-config/package.json +6 -0
- package/linters/eslint-rules/index/package.json +6 -0
- package/linters/eslint-rules/manifest-description/package.json +6 -0
- package/linters/eslint-rules/manifest-helpers/package.json +6 -0
- package/linters/eslint-rules/manifest-id/package.json +6 -0
- package/linters/eslint-rules/manifest-name/package.json +6 -0
- package/linters/eslint-rules/manifest-schema/package.json +6 -0
- package/linters/eslint-rules/no-over-cap-wait-in-eval-in-obsidian/package.json +6 -0
- package/linters/eslint-rules/no-untrusted-input-events/package.json +6 -0
- package/linters/eslint-rules/obsidian-dev-utils-plugin/package.json +6 -0
- package/linters/eslint-rules/package.json +6 -0
- package/linters/eslint-rules/require-component-suffix/package.json +6 -0
- package/linters/index/package.json +6 -0
- package/linters/markdownlint/package.json +6 -0
- package/linters/obsidianmd-rule-custom-message/package.json +6 -0
- package/linters/package.json +6 -0
- package/package.json +241 -13
- package/test-runners/index/package.json +6 -0
- package/test-runners/integration-test-plugin/package.json +6 -0
- package/test-runners/package.json +6 -0
- package/test-runners/performance-eval-cap/package.json +6 -0
- package/test-runners/stale-build-global-setup/package.json +6 -0
- package/test-runners/vitest-config/package.json +6 -0
|
@@ -0,0 +1,533 @@
|
|
|
1
|
+
/// <reference path="./index.d.cts" />
|
|
2
|
+
/**
|
|
3
|
+
* @file
|
|
4
|
+
*
|
|
5
|
+
* Static coverage/freshness checks that keep a plugin's in-repo `demo-vault/` in sync with its public surface.
|
|
6
|
+
*
|
|
7
|
+
* A plugin can ship a curated demo vault at `demo-vault/` in its repo root. These helpers reflect the real
|
|
8
|
+
* public API/config/docs straight from source and assert — WITHOUT launching Obsidian — that every feature is
|
|
9
|
+
* demonstrated in the notes and that the notes reference no API member that no longer exists (rename drift).
|
|
10
|
+
* The runtime behavior of the plugin is covered by its other integration tests, not by the demo vault; the
|
|
11
|
+
* vault is a learning resource, and these checks only guard that it stays truthful.
|
|
12
|
+
*
|
|
13
|
+
* They also guard the vault's own `.obsidian/app.json`: the settings listed in
|
|
14
|
+
* {@link DEMO_VAULT_APP_JSON_SETTINGS} belong to `obsidian-dev-utils`, which writes them into the archived
|
|
15
|
+
* vault at release time, so a vault that commits any of them is keeping a second copy nothing reconciles.
|
|
16
|
+
*
|
|
17
|
+
* They also enforce the demo-vault AUTHORING convention — every note opens with an `# H1` and a plain
|
|
18
|
+
* prose paragraph, every note is reachable from the start note, and no note uses a `[[wikilink]]` or a
|
|
19
|
+
* `[Docs](…)` line. These checks are unconditional: the demo vault is the published documentation, read
|
|
20
|
+
* in Obsidian AND on GitHub (where a wikilink does not render), so a note that breaks the convention is
|
|
21
|
+
* broken for real readers. `authoring` only tunes them (which note is the start, which notes sit outside
|
|
22
|
+
* the learning path); it cannot switch them off.
|
|
23
|
+
*
|
|
24
|
+
* Only `rootFolder` is required, so a plugin with no settings and no public API to reflect registers the
|
|
25
|
+
* suite with that alone and still gets every authoring check — the checks have nothing to do with what the
|
|
26
|
+
* plugin exposes. Each reflection spec (`configInterfaces`, `interfaces`, `nonTrivialGuard`) adds the checks
|
|
27
|
+
* it describes when supplied. The vault is guarded against being empty either way: with no notes to read,
|
|
28
|
+
* every authoring check would pass by having nothing to look at.
|
|
29
|
+
*
|
|
30
|
+
* The one exception is a note whose SUBJECT is the wikilink — an embed spelling the reader is being taught
|
|
31
|
+
* to type, a frontmatter property value that exists to contrast with a Markdown link, a fixture that must
|
|
32
|
+
* keep the wikilink a command is supposed to leave alone, a link the reader clicks while it still resolves
|
|
33
|
+
* to nothing. Such a note says so itself, stating why, in one of two forms modelled on ESLint's.
|
|
34
|
+
*
|
|
35
|
+
* Per line or per region, written as an HTML comment so it is invisible in Obsidian AND on GitHub — the
|
|
36
|
+
* spelling these vaults already use for `markdownlint-disable-next-line`:
|
|
37
|
+
*
|
|
38
|
+
* ```markdown
|
|
39
|
+
* <!-- obsidian-dev-utils-disable-next-line demo-vault-validation/no-wikilinks -- Clicking a link to a note that does not exist yet IS the feature. -->
|
|
40
|
+
* 2. Click this link: [[Projects/Fresh idea]].
|
|
41
|
+
*
|
|
42
|
+
* <!-- obsidian-dev-utils-disable demo-vault-validation/no-wikilinks -- The wikilink embed is the syntax this note teaches. -->
|
|
43
|
+
* ![[basic.html|400]]
|
|
44
|
+
* <!-- obsidian-dev-utils-enable demo-vault-validation/no-wikilinks -->
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* Per note, in the note's own frontmatter — the only form that can reach a wikilink INSIDE frontmatter,
|
|
48
|
+
* where a comment cannot go:
|
|
49
|
+
*
|
|
50
|
+
* ```yaml
|
|
51
|
+
* ---
|
|
52
|
+
* obsidian-dev-utils:
|
|
53
|
+
* demo-vault-validation:
|
|
54
|
+
* allow-wikilinks: The `wikilink` property value is the contrast this note is built around.
|
|
55
|
+
* ---
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* Either way the declaration travels with the note rather than sitting in a list somewhere else, it carries
|
|
59
|
+
* its justification, and it exempts only the WIKILINK check — the H1, prose, reachability and `[Docs]`
|
|
60
|
+
* checks still apply. A declaration with no reason, one covering no wikilink, a region never enabled again,
|
|
61
|
+
* or a misspelled directive all fail: an exemption nobody can justify, that nothing needs any more, or that
|
|
62
|
+
* silently does nothing is worse than no exemption at all.
|
|
63
|
+
*
|
|
64
|
+
* Two layers are exposed:
|
|
65
|
+
* - {@link DemoVaultCoverageChecker} — a framework-agnostic core that reads the corpus, parses interface /
|
|
66
|
+
* class / enum members and exported functions, and returns diagnostic arrays (what is undemonstrated / stale
|
|
67
|
+
* / unlinked / off-convention).
|
|
68
|
+
* - {@link registerDemoVaultCoverageSuite} — a thin wrapper that registers a `vitest` suite over the core, so
|
|
69
|
+
* a plugin's `demo-vault.no-app.integration.test.ts` is a single declarative call.
|
|
70
|
+
*/
|
|
71
|
+
/**
|
|
72
|
+
* Tunes the always-on authoring checks. It cannot disable them — see the file overview.
|
|
73
|
+
*/
|
|
74
|
+
export interface DemoVaultAuthoringSpec {
|
|
75
|
+
/**
|
|
76
|
+
* The notes (paths relative to the demo vault) that sit outside the learning path and are therefore
|
|
77
|
+
* exempt from every authoring check. Defaults to the vault's own `README.md`, which addresses someone
|
|
78
|
+
* browsing the repo on GitHub rather than a reader working through the vault.
|
|
79
|
+
*/
|
|
80
|
+
readonly excludedNotes?: string[];
|
|
81
|
+
/**
|
|
82
|
+
* The note (path relative to the demo vault) every other note must be reachable from. Defaults to
|
|
83
|
+
* `00 Start.md`.
|
|
84
|
+
*/
|
|
85
|
+
readonly startNote?: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Reflects a config interface whose options are demonstrated by their bare name.
|
|
89
|
+
*/
|
|
90
|
+
export interface DemoVaultConfigInterfaceCoverageSpec {
|
|
91
|
+
/**
|
|
92
|
+
* The name of the `export interface`, `export class`, or `export enum` whose properties are the config
|
|
93
|
+
* options.
|
|
94
|
+
*/
|
|
95
|
+
readonly interfaceName: string;
|
|
96
|
+
/**
|
|
97
|
+
* The source file path (relative to the repo root) that declares the interface, class, or enum.
|
|
98
|
+
*/
|
|
99
|
+
readonly sourcePath: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The parameters for the {@link DemoVaultCoverageChecker} constructor.
|
|
103
|
+
*/
|
|
104
|
+
export interface DemoVaultCoverageCheckerConstructorParams {
|
|
105
|
+
/**
|
|
106
|
+
* The notes (paths relative to the demo vault) exempt from the authoring checks. Defaults to the
|
|
107
|
+
* vault's own `README.md`.
|
|
108
|
+
*/
|
|
109
|
+
readonly excludedNotes?: string[];
|
|
110
|
+
/**
|
|
111
|
+
* The absolute path of the plugin repo root — the folder containing `demo-vault/` and the source being
|
|
112
|
+
* reflected. Callers typically pass `getRootFolder() ?? process.cwd()`.
|
|
113
|
+
*/
|
|
114
|
+
readonly rootFolder: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The parameters for {@link DemoVaultCoverageChecker.findStaleReferences}.
|
|
118
|
+
*/
|
|
119
|
+
export interface DemoVaultCoverageCheckerFindStaleReferencesParams {
|
|
120
|
+
/**
|
|
121
|
+
* The receiver whose `` `${receiver}.<member>` `` references are scanned for in the demo corpus.
|
|
122
|
+
*/
|
|
123
|
+
readonly receiver: string;
|
|
124
|
+
/**
|
|
125
|
+
* The members that currently exist on the receiver; any referenced member not in this set is stale.
|
|
126
|
+
*/
|
|
127
|
+
readonly validMembers: string[];
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The parameters for {@link DemoVaultCoverageChecker.findUndemonstratedMembers}.
|
|
131
|
+
*/
|
|
132
|
+
export interface DemoVaultCoverageCheckerFindUndemonstratedMembersParams {
|
|
133
|
+
/**
|
|
134
|
+
* The member names that must each appear in the demo corpus.
|
|
135
|
+
*/
|
|
136
|
+
readonly members: string[];
|
|
137
|
+
/**
|
|
138
|
+
* When set, a member is demonstrated only if `` `${receiver}.${member}` `` appears (e.g. a context object's
|
|
139
|
+
* methods); when absent, the bare member name is looked up (e.g. a config option).
|
|
140
|
+
*/
|
|
141
|
+
readonly receiver?: string;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* The parameters for {@link DemoVaultCoverageChecker.findUnlinkedFeatureDocs}.
|
|
145
|
+
*/
|
|
146
|
+
export interface DemoVaultCoverageCheckerFindUnlinkedFeatureDocsParams {
|
|
147
|
+
/**
|
|
148
|
+
* The docs folder (relative to the repo root) whose top-level `*.md` files are the feature docs.
|
|
149
|
+
*/
|
|
150
|
+
readonly docsFolder: string;
|
|
151
|
+
/**
|
|
152
|
+
* The doc basenames (without `.md`) that are NOT per-feature pages and so need no linking demo note.
|
|
153
|
+
*/
|
|
154
|
+
readonly nonFeatureDocs: string[];
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* The parameters for {@link DemoVaultCoverageChecker.findUnreachableNotes}.
|
|
158
|
+
*/
|
|
159
|
+
export interface DemoVaultCoverageCheckerFindUnreachableNotesParams {
|
|
160
|
+
/**
|
|
161
|
+
* The note (path relative to the demo vault) the walk starts from, e.g. `00 Start.md`.
|
|
162
|
+
*/
|
|
163
|
+
readonly startNote: string;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* The parameters for {@link DemoVaultCoverageChecker.getExportedFunctionNames}.
|
|
167
|
+
*/
|
|
168
|
+
export interface DemoVaultCoverageCheckerGetExportedFunctionNamesParams {
|
|
169
|
+
/**
|
|
170
|
+
* The source file path (relative to the repo root) whose `export function`s are parsed.
|
|
171
|
+
*/
|
|
172
|
+
readonly sourcePath: string;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* The parameters for {@link DemoVaultCoverageChecker.getInterfaceMembers}.
|
|
176
|
+
*/
|
|
177
|
+
export interface DemoVaultCoverageCheckerGetInterfaceMembersParams {
|
|
178
|
+
/**
|
|
179
|
+
* The name of the `export interface`, `export class`, or `export enum` to parse.
|
|
180
|
+
*/
|
|
181
|
+
readonly interfaceName: string;
|
|
182
|
+
/**
|
|
183
|
+
* The source file path (relative to the repo root) that declares the interface, class, or enum.
|
|
184
|
+
*/
|
|
185
|
+
readonly sourcePath: string;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Configures the feature-doc linking check.
|
|
189
|
+
*/
|
|
190
|
+
export interface DemoVaultDocsCoverageSpec {
|
|
191
|
+
/**
|
|
192
|
+
* The docs folder (relative to the repo root) whose top-level `*.md` files are the feature docs.
|
|
193
|
+
*/
|
|
194
|
+
readonly folder: string;
|
|
195
|
+
/**
|
|
196
|
+
* The doc basenames (without `.md`) that are NOT per-feature pages and so need no linking demo note.
|
|
197
|
+
*/
|
|
198
|
+
readonly nonFeatureDocs: string[];
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Reflects a module's exported functions, each demonstrated by its bare name in the demo corpus.
|
|
202
|
+
*/
|
|
203
|
+
export interface DemoVaultFunctionsCoverageSpec {
|
|
204
|
+
/**
|
|
205
|
+
* The source file path (relative to the repo root) whose `export function`s must each be demonstrated.
|
|
206
|
+
*/
|
|
207
|
+
readonly sourcePath: string;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Reflects a single interface's members and demonstrates them via `` `${receiver}.<member>` `` references.
|
|
211
|
+
*/
|
|
212
|
+
export interface DemoVaultInterfaceCoverageSpec {
|
|
213
|
+
/**
|
|
214
|
+
* The name of the `export interface`, `export class`, or `export enum` to reflect.
|
|
215
|
+
*/
|
|
216
|
+
readonly interfaceName: string;
|
|
217
|
+
/**
|
|
218
|
+
* Whether the demonstrated members are the reflected type's methods or its properties (enum members count as
|
|
219
|
+
* properties).
|
|
220
|
+
*/
|
|
221
|
+
readonly kind: DemoVaultInterfaceMemberKind;
|
|
222
|
+
/**
|
|
223
|
+
* The identifier the notes call the members on (e.g. `codeButtonContext`).
|
|
224
|
+
*/
|
|
225
|
+
readonly receiver: string;
|
|
226
|
+
/**
|
|
227
|
+
* The source file path (relative to the repo root) that declares the interface, class, or enum.
|
|
228
|
+
*/
|
|
229
|
+
readonly sourcePath: string;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Whether an interface's demonstrated members are its methods or its properties.
|
|
233
|
+
*/
|
|
234
|
+
export type DemoVaultInterfaceMemberKind = 'methods' | 'properties';
|
|
235
|
+
/**
|
|
236
|
+
* Configures the guard that the reflected surface is non-trivial (protects against a parsing regression
|
|
237
|
+
* silently emptying every other check).
|
|
238
|
+
*/
|
|
239
|
+
export interface DemoVaultNonTrivialGuardSpec {
|
|
240
|
+
/**
|
|
241
|
+
* A demo note (path relative to the demo vault) that must be present.
|
|
242
|
+
*/
|
|
243
|
+
readonly expectDemoNote: string;
|
|
244
|
+
/**
|
|
245
|
+
* A member that must be reflected from {@link DemoVaultNonTrivialGuardSpec.interfaceName}.
|
|
246
|
+
*/
|
|
247
|
+
readonly expectMember: string;
|
|
248
|
+
/**
|
|
249
|
+
* The name of the `export interface`, `export class`, or `export enum` whose members are re-parsed for the
|
|
250
|
+
* guard.
|
|
251
|
+
*/
|
|
252
|
+
readonly interfaceName: string;
|
|
253
|
+
/**
|
|
254
|
+
* The source file path (relative to the repo root) that declares the interface, class, or enum.
|
|
255
|
+
*/
|
|
256
|
+
readonly sourcePath: string;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* A single demo note, as read from the demo vault.
|
|
260
|
+
*/
|
|
261
|
+
export interface DemoVaultNote {
|
|
262
|
+
/**
|
|
263
|
+
* The note's raw Markdown content.
|
|
264
|
+
*/
|
|
265
|
+
readonly content: string;
|
|
266
|
+
/**
|
|
267
|
+
* The note's path relative to the demo vault folder, e.g. `00 Start.md`.
|
|
268
|
+
*/
|
|
269
|
+
readonly relativePath: string;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* The parsed members of a source interface, class, or enum.
|
|
273
|
+
*/
|
|
274
|
+
export interface InterfaceMembers {
|
|
275
|
+
/**
|
|
276
|
+
* Every member — {@link InterfaceMembers.methods} followed by {@link InterfaceMembers.properties}.
|
|
277
|
+
*/
|
|
278
|
+
readonly all: string[];
|
|
279
|
+
/**
|
|
280
|
+
* The method members (declared as `name(...)`).
|
|
281
|
+
*/
|
|
282
|
+
readonly methods: string[];
|
|
283
|
+
/**
|
|
284
|
+
* The property members (declared as `name?: ...`).
|
|
285
|
+
*/
|
|
286
|
+
readonly properties: string[];
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* A note line paired with the line number it came from, so a check that skips fenced blocks can still
|
|
290
|
+
* report — and an inline directive can still name — the line as the reader sees it.
|
|
291
|
+
*/
|
|
292
|
+
export interface NoteLine {
|
|
293
|
+
/**
|
|
294
|
+
* The zero-based line number within the note.
|
|
295
|
+
*/
|
|
296
|
+
readonly index: number;
|
|
297
|
+
/**
|
|
298
|
+
* The line's raw text.
|
|
299
|
+
*/
|
|
300
|
+
readonly line: string;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* A `disable` region that has been opened and not yet enabled again.
|
|
304
|
+
*/
|
|
305
|
+
export interface OpenWikilinkDirectiveRegion {
|
|
306
|
+
/**
|
|
307
|
+
* Whether the region has covered a wikilink, which is what stops it being reported as pointless.
|
|
308
|
+
*/
|
|
309
|
+
isUsed: boolean;
|
|
310
|
+
/**
|
|
311
|
+
* The line the region was opened on.
|
|
312
|
+
*/
|
|
313
|
+
readonly lineIndex: number;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* The parameters for {@link registerDemoVaultCoverageSuite}.
|
|
317
|
+
*/
|
|
318
|
+
export interface RegisterDemoVaultCoverageSuiteParams {
|
|
319
|
+
/**
|
|
320
|
+
* Tunes the always-on authoring checks, or `undefined` to take their defaults. It cannot disable them.
|
|
321
|
+
*/
|
|
322
|
+
readonly authoring?: DemoVaultAuthoringSpec;
|
|
323
|
+
/**
|
|
324
|
+
* The config interfaces whose options must each be demonstrated by their bare name, or `undefined` when the
|
|
325
|
+
* plugin has no settings.
|
|
326
|
+
*/
|
|
327
|
+
readonly configInterfaces?: DemoVaultConfigInterfaceCoverageSpec[];
|
|
328
|
+
/**
|
|
329
|
+
* The feature-doc linking check, or `undefined` when the plugin ships no `docs/` folder.
|
|
330
|
+
*/
|
|
331
|
+
readonly docs?: DemoVaultDocsCoverageSpec;
|
|
332
|
+
/**
|
|
333
|
+
* The modules whose `export function`s must each be demonstrated by their bare name, or `undefined` when the
|
|
334
|
+
* plugin exposes no such module to check.
|
|
335
|
+
*/
|
|
336
|
+
readonly functionModules?: DemoVaultFunctionsCoverageSpec[];
|
|
337
|
+
/**
|
|
338
|
+
* The interfaces whose members must each be demonstrated (and referenced without drift), or `undefined` when
|
|
339
|
+
* the plugin exposes no public API surface to reflect.
|
|
340
|
+
*/
|
|
341
|
+
readonly interfaces?: DemoVaultInterfaceCoverageSpec[];
|
|
342
|
+
/**
|
|
343
|
+
* The guard that keeps the reflected surface non-trivial, or `undefined` when there is no reflected surface
|
|
344
|
+
* to guard. The vault is checked for being non-empty either way.
|
|
345
|
+
*/
|
|
346
|
+
readonly nonTrivialGuard?: DemoVaultNonTrivialGuardSpec;
|
|
347
|
+
/**
|
|
348
|
+
* The absolute path of the plugin repo root. Callers typically pass `getRootFolder() ?? process.cwd()`.
|
|
349
|
+
*/
|
|
350
|
+
readonly rootFolder: string;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* What a note's inline `obsidian-dev-utils-disable…` directives allow, and what is wrong with them.
|
|
354
|
+
*/
|
|
355
|
+
export interface WikilinkDirectiveScan {
|
|
356
|
+
/**
|
|
357
|
+
* The zero-based line numbers a directive allows a wikilink on.
|
|
358
|
+
*/
|
|
359
|
+
readonly allowedLineIndexes: ReadonlySet<number>;
|
|
360
|
+
/**
|
|
361
|
+
* The directive mistakes found, each phrased for a failing assertion.
|
|
362
|
+
*/
|
|
363
|
+
readonly problems: string[];
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* The running state of a directive scan, threaded through the per-line helpers.
|
|
367
|
+
*/
|
|
368
|
+
export interface WikilinkDirectiveScanState {
|
|
369
|
+
/**
|
|
370
|
+
* The lines a directive has allowed a wikilink on so far.
|
|
371
|
+
*/
|
|
372
|
+
readonly allowedLineIndexes: Set<number>;
|
|
373
|
+
/**
|
|
374
|
+
* The region currently open, and whether it has covered a wikilink yet.
|
|
375
|
+
*/
|
|
376
|
+
openRegion: null | OpenWikilinkDirectiveRegion;
|
|
377
|
+
/**
|
|
378
|
+
* The line a `disable-next-line` was read on, while it still waits for the line it covers.
|
|
379
|
+
*/
|
|
380
|
+
pendingNextLineIndex: null | number;
|
|
381
|
+
/**
|
|
382
|
+
* The directive mistakes found so far.
|
|
383
|
+
*/
|
|
384
|
+
readonly problems: string[];
|
|
385
|
+
/**
|
|
386
|
+
* The lines of the note that carry a wikilink.
|
|
387
|
+
*/
|
|
388
|
+
readonly wikilinkLineIndexes: ReadonlySet<number>;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Reflects a plugin's public surface from source and checks its in-repo `demo-vault/` stays in sync with it.
|
|
392
|
+
*
|
|
393
|
+
* Every method is a pure query over files under the repo root (the demo corpus is read once and cached), so
|
|
394
|
+
* the checker is trivially unit-testable against a fixture repo and carries no test-framework dependency.
|
|
395
|
+
*/
|
|
396
|
+
export declare class DemoVaultCoverageChecker {
|
|
397
|
+
private cachedCorpus;
|
|
398
|
+
private cachedNotes;
|
|
399
|
+
private readonly demoVaultFolder;
|
|
400
|
+
private readonly excludedNotes;
|
|
401
|
+
private readonly rootFolder;
|
|
402
|
+
/**
|
|
403
|
+
* Creates a checker rooted at a plugin repo.
|
|
404
|
+
*
|
|
405
|
+
* @param params - The parameters for the constructor.
|
|
406
|
+
*/
|
|
407
|
+
constructor(params: DemoVaultCoverageCheckerConstructorParams);
|
|
408
|
+
/**
|
|
409
|
+
* Collects the demo notes as paths relative to the demo vault folder (for a non-trivial-surface guard).
|
|
410
|
+
*
|
|
411
|
+
* @returns The relative paths of every `*.md` note in the demo vault.
|
|
412
|
+
*/
|
|
413
|
+
collectDemoNoteRelativePaths(): string[];
|
|
414
|
+
/**
|
|
415
|
+
* Reads and caches every demo note individually — the per-note view the authoring checks work on, as
|
|
416
|
+
* opposed to the concatenated {@link DemoVaultCoverageChecker.readCorpus}.
|
|
417
|
+
*
|
|
418
|
+
* @returns Every `*.md` note in the demo vault, excluded ones included.
|
|
419
|
+
*/
|
|
420
|
+
collectNotes(): DemoVaultNote[];
|
|
421
|
+
/**
|
|
422
|
+
* Finds the `.obsidian/app.json` settings the vault commits that `obsidian-dev-utils` owns and writes
|
|
423
|
+
* into the archived vault itself. A committed one is a second copy of a setting nothing reconciles, and
|
|
424
|
+
* it is the copy that goes stale — so the convention is that the vault commits none of them.
|
|
425
|
+
*
|
|
426
|
+
* @returns The names of the owned settings the committed `app.json` sets. A vault that commits no
|
|
427
|
+
* `app.json` at all is fine, and yields none.
|
|
428
|
+
*/
|
|
429
|
+
findCommittedAppJsonSettings(): string[];
|
|
430
|
+
/**
|
|
431
|
+
* Finds notes carrying a `[Docs](…)` link line. The note IS the documentation, so a line pointing
|
|
432
|
+
* elsewhere for the real explanation is the shape this convention exists to remove.
|
|
433
|
+
*
|
|
434
|
+
* @returns The relative paths of the offending notes.
|
|
435
|
+
*/
|
|
436
|
+
findNotesWithDocsLinks(): string[];
|
|
437
|
+
/**
|
|
438
|
+
* Finds notes that do not open with an `# H1` (frontmatter aside).
|
|
439
|
+
*
|
|
440
|
+
* @returns The relative paths of the offending notes.
|
|
441
|
+
*/
|
|
442
|
+
findNotesWithoutH1(): string[];
|
|
443
|
+
/**
|
|
444
|
+
* Finds notes with no prose paragraph before their first code fence — the 1-3 sentences saying what the
|
|
445
|
+
* feature does and why a reader would want it, without which the note is a button with no lesson.
|
|
446
|
+
*
|
|
447
|
+
* @returns The relative paths of the offending notes.
|
|
448
|
+
*/
|
|
449
|
+
findNotesWithoutIntroProse(): string[];
|
|
450
|
+
/**
|
|
451
|
+
* Finds notes whose wikilink allowance is not doing any work — declared without a reason, or on a note
|
|
452
|
+
* that carries no wikilink at all. Both are drift: an exemption nobody can justify, and one nothing needs
|
|
453
|
+
* any more, which would go on hiding the next wikilink somebody adds by accident.
|
|
454
|
+
*
|
|
455
|
+
* @returns The relative paths of the offending notes.
|
|
456
|
+
*/
|
|
457
|
+
findNotesWithUnjustifiedWikilinkAllowance(): string[];
|
|
458
|
+
/**
|
|
459
|
+
* Finds notes using an Obsidian `[[wikilink]]` outside a code fence. The demo vault is also read on
|
|
460
|
+
* GitHub, where a wikilink renders as literal brackets and leads nowhere. A wikilink shown INSIDE a
|
|
461
|
+
* fence is sample text, not navigation, so fenced blocks are skipped, as is a note that declares in its
|
|
462
|
+
* frontmatter why its wikilinks are the point — see the file overview.
|
|
463
|
+
*
|
|
464
|
+
* @returns The relative paths of the offending notes.
|
|
465
|
+
*/
|
|
466
|
+
findNotesWithWikilinks(): string[];
|
|
467
|
+
/**
|
|
468
|
+
* Finds members that the demo notes reference on a receiver but that no longer exist on it (rename drift).
|
|
469
|
+
*
|
|
470
|
+
* @param params - The parameters for the lookup.
|
|
471
|
+
* @returns The distinct stale member names referenced in the demo corpus.
|
|
472
|
+
*/
|
|
473
|
+
findStaleReferences(params: DemoVaultCoverageCheckerFindStaleReferencesParams): string[];
|
|
474
|
+
/**
|
|
475
|
+
* Finds members that are not demonstrated anywhere in the demo corpus.
|
|
476
|
+
*
|
|
477
|
+
* @param params - The parameters for the lookup.
|
|
478
|
+
* @returns The member names with no demonstration.
|
|
479
|
+
*/
|
|
480
|
+
findUndemonstratedMembers(params: DemoVaultCoverageCheckerFindUndemonstratedMembersParams): string[];
|
|
481
|
+
/**
|
|
482
|
+
* Finds feature docs that no demo note links to.
|
|
483
|
+
*
|
|
484
|
+
* @param params - The parameters for the lookup.
|
|
485
|
+
* @returns The feature-doc basenames (without `.md`) not linked from any demo note.
|
|
486
|
+
*/
|
|
487
|
+
findUnlinkedFeatureDocs(params: DemoVaultCoverageCheckerFindUnlinkedFeatureDocsParams): string[];
|
|
488
|
+
/**
|
|
489
|
+
* Finds notes that cannot be reached from the start note by following Markdown links between notes.
|
|
490
|
+
*
|
|
491
|
+
* The walk starts at {@link DemoVaultCoverageCheckerFindUnreachableNotesParams.startNote} and follows
|
|
492
|
+
* every `[Text](<./NN Name.md>)` link outside a code fence, transitively. A note nothing links to is
|
|
493
|
+
* one a reader can only find by browsing the file list — which is exactly what the grouped index in the
|
|
494
|
+
* start note is meant to replace. When the start note itself is missing, EVERY note is unreachable,
|
|
495
|
+
* because there is nowhere to start from.
|
|
496
|
+
*
|
|
497
|
+
* @param params - The parameters for the walk.
|
|
498
|
+
* @returns The relative paths of the unreachable notes.
|
|
499
|
+
*/
|
|
500
|
+
findUnreachableNotes(params: DemoVaultCoverageCheckerFindUnreachableNotesParams): string[];
|
|
501
|
+
/**
|
|
502
|
+
* Parses the names of the `export function`s (including `async` and generator declarations) in a source file.
|
|
503
|
+
*
|
|
504
|
+
* @param params - The parameters for the lookup.
|
|
505
|
+
* @returns The exported function names in source order.
|
|
506
|
+
*/
|
|
507
|
+
getExportedFunctionNames(params: DemoVaultCoverageCheckerGetExportedFunctionNamesParams): string[];
|
|
508
|
+
/**
|
|
509
|
+
* Parses the members of an `export interface`, `export class`, or `export enum` declared in a source file.
|
|
510
|
+
*
|
|
511
|
+
* @param params - The parameters for the lookup.
|
|
512
|
+
* @returns The parsed {@link InterfaceMembers}.
|
|
513
|
+
* @throws When the interface, class, or enum cannot be found in the source file.
|
|
514
|
+
*/
|
|
515
|
+
getInterfaceMembers(params: DemoVaultCoverageCheckerGetInterfaceMembersParams): InterfaceMembers;
|
|
516
|
+
/**
|
|
517
|
+
* Reads and caches the demo corpus — every `*.md` note in the demo vault joined into one string.
|
|
518
|
+
*
|
|
519
|
+
* @returns The concatenated demo-note contents.
|
|
520
|
+
*/
|
|
521
|
+
readCorpus(): string;
|
|
522
|
+
private collectCheckableNotes;
|
|
523
|
+
private collectMarkdownFiles;
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Registers a `vitest` suite that keeps a plugin's in-repo `demo-vault/` in sync with its public surface.
|
|
527
|
+
*
|
|
528
|
+
* Call it once from a plugin's `demo-vault.no-app.integration.test.ts`; it registers one test per check,
|
|
529
|
+
* delegating to {@link DemoVaultCoverageChecker}.
|
|
530
|
+
*
|
|
531
|
+
* @param params - The declarative coverage specification.
|
|
532
|
+
*/
|
|
533
|
+
export declare function registerDemoVaultCoverageSuite(params: RegisterDemoVaultCoverageSuiteParams): void;
|