politty 0.4.3 → 0.4.4

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.
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_subcommand_router = require('../subcommand-router-ZjNjFaUL.cjs');
3
3
  const require_lazy = require('../lazy-BEDnSR0m.cjs');
4
- const require_zsh = require('../zsh-CASZWn0o.cjs');
4
+ const require_zsh = require('../zsh-DR47Ccac.cjs');
5
5
  let zod = require("zod");
6
6
 
7
7
  //#region src/completion/index.ts
@@ -1,5 +1,5 @@
1
1
  import { c as arg } from "../lazy-BrEg8SgI.js";
2
- import { a as formatForShell, c as generateCandidates, d as extractPositionals, f as resolveValueCompletion, i as hasCompleteCommand, l as generateBashCompletion, n as generateFishCompletion, o as parseCompletionContext, p as defineCommand, r as createDynamicCompleteCommand, s as CompletionDirective, t as generateZshCompletion, u as extractCompletionData } from "../zsh-hjvdI8uZ.js";
2
+ import { a as formatForShell, c as generateCandidates, d as extractPositionals, f as resolveValueCompletion, i as hasCompleteCommand, l as generateBashCompletion, n as generateFishCompletion, o as parseCompletionContext, p as defineCommand, r as createDynamicCompleteCommand, s as CompletionDirective, t as generateZshCompletion, u as extractCompletionData } from "../zsh-XbRzR8FW.js";
3
3
  import { z } from "zod";
4
4
 
5
5
  //#region src/completion/index.ts
@@ -1696,6 +1696,7 @@ async function generateDoc(config) {
1696
1696
  const render = fileConfig.render ?? fileRenderer;
1697
1697
  if (hasTargetCommands) {
1698
1698
  let existingContent = readFile(filePath);
1699
+ const sortedCommandPaths = sortDepthFirst(commandPaths, specifiedCommands);
1699
1700
  for (const targetCommand of fileTargetCommands) {
1700
1701
  const rawSection = generateCommandSection(targetCommand, allCommands, render, filePath, fileMap);
1701
1702
  if (!rawSection) throw new Error(`Target command "${targetCommand}" not found in commands`);
@@ -1717,7 +1718,7 @@ async function generateDoc(config) {
1717
1718
  const existingMarkers = collectSectionMarkers(existingContent, targetCommand);
1718
1719
  if (existingMarkers.length === 0) {
1719
1720
  if (updateMode) {
1720
- existingContent = insertCommandSections(existingContent, targetCommand, generatedSection, specifiedCommands);
1721
+ existingContent = insertCommandSections(existingContent, targetCommand, generatedSection, sortedCommandPaths);
1721
1722
  writeFile(filePath, existingContent);
1722
1723
  if (fileStatus !== "created") fileStatus = "updated";
1723
1724
  } else {