ticketlens 0.1.12 → 0.1.13
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/package.json
CHANGED
|
@@ -152,22 +152,14 @@ export async function run({ configDir = DEFAULT_CONFIG_DIR, profileName } = {})
|
|
|
152
152
|
const tokenHint = existingToken ? s.dim(' [keep existing]') : '';
|
|
153
153
|
const tokenLabel = s.dim(getTokenLabel(trackerType, auth)) + tokenHint + s.dim(':');
|
|
154
154
|
token = await promptSecret(tokenLabel, { stream, existingValue: existingToken });
|
|
155
|
-
const tokenChanged = token !== existingToken;
|
|
156
155
|
|
|
157
|
-
// ── Connection test (
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|| email !== (profile.email || '')
|
|
161
|
-
|| tokenChanged;
|
|
156
|
+
// ── Connection test (always) ──────────────────────────────────────────────
|
|
157
|
+
let connected = false;
|
|
158
|
+
let startFrom = 'test';
|
|
162
159
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
let startFrom = 'test';
|
|
167
|
-
|
|
168
|
-
setupLoop: while (true) {
|
|
169
|
-
// Re-prompt URL + auth (on retry)
|
|
170
|
-
if (startFrom === 'url') {
|
|
160
|
+
setupLoop: while (true) {
|
|
161
|
+
// Re-prompt URL + auth (on retry with 'url' option)
|
|
162
|
+
if (startFrom === 'url') {
|
|
171
163
|
stream.write('\n');
|
|
172
164
|
const reTyped = await promptText(
|
|
173
165
|
s.dim(urlLabel) + s.dim(` [current: ${url}]:`),
|
|
@@ -249,11 +241,10 @@ export async function run({ configDir = DEFAULT_CONFIG_DIR, profileName } = {})
|
|
|
249
241
|
startFrom = RETRY_OPTIONS[retryIdx].value;
|
|
250
242
|
}
|
|
251
243
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
244
|
+
if (!connected) {
|
|
245
|
+
stream.write(`\n ${s.yellow('○')} Connection changes discarded. ${s.dim('Run')} ${s.cyan('ticketlens config')} ${s.dim('again to retry.')}\n\n`);
|
|
246
|
+
process.exitCode = 1;
|
|
247
|
+
return;
|
|
257
248
|
}
|
|
258
249
|
|
|
259
250
|
// ── Optional settings ──────────────────────────────────────────────────────
|