@hawkeyexl/manni 2.3.7 → 2.3.9

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/README.md CHANGED
@@ -98,7 +98,7 @@ actually reads rather than hand-written:
98
98
  ```yaml
99
99
  repos:
100
100
  - repo: https://github.com/hawkeyexl/manni
101
- rev: v2.3.7
101
+ rev: v2.3.9
102
102
  hooks:
103
103
  - id: manni-meta
104
104
  ```
@@ -61,7 +61,7 @@ import {
61
61
  supportedExtensions,
62
62
  terminalConfirm,
63
63
  toJsonText
64
- } from "./chunk-D5FTEP3H.js";
64
+ } from "./chunk-LC4H35XX.js";
65
65
 
66
66
  // src/meta/cli.ts
67
67
  import { existsSync } from "node:fs";
@@ -1517,4 +1517,4 @@ export {
1517
1517
  reportConfig,
1518
1518
  buildProgram
1519
1519
  };
1520
- //# sourceMappingURL=chunk-4YJ4TCKM.js.map
1520
+ //# sourceMappingURL=chunk-HOLRWVCO.js.map
@@ -8,7 +8,7 @@ var __export = (target, all) => {
8
8
  // package.json
9
9
  var package_default = {
10
10
  name: "@hawkeyexl/manni",
11
- version: "2.3.7",
11
+ version: "2.3.9",
12
12
  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.",
13
13
  type: "module",
14
14
  bin: {
@@ -6909,13 +6909,11 @@ var STDIN_TOKEN_LITERAL = "-";
6909
6909
  async function resolveRunConfig(opts) {
6910
6910
  const cwd = opts.cwd ?? process.cwd();
6911
6911
  const wanted = opts.collections ?? [];
6912
- if (wanted.length > 0) {
6913
- const typed = opts.inputs.filter((i) => i !== STDIN_TOKEN_LITERAL);
6914
- if (typed.length > 0) {
6915
- throw new DocmetaError(
6916
- "--collection selects a configured collection; it cannot be combined with paths."
6917
- );
6918
- }
6912
+ const typedInputs = opts.inputs.filter((i) => i !== STDIN_TOKEN_LITERAL);
6913
+ if (wanted.length > 0 && typedInputs.length > 0) {
6914
+ throw new DocmetaError(
6915
+ "--collection selects a configured collection; it cannot be combined with paths."
6916
+ );
6919
6917
  }
6920
6918
  const loaded = opts.noConfig ? null : await loadConfig(opts.configPath, cwd);
6921
6919
  if (wanted.length > 0 && loaded === null) {
@@ -6929,9 +6927,10 @@ async function resolveRunConfig(opts) {
6929
6927
  loaded.source,
6930
6928
  (message) => new DocmetaError(message)
6931
6929
  ) : [];
6932
- const fromCollections = opts.inputs.length === 0;
6933
- const inputs = fromCollections ? collections.flatMap((c) => c.paths) : opts.inputs;
6934
- const base = fromCollections && inputs.length > 0 && loaded ? loaded.dir : cwd;
6930
+ const fromCollections = wanted.length > 0 || opts.inputs.length === 0;
6931
+ const collectionPaths = fromCollections ? collections.flatMap((c) => c.paths) : [];
6932
+ const inputs = fromCollections ? [...opts.inputs, ...collectionPaths] : opts.inputs;
6933
+ const base = collectionPaths.length > 0 && loaded ? loaded.dir : cwd;
6935
6934
  return {
6936
6935
  config,
6937
6936
  inputs,
@@ -19942,4 +19941,4 @@ export {
19942
19941
  renderQuery,
19943
19942
  renderQueryCsv
19944
19943
  };
19945
- //# sourceMappingURL=chunk-D5FTEP3H.js.map
19944
+ //# sourceMappingURL=chunk-LC4H35XX.js.map