genlayer 0.38.6 → 0.38.7
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/index.js +1 -1
- package/package.json +1 -1
- package/scripts/generate-cli-docs.mjs +21 -3
package/dist/index.js
CHANGED
|
@@ -20078,7 +20078,7 @@ var require_cli_table3 = __commonJS({
|
|
|
20078
20078
|
import { program } from "commander";
|
|
20079
20079
|
|
|
20080
20080
|
// package.json
|
|
20081
|
-
var version = "0.38.
|
|
20081
|
+
var version = "0.38.7";
|
|
20082
20082
|
var package_default = {
|
|
20083
20083
|
name: "genlayer",
|
|
20084
20084
|
version,
|
package/package.json
CHANGED
|
@@ -119,12 +119,30 @@ function parseHelp(text, programName, commandPath) {
|
|
|
119
119
|
|
|
120
120
|
if (inOptions) {
|
|
121
121
|
// e.g., " -V, --version output the version number"
|
|
122
|
-
const m = l.match(/^\s*(-\w)?,?\s*(--[\w-]+)
|
|
122
|
+
const m = l.match(/^\s*(-\w)?,?\s*(--[\w-]+(?:\s+<\w+>)?)\s{2,}(.+)$/);
|
|
123
123
|
if (m) {
|
|
124
124
|
const short = m[1] || '';
|
|
125
125
|
const long = m[2] || '';
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
let desc = m[3] || '';
|
|
127
|
+
let defaultValue = undefined;
|
|
128
|
+
const defaultMatch = desc.match(/\(default:\s*(.+?)\)\s*$/);
|
|
129
|
+
if (defaultMatch) {
|
|
130
|
+
defaultValue = defaultMatch[1].replace(/^["']|["']$/g, '');
|
|
131
|
+
desc = desc.replace(/\s*\(default:\s*.+?\)\s*$/, '').trim();
|
|
132
|
+
}
|
|
133
|
+
options.push({ short, long, description: desc, required: false, defaultValue });
|
|
134
|
+
} else if (options.length > 0 && /^\s{10,}/.test(l)) {
|
|
135
|
+
// Continuation line — append to previous option's description
|
|
136
|
+
const prev = options[options.length - 1];
|
|
137
|
+
let cont = l.trim();
|
|
138
|
+
const defaultMatch = cont.match(/\(default:\s*(.+?)\)\s*$/);
|
|
139
|
+
if (defaultMatch) {
|
|
140
|
+
prev.defaultValue = defaultMatch[1].replace(/^["']|["']$/g, '');
|
|
141
|
+
cont = cont.replace(/\s*\(default:\s*.+?\)\s*$/, '').trim();
|
|
142
|
+
}
|
|
143
|
+
if (cont) {
|
|
144
|
+
prev.description = prev.description ? `${prev.description} ${cont}` : cont;
|
|
145
|
+
}
|
|
128
146
|
}
|
|
129
147
|
} else if (inCommands) {
|
|
130
148
|
// e.g., " deploy [options] Deploy intelligent contracts"
|