yolont 0.3.0 โ†’ 0.3.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/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
  rules, looks harder where mistakes hurt, scores every MR/PR 0โ€“100, and learns when you tell it
5
5
  it's wrong.
6
6
 
7
+ ๐ŸŒ **[srcgrp.dev/yolont](https://srcgrp.dev/yolont)** ยท ๐Ÿ“– [Guide](docs/GUIDE.md) ยท ๐Ÿ“ฆ [npm](https://www.npmjs.com/package/yolont)
8
+
7
9
  ```bash
8
10
  cd ~/code/your-project
9
11
  npx yolont
package/dist/cli.js CHANGED
@@ -6144,6 +6144,13 @@ function parseAddress(s) {
6144
6144
  const withScheme = /^[a-z][a-z0-9+.-]*:\/\//i.test(s.trim()) || s.includes("@") ? s : `https://${s.trim()}`;
6145
6145
  return parseGitAddress(withScheme, gitlabBases2());
6146
6146
  }
6147
+ function describeFetchError(err) {
6148
+ const e = err;
6149
+ const cause = e.cause?.code ?? e.cause?.message;
6150
+ if (!cause) return e.message;
6151
+ const hint = /ENOTFOUND|EAI_AGAIN/.test(cause) ? "the host name doesn't resolve" : /ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT/.test(cause) ? "no answer (blocked, or needs a VPN?)" : /ECONNREFUSED|ECONNRESET/.test(cause) ? "the connection was refused or dropped" : /SSL|TLS|CERT/i.test(cause) ? "the secure connection was refused (often a VPN/proxy or a region block)" : "";
6152
+ return `${e.message} (${cause}${hint ? `: ${hint}` : ""}). Can you open the host in a browser from this machine?`;
6153
+ }
6147
6154
  async function forgeStep(detected, raw, change) {
6148
6155
  let address = detected;
6149
6156
  let last = raw ?? "";
@@ -6189,7 +6196,7 @@ ${type === "github" ? "Scope: repo (or fine-grained: Pull requests + Issues read
6189
6196
  const ok = await testForge(forge, address.projectPath);
6190
6197
  s.stop(`Signed in as ${pc3.bold(ok.username)} \xB7 ${ok.pathWithNamespace}`);
6191
6198
  } catch (err) {
6192
- s.stop(pc3.red(`Check failed: ${err.message}`));
6199
+ s.stop(pc3.red(`Check failed: ${describeFetchError(err)}`));
6193
6200
  const next = await ask(
6194
6201
  select2({
6195
6202
  message: "What now?",