@optique/man 0.10.0-dev.376 → 0.10.0-dev.378

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/cli.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- const require_generator = require('./generator-Ce1Cp92I.cjs');
2
+ const require_generator = require('./generator-ztP0iNeX.cjs');
3
3
  require('./roff-EpcecLXU.cjs');
4
- require('./man-BzwYMoSb.cjs');
4
+ require('./man-DxOvqYHv.cjs');
5
5
  const __optique_core_constructs = require_generator.__toESM(require("@optique/core/constructs"));
6
6
  const __optique_core_primitives = require_generator.__toESM(require("@optique/core/primitives"));
7
7
  const __optique_core_valueparser = require_generator.__toESM(require("@optique/core/valueparser"));
@@ -17,7 +17,7 @@ const node_url = require_generator.__toESM(require("node:url"));
17
17
 
18
18
  //#region deno.json
19
19
  var name = "@optique/man";
20
- var version = "0.10.0-dev.376+22c0802c";
20
+ var version = "0.10.0-dev.378+995d618d";
21
21
  var license = "MIT";
22
22
  var exports$1 = {
23
23
  ".": "./src/index.ts",
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import "./roff-C_MiRXVS.js";
3
- import "./man-x67FIIPq.js";
4
- import { generateManPageAsync } from "./generator-CogCcLy4.js";
3
+ import "./man-BR1BE_cj.js";
4
+ import { generateManPageAsync } from "./generator-BVZlyiaq.js";
5
5
  import { object } from "@optique/core/constructs";
6
6
  import { argument, option } from "@optique/core/primitives";
7
7
  import { choice, string } from "@optique/core/valueparser";
@@ -17,7 +17,7 @@ import { fileURLToPath, pathToFileURL } from "node:url";
17
17
 
18
18
  //#region deno.json
19
19
  var name = "@optique/man";
20
- var version = "0.10.0-dev.376+22c0802c";
20
+ var version = "0.10.0-dev.378+995d618d";
21
21
  var license = "MIT";
22
22
  var exports = {
23
23
  ".": "./src/index.ts",
@@ -1,4 +1,4 @@
1
- import { formatDocPageAsMan } from "./man-x67FIIPq.js";
1
+ import { formatDocPageAsMan } from "./man-BR1BE_cj.js";
2
2
  import { getDocPageAsync, getDocPageSync } from "@optique/core/parser";
3
3
 
4
4
  //#region src/generator.ts
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  }) : target, mod));
22
22
 
23
23
  //#endregion
24
- const require_man = require('./man-BzwYMoSb.cjs');
24
+ const require_man = require('./man-DxOvqYHv.cjs');
25
25
  const __optique_core_parser = __toESM(require("@optique/core/parser"));
26
26
 
27
27
  //#region src/generator.ts
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
- const require_generator = require('./generator-Ce1Cp92I.cjs');
1
+ const require_generator = require('./generator-ztP0iNeX.cjs');
2
2
  const require_roff = require('./roff-EpcecLXU.cjs');
3
- const require_man = require('./man-BzwYMoSb.cjs');
3
+ const require_man = require('./man-DxOvqYHv.cjs');
4
4
 
5
5
  exports.escapeHyphens = require_roff.escapeHyphens;
6
6
  exports.escapeRoff = require_roff.escapeRoff;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { escapeHyphens, escapeRoff, formatMessageAsRoff } from "./roff-C_MiRXVS.js";
2
- import { formatDateForMan, formatDocPageAsMan, formatUsageTermAsRoff } from "./man-x67FIIPq.js";
3
- import { generateManPage, generateManPageAsync, generateManPageSync } from "./generator-CogCcLy4.js";
2
+ import { formatDateForMan, formatDocPageAsMan, formatUsageTermAsRoff } from "./man-BR1BE_cj.js";
3
+ import { generateManPage, generateManPageAsync, generateManPageSync } from "./generator-BVZlyiaq.js";
4
4
 
5
5
  export { escapeHyphens, escapeRoff, formatDateForMan, formatDocPageAsMan, formatMessageAsRoff, formatUsageTermAsRoff, generateManPage, generateManPageAsync, generateManPageSync };
