terminalhire 0.40.5 → 0.40.6

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.
@@ -59,7 +59,7 @@ function localVersion() {
59
59
  for (const p of [join(here, "..", "..", "package.json"), join(here, "..", "package.json")]) {
60
60
  try {
61
61
  const pkg = JSON.parse(readFileSync(p, "utf8"));
62
- if (pkg.version) return pkg.version;
62
+ if (pkg.name === "terminalhire" && pkg.version) return pkg.version;
63
63
  } catch {
64
64
  }
65
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "terminalhire",
3
- "version": "0.40.5",
3
+ "version": "0.40.6",
4
4
  "description": "Local-first job matching for developers — ambient job matches in the Claude Code spinner. Your profile never leaves your machine.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -305,10 +305,28 @@ async function install({ ask: injectedAsk } = {}) {
305
305
  asker.close();
306
306
  return 0;
307
307
  }
308
- } else if (/^n(o)?$/i.test(String(answer ?? '').trim())) {
309
- console.log('\nAborted nothing was changed.');
310
- asker.close();
311
- return 0;
308
+ } else {
309
+ // ALLOWLIST, not a denylist. The first version of this asked "is it n or no?"
310
+ // and installed on everything else — which meant `null` installed, and `ask`
311
+ // resolves null on EOF, on Ctrl-D, and whenever the shared readline closes
312
+ // because the human bailed out of `init` mid-flow. `String(null ?? '')` is the
313
+ // empty string, indistinguishable from pressing Enter. So did "nope", "cancel",
314
+ // and an `n` still wrapped in bracketed-paste bytes. Under the old literal-"yes"
315
+ // bar every one of those aborted; a denylist silently turned each into consent
316
+ // to write another program's config file.
317
+ //
318
+ // The `th://` prompt eight steps below in the same flow (jpi-init.js) already
319
+ // allowlists `'' | y | yes`. Two consecutive consent prompts disagreeing about
320
+ // which way an unrecognised answer falls is how a regression gets waved through.
321
+ const a = String(answer ?? '')
322
+ .trim()
323
+ .toLowerCase();
324
+ const consented = answer !== null && (a === '' || a === 'y' || a === 'yes');
325
+ if (!consented) {
326
+ console.log('\nAborted — nothing was changed.');
327
+ asker.close();
328
+ return 0;
329
+ }
312
330
  }
313
331
 
314
332
  const src = resolveLauncherSource();