@optique/discover 1.4.0-dev.2713 → 1.4.0-dev.2716
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 +3 -3
- package/dist/cli.js +3 -3
- package/dist/{generator-DwyzKqEQ.cjs → generator-Bdl59r-H.cjs} +1 -1
- package/dist/{generator-DPHYAQ4c.js → generator-C-Re9ksT.js} +1 -1
- package/dist/generator.cjs +2 -2
- package/dist/generator.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{src-BRYaiQ7Y.cjs → src-BFs4OCTW.cjs} +9 -3
- package/dist/{src-BxewopIn.js → src-D4QRIEDD.js} +10 -4
- package/package.json +4 -4
package/dist/cli.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
3
3
|
require('./command-CfkGTUEa.cjs');
|
|
4
|
-
require('./src-
|
|
5
|
-
const require_generator = require('./generator-
|
|
4
|
+
require('./src-BFs4OCTW.cjs');
|
|
5
|
+
const require_generator = require('./generator-Bdl59r-H.cjs');
|
|
6
6
|
const require_main_check = require('./main-check-CwunSNpK.cjs');
|
|
7
7
|
const __optique_core_constructs = require_chunk.__toESM(require("@optique/core/constructs"));
|
|
8
8
|
const __optique_core_message = require_chunk.__toESM(require("@optique/core/message"));
|
|
@@ -15,7 +15,7 @@ const node_process = require_chunk.__toESM(require("node:process"));
|
|
|
15
15
|
|
|
16
16
|
//#region deno.json
|
|
17
17
|
var name = "@optique/discover";
|
|
18
|
-
var version = "1.4.0-dev.
|
|
18
|
+
var version = "1.4.0-dev.2716+57cbdb77";
|
|
19
19
|
var license = "MIT";
|
|
20
20
|
var exports$1 = {
|
|
21
21
|
".": "./src/index.ts",
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "./command-CfQmeg9P.js";
|
|
3
|
-
import "./src-
|
|
4
|
-
import { watchCommandsModule, writeCommandsModule } from "./generator-
|
|
3
|
+
import "./src-D4QRIEDD.js";
|
|
4
|
+
import { watchCommandsModule, writeCommandsModule } from "./generator-C-Re9ksT.js";
|
|
5
5
|
import { isMainModuleUrl } from "./main-check-mMnKfUZs.js";
|
|
6
6
|
import { object } from "@optique/core/constructs";
|
|
7
7
|
import { message } from "@optique/core/message";
|
|
@@ -14,7 +14,7 @@ import process from "node:process";
|
|
|
14
14
|
|
|
15
15
|
//#region deno.json
|
|
16
16
|
var name = "@optique/discover";
|
|
17
|
-
var version = "1.4.0-dev.
|
|
17
|
+
var version = "1.4.0-dev.2716+57cbdb77";
|
|
18
18
|
var license = "MIT";
|
|
19
19
|
var exports = {
|
|
20
20
|
".": "./src/index.ts",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_src = require('./src-
|
|
2
|
+
const require_src = require('./src-BFs4OCTW.cjs');
|
|
3
3
|
const node_fs_promises = require_chunk.__toESM(require("node:fs/promises"));
|
|
4
4
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
5
5
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getDefaultExtensions } from "./src-
|
|
1
|
+
import { getDefaultExtensions } from "./src-D4QRIEDD.js";
|
|
2
2
|
import { mkdir, readdir, realpath, stat, writeFile } from "node:fs/promises";
|
|
3
3
|
import { dirname, posix, relative, resolve } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
package/dist/generator.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require('./command-CfkGTUEa.cjs');
|
|
2
|
-
require('./src-
|
|
3
|
-
const require_generator = require('./generator-
|
|
2
|
+
require('./src-BFs4OCTW.cjs');
|
|
3
|
+
const require_generator = require('./generator-Bdl59r-H.cjs');
|
|
4
4
|
|
|
5
5
|
exports.generateCommandsModule = require_generator.generateCommandsModule;
|
|
6
6
|
exports.watchCommandsModule = require_generator.watchCommandsModule;
|
package/dist/generator.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./command-CfQmeg9P.js";
|
|
2
|
-
import "./src-
|
|
3
|
-
import { generateCommandsModule, watchCommandsModule, writeCommandsModule } from "./generator-
|
|
2
|
+
import "./src-D4QRIEDD.js";
|
|
3
|
+
import { generateCommandsModule, watchCommandsModule, writeCommandsModule } from "./generator-C-Re9ksT.js";
|
|
4
4
|
|
|
5
5
|
export { generateCommandsModule, watchCommandsModule, writeCommandsModule };
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_command = require('./command-CfkGTUEa.cjs');
|
|
2
|
-
const require_src = require('./src-
|
|
2
|
+
const require_src = require('./src-BFs4OCTW.cjs');
|
|
3
3
|
|
|
4
4
|
exports.commandsFromModules = require_src.commandsFromModules;
|
|
5
5
|
exports.createProgramParser = require_src.createProgramParser;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { defineCommand, isCommand } from "./command-CfQmeg9P.js";
|
|
2
|
-
import { commandsFromModules, createProgramParser, discoverCommands, getDefaultExtensions, runProgram } from "./src-
|
|
2
|
+
import { commandsFromModules, createProgramParser, discoverCommands, getDefaultExtensions, runProgram } from "./src-D4QRIEDD.js";
|
|
3
3
|
|
|
4
4
|
export { commandsFromModules, createProgramParser, defineCommand, discoverCommands, getDefaultExtensions, isCommand, runProgram };
|
|
@@ -678,7 +678,7 @@ function createNamespaceCommandParser(name, childParser, commandDefinition, inhe
|
|
|
678
678
|
const parser = (0, __optique_core_primitives.command)(name, childParser, namespaceCommandMetadata(metadata, inheritedHidden));
|
|
679
679
|
const description = metadata?.brief ?? metadata?.description;
|
|
680
680
|
if (description == null) return parser;
|
|
681
|
-
|
|
681
|
+
const documentedParser = {
|
|
682
682
|
...parser,
|
|
683
683
|
getDocFragments(state, defaultValue) {
|
|
684
684
|
const fragments = parser.getDocFragments(state, defaultValue);
|
|
@@ -686,6 +686,8 @@ function createNamespaceCommandParser(name, childParser, commandDefinition, inhe
|
|
|
686
686
|
return withNamespaceListDocDescription(fragments, name, description);
|
|
687
687
|
}
|
|
688
688
|
};
|
|
689
|
+
(0, __optique_core_extension.inheritEmptyInputBehavior)(documentedParser, parser);
|
|
690
|
+
return documentedParser;
|
|
689
691
|
}
|
|
690
692
|
function withNamespaceListDocDescription(fragments, name, description) {
|
|
691
693
|
return {
|
|
@@ -727,13 +729,15 @@ function createLeafParser(commandDefinition, path, includeMetadata = false) {
|
|
|
727
729
|
handler: commandDefinition.handler
|
|
728
730
|
}));
|
|
729
731
|
if (!includeMetadata) return parser;
|
|
730
|
-
|
|
732
|
+
const documentedParser = {
|
|
731
733
|
...parser,
|
|
732
734
|
getDocFragments(state, defaultValue) {
|
|
733
735
|
const fragments = parser.getDocFragments(state, defaultValue);
|
|
734
736
|
return withCommandDocMetadata(fragments, commandDefinition.metadata);
|
|
735
737
|
}
|
|
736
738
|
};
|
|
739
|
+
(0, __optique_core_extension.inheritEmptyInputBehavior)(documentedParser, parser);
|
|
740
|
+
return documentedParser;
|
|
737
741
|
}
|
|
738
742
|
function withRootDocs(parser, commands, metadata) {
|
|
739
743
|
const rootState = parser.initialState;
|
|
@@ -769,13 +773,15 @@ function withRootDocs(parser, commands, metadata) {
|
|
|
769
773
|
fragments
|
|
770
774
|
};
|
|
771
775
|
};
|
|
772
|
-
|
|
776
|
+
const documentedParser = {
|
|
773
777
|
...parser,
|
|
774
778
|
getDocFragments(state, defaultValue) {
|
|
775
779
|
if (state.kind === "unavailable" || state.kind === "available" && Object.is(state.state, rootState)) return rootDocs();
|
|
776
780
|
return parser.getDocFragments(state, defaultValue);
|
|
777
781
|
}
|
|
778
782
|
};
|
|
783
|
+
(0, __optique_core_extension.inheritEmptyInputBehavior)(documentedParser, parser);
|
|
784
|
+
return documentedParser;
|
|
779
785
|
}
|
|
780
786
|
function rootListedCommands(commands, commandsByPath, commandList) {
|
|
781
787
|
const listedCommands = commands.filter((entry) => entry.path.length > 0);
|
|
@@ -7,7 +7,7 @@ import process from "node:process";
|
|
|
7
7
|
import { readdir, realpath, stat } from "node:fs/promises";
|
|
8
8
|
import { posix, relative, resolve, sep } from "node:path";
|
|
9
9
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
10
|
-
import { dispatchByMode, inheritAnnotations, mapModeValue, wrapForMode } from "@optique/core/extension";
|
|
10
|
+
import { dispatchByMode, inheritAnnotations, inheritEmptyInputBehavior, mapModeValue, wrapForMode } from "@optique/core/extension";
|
|
11
11
|
import { fluent } from "@optique/core/fluent";
|
|
12
12
|
import { isDocHidden, mergeHidden } from "@optique/core/usage";
|
|
13
13
|
|
|
@@ -677,7 +677,7 @@ function createNamespaceCommandParser(name, childParser, commandDefinition, inhe
|
|
|
677
677
|
const parser = command(name, childParser, namespaceCommandMetadata(metadata, inheritedHidden));
|
|
678
678
|
const description = metadata?.brief ?? metadata?.description;
|
|
679
679
|
if (description == null) return parser;
|
|
680
|
-
|
|
680
|
+
const documentedParser = {
|
|
681
681
|
...parser,
|
|
682
682
|
getDocFragments(state, defaultValue) {
|
|
683
683
|
const fragments = parser.getDocFragments(state, defaultValue);
|
|
@@ -685,6 +685,8 @@ function createNamespaceCommandParser(name, childParser, commandDefinition, inhe
|
|
|
685
685
|
return withNamespaceListDocDescription(fragments, name, description);
|
|
686
686
|
}
|
|
687
687
|
};
|
|
688
|
+
inheritEmptyInputBehavior(documentedParser, parser);
|
|
689
|
+
return documentedParser;
|
|
688
690
|
}
|
|
689
691
|
function withNamespaceListDocDescription(fragments, name, description) {
|
|
690
692
|
return {
|
|
@@ -726,13 +728,15 @@ function createLeafParser(commandDefinition, path, includeMetadata = false) {
|
|
|
726
728
|
handler: commandDefinition.handler
|
|
727
729
|
}));
|
|
728
730
|
if (!includeMetadata) return parser;
|
|
729
|
-
|
|
731
|
+
const documentedParser = {
|
|
730
732
|
...parser,
|
|
731
733
|
getDocFragments(state, defaultValue) {
|
|
732
734
|
const fragments = parser.getDocFragments(state, defaultValue);
|
|
733
735
|
return withCommandDocMetadata(fragments, commandDefinition.metadata);
|
|
734
736
|
}
|
|
735
737
|
};
|
|
738
|
+
inheritEmptyInputBehavior(documentedParser, parser);
|
|
739
|
+
return documentedParser;
|
|
736
740
|
}
|
|
737
741
|
function withRootDocs(parser, commands, metadata) {
|
|
738
742
|
const rootState = parser.initialState;
|
|
@@ -768,13 +772,15 @@ function withRootDocs(parser, commands, metadata) {
|
|
|
768
772
|
fragments
|
|
769
773
|
};
|
|
770
774
|
};
|
|
771
|
-
|
|
775
|
+
const documentedParser = {
|
|
772
776
|
...parser,
|
|
773
777
|
getDocFragments(state, defaultValue) {
|
|
774
778
|
if (state.kind === "unavailable" || state.kind === "available" && Object.is(state.state, rootState)) return rootDocs();
|
|
775
779
|
return parser.getDocFragments(state, defaultValue);
|
|
776
780
|
}
|
|
777
781
|
};
|
|
782
|
+
inheritEmptyInputBehavior(documentedParser, parser);
|
|
783
|
+
return documentedParser;
|
|
778
784
|
}
|
|
779
785
|
function rootListedCommands(commands, commandsByPath, commandList) {
|
|
780
786
|
const listedCommands = commands.filter((entry) => entry.path.length > 0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optique/discover",
|
|
3
|
-
"version": "1.4.0-dev.
|
|
3
|
+
"version": "1.4.0-dev.2716",
|
|
4
4
|
"description": "Runtime-aware command discovery for Optique CLI programs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"CLI",
|
|
@@ -83,11 +83,11 @@
|
|
|
83
83
|
"optique-discover": "./dist/cli.js"
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"@optique/core": "1.4.0-dev.
|
|
87
|
-
"@optique/run": "1.4.0-dev.
|
|
86
|
+
"@optique/core": "1.4.0-dev.2716+57cbdb77",
|
|
87
|
+
"@optique/run": "1.4.0-dev.2716+57cbdb77"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
|
-
"@optique/testing": "1.4.0-dev.
|
|
90
|
+
"@optique/testing": "1.4.0-dev.2716+57cbdb77",
|
|
91
91
|
"@types/node": "^24.0.0",
|
|
92
92
|
"tsdown": "^0.13.0",
|
|
93
93
|
"typescript": "^5.8.3"
|