flowcollab 0.3.1 → 0.3.3
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/bin/_client.mjs +5 -5
- package/bin/edit.mjs +2 -1
- package/package.json +1 -1
package/bin/_client.mjs
CHANGED
|
@@ -54,13 +54,13 @@ function loadGlobalConfig() {
|
|
|
54
54
|
}
|
|
55
55
|
const _gc = loadGlobalConfig();
|
|
56
56
|
|
|
57
|
-
// flow-login writes apiBase to ~/.flow/config.json —
|
|
58
|
-
// a stale FLOW_API_BASE doesn't silently override the
|
|
59
|
-
//
|
|
57
|
+
// flow-login writes apiBase + token to ~/.flow/config.json — both take precedence over
|
|
58
|
+
// env vars so a stale FLOW_API_BASE / FLOW_API_TOKEN_* doesn't silently override the
|
|
59
|
+
// user's authenticated session. Env vars are still honoured when config.json has no value.
|
|
60
60
|
const DEFAULT_BASE = _gc.apiBase || process.env.FLOW_API_BASE || 'https://flow-production-84b7.up.railway.app';
|
|
61
61
|
|
|
62
62
|
function envToken() {
|
|
63
|
-
return process.env.FLOW_API_TOKEN_OWNER || process.env.FLOW_API_TOKEN_CONTRIBUTOR ||
|
|
63
|
+
return _gc.token || process.env.FLOW_API_TOKEN_OWNER || process.env.FLOW_API_TOKEN_CONTRIBUTOR || '';
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
function actingViaClaude() {
|
|
@@ -112,9 +112,9 @@ export function resolvedTokenDisplay() {
|
|
|
112
112
|
return '*'.repeat(Math.max(0, raw.length - 4)) + raw.slice(-4);
|
|
113
113
|
}
|
|
114
114
|
export function resolvedTokenSource() {
|
|
115
|
+
if (_gc.token) return 'flow-login';
|
|
115
116
|
if (process.env.FLOW_API_TOKEN_OWNER) return 'env (owner)';
|
|
116
117
|
if (process.env.FLOW_API_TOKEN_CONTRIBUTOR) return 'env (contributor)';
|
|
117
|
-
if (_gc.token) return 'flow-login';
|
|
118
118
|
return 'none';
|
|
119
119
|
}
|
|
120
120
|
|
package/bin/edit.mjs
CHANGED
|
@@ -38,7 +38,8 @@ async function main() {
|
|
|
38
38
|
const label = updated.title || id.slice(0, 8);
|
|
39
39
|
process.stdout.write(`Updated: ${label}\n`);
|
|
40
40
|
for (const [k, v] of Object.entries(changes)) {
|
|
41
|
-
|
|
41
|
+
const display = v === null || (Array.isArray(v) && v.length === 0) ? '(cleared)' : v;
|
|
42
|
+
process.stdout.write(` ${k}: ${display}\n`);
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
|