@flydocs/cli 0.6.0-alpha.23 → 0.6.0-alpha.24
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.js
CHANGED
|
@@ -15,7 +15,7 @@ var CLI_VERSION, CLI_NAME, PACKAGE_NAME, POSTHOG_API_KEY;
|
|
|
15
15
|
var init_constants = __esm({
|
|
16
16
|
"src/lib/constants.ts"() {
|
|
17
17
|
"use strict";
|
|
18
|
-
CLI_VERSION = "0.6.0-alpha.
|
|
18
|
+
CLI_VERSION = "0.6.0-alpha.24";
|
|
19
19
|
CLI_NAME = "flydocs";
|
|
20
20
|
PACKAGE_NAME = "@flydocs/cli";
|
|
21
21
|
POSTHOG_API_KEY = "phc_v1MSJTQDFkMS90CBh3mxIz3v8bYCCnKU6v1ir6bz0Xn";
|
package/package.json
CHANGED
|
@@ -50,8 +50,8 @@ CHECK_MESSAGES: dict[str, str] = {
|
|
|
50
50
|
"statusMapping": "Status mapping not configured — configure in FlyDocs dashboard",
|
|
51
51
|
"labelConfig": "Label config not configured — configure in FlyDocs dashboard",
|
|
52
52
|
"userIdentity": (
|
|
53
|
-
"Provider identity not linked —
|
|
54
|
-
"
|
|
53
|
+
"Provider identity not linked — link your identity in the FlyDocs dashboard "
|
|
54
|
+
"profile page, or run: workspace.py set-identity <provider> <your-account-id>"
|
|
55
55
|
),
|
|
56
56
|
"repos": "No repos linked — GitHub features won't work until you push and link a repo",
|
|
57
57
|
}
|
|
@@ -115,6 +115,39 @@ def _check_integrity(client: "FlyDocsClient") -> dict:
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
|
|
118
|
+
def _try_auto_resolve_identity(client: "FlyDocsClient") -> bool:
|
|
119
|
+
"""Attempt to auto-resolve provider identity via get-me. Returns True if resolved."""
|
|
120
|
+
try:
|
|
121
|
+
result = client.relay.get("/auth/me")
|
|
122
|
+
except Exception:
|
|
123
|
+
return False
|
|
124
|
+
|
|
125
|
+
provider_id = result.get("providerId")
|
|
126
|
+
if not provider_id:
|
|
127
|
+
# Check providerIdentities array as fallback
|
|
128
|
+
identities = result.get("providerIdentities", [])
|
|
129
|
+
if identities:
|
|
130
|
+
provider_id = identities[0].get("providerId")
|
|
131
|
+
|
|
132
|
+
if not provider_id:
|
|
133
|
+
return False
|
|
134
|
+
|
|
135
|
+
# Write me.json
|
|
136
|
+
me_data = {
|
|
137
|
+
"displayName": result.get("displayName"),
|
|
138
|
+
"email": result.get("email"),
|
|
139
|
+
"providerId": provider_id,
|
|
140
|
+
"provider": result.get("provider"),
|
|
141
|
+
"providerIdentities": result.get("providerIdentities", []),
|
|
142
|
+
"preferences": result.get("preferences", {}),
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
me_path = client.project_root / ".flydocs" / "me.json"
|
|
146
|
+
me_path.parent.mkdir(parents=True, exist_ok=True)
|
|
147
|
+
me_path.write_text(json.dumps(me_data, indent=2) + "\n")
|
|
148
|
+
return True
|
|
149
|
+
|
|
150
|
+
|
|
118
151
|
def cmd_validate(args: argparse.Namespace) -> None:
|
|
119
152
|
"""Validate workspace setup via GET /auth/config."""
|
|
120
153
|
client = get_client()
|
|
@@ -126,6 +159,15 @@ def cmd_validate(args: argparse.Namespace) -> None:
|
|
|
126
159
|
missing_keys: list[str] = config_response.get("missing", [])
|
|
127
160
|
warning_keys: list[str] = config_response.get("warnings", [])
|
|
128
161
|
|
|
162
|
+
# Auto-resolve identity if missing — try get-me before requiring manual step
|
|
163
|
+
if "userIdentity" in missing_keys or "userIdentity" in warning_keys:
|
|
164
|
+
if _try_auto_resolve_identity(client):
|
|
165
|
+
missing_keys = [k for k in missing_keys if k != "userIdentity"]
|
|
166
|
+
warning_keys = [k for k in warning_keys if k != "userIdentity"]
|
|
167
|
+
# Re-check validity — if userIdentity was the only missing item, we're valid now
|
|
168
|
+
if not missing_keys:
|
|
169
|
+
is_valid = True
|
|
170
|
+
|
|
129
171
|
# Build structured missing/warning lists with messages
|
|
130
172
|
missing = [
|
|
131
173
|
{"check": k, "action": CHECK_MESSAGES.get(k, DEFAULT_MESSAGE)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.6.0-alpha.
|
|
1
|
+
0.6.0-alpha.24
|
package/template/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,22 @@ Versioning: [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [0.6.0-alpha.24] — 2026-03-30
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Auto-resolve provider identity** — `workspace.py validate` now attempts
|
|
15
|
+
`GET /auth/me` before requiring manual `set-identity` step. If the relay
|
|
16
|
+
returns a provider identity, `me.json` is written automatically (FLY-520)
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- **Friendlier identity fallback** — when auto-resolve fails, the validation
|
|
21
|
+
message now points to the dashboard profile page instead of showing a raw
|
|
22
|
+
script command
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
10
26
|
## [0.6.0-alpha.23] — 2026-03-29
|
|
11
27
|
|
|
12
28
|
### Changed
|
package/template/manifest.json
CHANGED