yadflow 2.11.0 → 2.11.1
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 +3 -3
- package/cli/doctor.mjs +7 -2
- package/cli/platform.mjs +17 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
## [2.11.1](https://github.com/abdelrahmannasr/yadflow/compare/v2.11.0...v2.11.1) (2026-06-15)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* **doctor:** scope platform-CLI auth probe to the hub host ([#68](https://github.com/abdelrahmannasr/yadflow/issues/68)) ([3cb2801](https://github.com/abdelrahmannasr/yadflow/commit/3cb28011c80645e0ff42e544a9b3d933231daeb3))
|
|
7
7
|
|
|
8
8
|
# [2.2.0](https://github.com/abdelrahmannasr/yadflow/compare/v2.1.0...v2.2.0) (2026-06-14)
|
|
9
9
|
|
package/cli/doctor.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { c, log, ok, info, warn, fail, hand, run, has, exists, readJSON, readJSO
|
|
|
8
8
|
import { VERSION, PROJECT_FILES, DESIGN_TOOLS, TESTING_TOOLS, LEARNING_TOOLS } from './manifest.mjs';
|
|
9
9
|
import { loadLedger, epicRoot } from './epic-state.mjs';
|
|
10
10
|
import { gitHead } from './setup.mjs';
|
|
11
|
-
import { cliFor, validateLogin } from './platform.mjs';
|
|
11
|
+
import { cliFor, validateLogin, hostFromGitUrl } from './platform.mjs';
|
|
12
12
|
|
|
13
13
|
const MIN_NODE = 18;
|
|
14
14
|
|
|
@@ -68,8 +68,13 @@ export function projectChecks(checks, root) {
|
|
|
68
68
|
// platform CLI + auth (best-effort; auth probing is the user's own session)
|
|
69
69
|
const cli = cliFor(hub.platform);
|
|
70
70
|
if (cli) {
|
|
71
|
+
// Scope the auth probe to the hub's own host (derived from git_url). `${cli} auth status`
|
|
72
|
+
// without --hostname exits non-zero when ANY configured instance fails, so an unrelated
|
|
73
|
+
// stale login (e.g. a dead gitlab.com token) would falsely flag a working self-hosted hub.
|
|
74
|
+
const host = hostFromGitUrl(hub.git_url);
|
|
75
|
+
const authArgs = host ? ['auth', 'status', '--hostname', host] : ['auth', 'status'];
|
|
71
76
|
if (!has(cli)) check(checks, 'platform-cli', 'project', 'warn', `${cli} not found on PATH [YAD-ENV-002]`, `install ${cli} — the gate degrades to file-only without it`);
|
|
72
|
-
else if (!run(cli,
|
|
77
|
+
else if (!run(cli, authArgs).ok) check(checks, 'platform-cli', 'project', 'warn', `${cli} present but not authenticated${host ? ` for ${host}` : ''} [YAD-ENV-002]`, `run \`${cli} auth login${host ? ` --hostname ${host}` : ''}\``);
|
|
73
78
|
else {
|
|
74
79
|
check(checks, 'platform-cli', 'project', 'ok', `${cli} present and authenticated`);
|
|
75
80
|
// Re-validate each roster login against the hub (warn-only). Skips when a login is already
|
package/cli/platform.mjs
CHANGED
|
@@ -17,6 +17,23 @@ export function cliFor(platform) {
|
|
|
17
17
|
return null;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
// Bare host from a git remote URL, for hostname-scoped CLI auth checks. Handles both the
|
|
21
|
+
// `https://[user@]host[:port]/...` and the scp-like `git@host:group/repo.git` forms. Returns
|
|
22
|
+
// null when nothing parses (caller falls back to an unscoped check).
|
|
23
|
+
export function hostFromGitUrl(url = '') {
|
|
24
|
+
if (typeof url !== 'string' || !url.trim()) return null;
|
|
25
|
+
const u = url.trim();
|
|
26
|
+
// scp-like syntax: [user@]host:path — only when there's no scheme and the colon precedes a path.
|
|
27
|
+
const scp = u.match(/^(?:[^@/]+@)?([^/:]+):(?!\/)/);
|
|
28
|
+
if (scp && !/^[a-z][a-z0-9+.-]*:\/\//i.test(u)) return scp[1].toLowerCase() || null;
|
|
29
|
+
try {
|
|
30
|
+
// URL needs a scheme to parse a host; ssh:// and https:// both work here.
|
|
31
|
+
return new URL(u).hostname.toLowerCase() || null;
|
|
32
|
+
} catch {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
20
37
|
// Is the platform CLI present? (auth is the user's own; we don't probe it here.)
|
|
21
38
|
export function platformReady(platform) {
|
|
22
39
|
const cli = cliFor(platform);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yadflow",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.1",
|
|
4
4
|
"description": "Yadflow — the gated, team, multi-repo SDLC: author → review → build with a PR-driven review gate and a zero-dependency `yad` CLI (setup, gate, commit, open-pr, ship, repo). A BMAD module + 30 yad-* skills.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "AbdelRahman Nasr",
|