@kici-dev/orchestrator 0.2.0 → 0.4.0

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.
@@ -63,6 +63,28 @@ export interface GenericSourceResponse {
63
63
  /** Universal-git config; raw JSON string or parsed object (pg driver dependent). */
64
64
  git_config?: string | GenericSourceGitConfigPayload | null;
65
65
  }
66
+ /**
67
+ * `fetch` rejects with a bare `TypeError: fetch failed` when it cannot reach the
68
+ * host — it names neither the address dialled nor the knob that sets it. Printed
69
+ * through the CLI's `Error: ${message}` handler that becomes `Error: fetch
70
+ * failed`, which reads like a fault in the subcommand rather than a misaddressed
71
+ * client, and sends the operator debugging the wrong thing.
72
+ *
73
+ * The trap is sharpened by two details of this CLI. The base URL comes from
74
+ * `KICI_ADMIN_URL`, not the `KICI_ORCHESTRATOR_URL` an operator is likelier to
75
+ * have exported; and subcommands accepting `--database-url` fall back to direct
76
+ * DB access, so on a host with `KICI_DATABASE_URL` set they keep working while
77
+ * the HTTP-only ones fail — making it look like specific subcommands are broken.
78
+ *
79
+ * So: name the address, name the variable, and name the near-miss.
80
+ */
81
+ /**
82
+ * Best-effort one-line detail from a rejected `fetch`. Returns '' when nothing
83
+ * useful is available, so the caller can omit the parenthetical rather than
84
+ * print an empty one.
85
+ */
86
+ export declare function firstCauseMessage(err: unknown): string;
87
+ export declare function fetchAdminApi(url: string, init: RequestInit, baseUrl: string): Promise<Response>;
66
88
  export declare class AdminApiClient {
67
89
  private readonly baseUrl;
68
90
  private readonly token;