@@ -144,17 +144,14 @@ function formatDocSectionEntries(section) {
144
144
  function formatDocPageAsMan(page, options) {
145
145
  const lines = [];
146
146
  const thParts = [options.name.toUpperCase(), options.section.toString()];
147
- if (options.date != null) thParts.push(`"${formatDateForMan(options.date)}"`);
148
- if (options.version != null) {
149
- const dateStr = options.date != null ? "" : "\"\"";
150
- if (dateStr) thParts.push(dateStr);
151
- thParts.push(`"${options.name} ${options.version}"`);
152
- }
153
- if (options.manual != null) {
154
- if (options.date == null) thParts.push("\"\"");
155
- if (options.version == null) thParts.push("\"\"");
156
- thParts.push(`"${options.manual}"`);
157
- }
147
+ const hasDate = options.date != null;
148
+ const hasVersion = options.version != null;
149
+ const hasManual = options.manual != null;
150
+ if (hasDate) thParts.push(`"${formatDateForMan(options.date)}"`);
151
+ else if (hasVersion || hasManual) thParts.push("\"\"");
152
+ if (hasVersion) thParts.push(`"${options.name} ${options.version}"`);
153
+ else if (hasManual) thParts.push("\"\"");
154
+ if (hasManual) thParts.push(`"${options.manual}"`);
158
155
  lines.push(`.TH ${thParts.join(" ")}`);
159
156
  lines.push(".SH NAME");
160
157
  if (page.brief) lines.push(`${options.name} \\- ${formatMessageAsRoff(page.brief)}`);
@@ -144,17 +144,14 @@ function formatDocSectionEntries(section) {
144
144
  function formatDocPageAsMan(page, options) {
145
145
  const lines = [];
146
146
  const thParts = [options.name.toUpperCase(), options.section.toString()];
147
- if (options.date != null) thParts.push(`"${formatDateForMan(options.date)}"`);
148
- if (options.version != null) {
149
- const dateStr = options.date != null ? "" : "\"\"";
150
- if (dateStr) thParts.push(dateStr);
151
- thParts.push(`"${options.name} ${options.version}"`);
152
- }
153
- if (options.manual != null) {
154
- if (options.date == null) thParts.push("\"\"");
155
- if (options.version == null) thParts.push("\"\"");
156
- thParts.push(`"${options.manual}"`);
157
- }
147
+ const hasDate = options.date != null;
148
+ const hasVersion = options.version != null;
149
+ const hasManual = options.manual != null;
150
+ if (hasDate) thParts.push(`"${formatDateForMan(options.date)}"`);
151
+ else if (hasVersion || hasManual) thParts.push("\"\"");
152
+ if (hasVersion) thParts.push(`"${options.name} ${options.version}"`);
153
+ else if (hasManual) thParts.push("\"\"");
154
+ if (hasManual) thParts.push(`"${options.manual}"`);
158
155
  lines.push(`.TH ${thParts.join(" ")}`);
159
156
  lines.push(".SH NAME");
160
157
  if (page.brief) lines.push(`${options.name} \\- ${require_roff.formatMessageAsRoff(page.brief)}`);
package/dist/man.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  require('./roff-EpcecLXU.cjs');
2
- const require_man = require('./man-BzwYMoSb.cjs');
2
+ const require_man = require('./man-DxOvqYHv.cjs');
3
3
 
4
4
  exports.formatDateForMan = require_man.formatDateForMan;
5
5
  exports.formatDocPageAsMan = require_man.formatDocPageAsMan;
package/dist/man.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import "./roff-C_MiRXVS.js";
2
- import { formatDateForMan, formatDocPageAsMan, formatUsageTermAsRoff } from "./man-x67FIIPq.js";
2
+ import { formatDateForMan, formatDocPageAsMan, formatUsageTermAsRoff } from "./man-BR1BE_cj.js";
3
3
 
4
4
  export { formatDateForMan, formatDocPageAsMan, formatUsageTermAsRoff };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/man",
3
- "version": "0.10.0-dev.376+22c0802c",
3
+ "version": "0.10.0-dev.378+995d618d",
4
4
  "description": "Man page generator for Optique CLI parsers",
5
5
  "keywords": [
6
6
  "CLI",
@@ -84,8 +84,8 @@
84
84
  "optique-man": "./dist/cli.js"
85
85
  },
86
86
  "dependencies": {
87
- "@optique/run": "0.10.0-dev.376+22c0802c",
88
- "@optique/core": "0.10.0-dev.376+22c0802c"
87
+ "@optique/core": "0.10.0-dev.378+995d618d",
88
+ "@optique/run": "0.10.0-dev.378+995d618d"
89
89
  },
90
90
  "devDependencies": {
91
91
  "@types/node": "^20.19.9",