@laitszkin/apollo-toolkit 3.14.1 → 3.14.2
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/CHANGELOG.md +6 -0
- package/init-project-html/lib/atlas/cli.js +30 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this repository are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [v3.14.2] - 2026-05-15
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Support flags before verb in architecture atlas dispatch, preventing silent default to `open` when `--spec` precedes the verb (e.g., `apltk architecture --spec docs/plans/xxx feature add ...`).
|
|
10
|
+
|
|
5
11
|
## [v3.14.1] - 2026-05-15
|
|
6
12
|
|
|
7
13
|
### Fixed
|
|
@@ -968,6 +968,26 @@ function splitList(value) {
|
|
|
968
968
|
return String(value).split(',').map((s) => s.trim()).filter(Boolean);
|
|
969
969
|
}
|
|
970
970
|
|
|
971
|
+
function findFirstPositional(args) {
|
|
972
|
+
const booleanFlags = new Set(['no-render', 'no-open', 'help', 'force']);
|
|
973
|
+
let i = 0;
|
|
974
|
+
while (i < args.length) {
|
|
975
|
+
const token = args[i];
|
|
976
|
+
if (token === '--') return i + 1 < args.length ? i + 1 : -1;
|
|
977
|
+
if (token.startsWith('--')) {
|
|
978
|
+
const eq = token.indexOf('=');
|
|
979
|
+
if (eq !== -1) { i++; continue; }
|
|
980
|
+
const name = token.slice(2);
|
|
981
|
+
if (booleanFlags.has(name)) { i++; continue; }
|
|
982
|
+
if (i + 1 < args.length && !args[i + 1].startsWith('-')) { i += 2; } else { i++; }
|
|
983
|
+
continue;
|
|
984
|
+
}
|
|
985
|
+
if (token === '-h') { i++; continue; }
|
|
986
|
+
return i;
|
|
987
|
+
}
|
|
988
|
+
return -1;
|
|
989
|
+
}
|
|
990
|
+
|
|
971
991
|
function parseFlags(args) {
|
|
972
992
|
const positional = [];
|
|
973
993
|
const flags = Object.create(null);
|
|
@@ -1920,14 +1940,20 @@ async function dispatch(argv, io = { stdout: process.stdout, stderr: process.std
|
|
|
1920
1940
|
const args = [...argv];
|
|
1921
1941
|
let verb = 'open';
|
|
1922
1942
|
let explicitVerb = false;
|
|
1923
|
-
|
|
1924
|
-
|
|
1943
|
+
const verbIdx = findFirstPositional(args);
|
|
1944
|
+
if (verbIdx >= 0) {
|
|
1945
|
+
verb = args[verbIdx];
|
|
1925
1946
|
explicitVerb = true;
|
|
1947
|
+
args.splice(verbIdx, 1);
|
|
1926
1948
|
}
|
|
1927
1949
|
let subverb = null;
|
|
1928
1950
|
const multiVerbs = new Set(['feature', 'submodule', 'function', 'variable', 'dataflow', 'error', 'edge', 'meta', 'actor']);
|
|
1929
|
-
if (multiVerbs.has(verb)
|
|
1930
|
-
|
|
1951
|
+
if (multiVerbs.has(verb)) {
|
|
1952
|
+
const subverbIdx = findFirstPositional(args);
|
|
1953
|
+
if (subverbIdx >= 0) {
|
|
1954
|
+
subverb = args[subverbIdx];
|
|
1955
|
+
args.splice(subverbIdx, 1);
|
|
1956
|
+
}
|
|
1931
1957
|
}
|
|
1932
1958
|
const { flags } = parseFlags(args);
|
|
1933
1959
|
|
package/package.json
CHANGED