@hawkeyexl/manni 2.2.0 → 2.3.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/dist/docmeta.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  buildProgram
4
- } from "./chunk-2Q5JUEIO.js";
4
+ } from "./chunk-7QVYG66K.js";
5
5
  import {
6
6
  runIfMain
7
- } from "./chunk-5O4FIGDJ.js";
7
+ } from "./chunk-UCLMW3RE.js";
8
8
 
9
9
  // src/docmeta.ts
10
10
  runIfMain(import.meta.url, () => buildProgram().name("docmeta"));
package/dist/index.d.ts CHANGED
@@ -128,14 +128,6 @@ interface MetadataExtractor {
128
128
  name: string;
129
129
  /** Lowercase file extensions this extractor handles, incl. dot (e.g. ".md"). */
130
130
  extensions: string[];
131
- /**
132
- * Whether this extractor can *read* — false for a format that is registered
133
- * but not yet wired up. Every registered extractor sets it true today; it is
134
- * kept because it is a distinct capability from writability, which is the
135
- * presence of `apply`. A format can read without writing, and one being
136
- * added could be declared before it can do either.
137
- */
138
- implemented: boolean;
139
131
  /**
140
132
  * Extract metadata from raw file content.
141
133
  *
@@ -358,6 +350,16 @@ declare function selectCollections(collections: readonly CollectionConfig[], nam
358
350
  */
359
351
  declare function isMember(collection: CollectionConfig, relPath: string): boolean;
360
352
 
353
+ /** Vale's settings under `tools.vale`. */
354
+ interface ValeToolConfig {
355
+ /** Vale's config file, as written, relative to `manni.config.yaml`. */
356
+ config?: string;
357
+ }
358
+ /** The document's top-level `tools:`, one namespace per outside tool. */
359
+ interface ToolsConfig {
360
+ vale?: ValeToolConfig;
361
+ }
362
+
361
363
  interface ConfigFile {
362
364
  /** Absolute path to the file. */
363
365
  path: string;
@@ -387,6 +389,12 @@ interface ConfigFile {
387
389
  * document *is* the tool's section, so it carries no family-wide keys.
388
390
  */
389
391
  collections: CollectionConfig[];
392
+ /**
393
+ * The document's top-level `tools:` (proposal 0052), an outside tool's
394
+ * settings, parsed once here for the same reason as `collections`. `{}` when
395
+ * the key is absent, and always `{}` for a `legacy` file.
396
+ */
397
+ tools: ToolsConfig;
390
398
  /**
391
399
  * The document's top-level `encryptionKey:` (proposal 0045), validated
392
400
  * here. Absent when the key is, and always absent for a `legacy` file, for
@@ -2092,7 +2100,6 @@ interface SchemasInfo {
2092
2100
  formats: {
2093
2101
  name: string;
2094
2102
  extensions: string[];
2095
- implemented: boolean;
2096
2103
  /** Whether `manni meta fill` can write metadata back to this format. */
2097
2104
  writable: boolean;
2098
2105
  }[];
@@ -3422,15 +3429,13 @@ contents: string | Uint8Array): Promise<void>;
3422
3429
 
3423
3430
  /**
3424
3431
  * Extractor registry. Maps file extensions to extractors and resolves an
3425
- * extractor by name (for the `--as` override). Every registered extractor is
3426
- * implemented today; the `implemented` filters below are what would keep a
3427
- * declared-but-unwired format out of directory walks, so an unfinished format
3428
- * can be registered without becoming "supported".
3432
+ * extractor by name (for the `--as` override). A registered extractor reads
3433
+ * its format, so registration is what makes an extension supported.
3429
3434
  */
3430
3435
 
3431
- /** Resolve an implemented extractor for a file extension (incl. dot). */
3436
+ /** Resolve the extractor for a file extension (incl. dot). */
3432
3437
  declare function extractorForExtension(ext: string): MetadataExtractor | undefined;
3433
- /** Extensions handled by implemented extractors (used for directory walks). */
3438
+ /** Extensions handled by registered extractors (used for directory walks). */
3434
3439
  declare function supportedExtensions(): string[];
3435
3440
 
3436
3441
  type KeySource = "env" | "config" | "none";
@@ -4118,12 +4123,9 @@ declare function readSource(root: string, index: SourceIndex, range: SourceRange
4118
4123
  * `indexOf` for the delimiters, never a regex over the whole page, and is
4119
4124
  * handed the body only, so a `cite` inside frontmatter is never matched.
4120
4125
  *
4121
- * It does not read code. An opener inside a fenced block (``` or ~~~ in
4122
- * markdown and mdx, indented or not; `----` in asciidoc; an unclosed fence
4123
- * runs to the end, as a renderer reads it) or inside a backtick span (a run of
4124
- * backticks closed by a run of the same length on the same line) is skipped,
4125
- * so a page that documents the syntax carries no statements. html and xml
4126
- * have neither; a `<pre>` is not code to this scanner.
4126
+ * It does not read code. An opener inside a fenced block or a backtick span,
4127
+ * as `src/shared/code-regions.ts` finds them, is skipped, so a page that
4128
+ * documents the syntax carries no statements.
4127
4129
  *
4128
4130
  * Every form parses in both markdown and mdx. The first form is what
4129
4131
  * `formatStatement` writes: the html comment for markdown, the jsx comment
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  reencryptMetadata,
6
6
  runKeyRotate,
7
7
  runKeySet
8
- } from "./chunk-6JWX6JM2.js";
8
+ } from "./chunk-ZWPVZUJI.js";
9
9
  import {
10
10
  BinMissing,
11
11
  COMMON_FORMATS,
@@ -127,7 +127,7 @@ import {
127
127
  valueOf,
128
128
  vendorFileName,
129
129
  writeFileAtomic
130
- } from "./chunk-5O4FIGDJ.js";
130
+ } from "./chunk-UCLMW3RE.js";
131
131
 
132
132
  // src/key/index.ts
133
133
  var key_exports = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hawkeyexl/manni",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "One command line for documentation that is meant to be checked. `manni meta` validates the presence and format of document metadata (Markdown frontmatter and more) against JSON Schema, built for CI. Formerly docmeta.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -85,6 +85,7 @@
85
85
  "ajv-formats": "^3.0.1",
86
86
  "commander": "^15.0.0",
87
87
  "fast-glob": "^3.3.2",
88
+ "github-slugger": "^2.0.0",
88
89
  "parse5": "^8.0.1",
89
90
  "picocolors": "^1.1.1",
90
91
  "picomatch": "^4.0.7",