election-vibe 0.1.5 → 0.1.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.
Files changed (2) hide show
  1. package/dist/cli.js +4 -3
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -216,7 +216,7 @@ var REHEARSAL_SENTENCE = {
216
216
 
217
217
  // src/http.ts
218
218
  import { gunzipSync } from "zlib";
219
- var USER_AGENT = `ElectionsCompanion/${"0.1.5"} (unofficial results reader; local, no telemetry)`;
219
+ var USER_AGENT = `ElectionsCompanion/${"0.1.6"} (unofficial results reader; local, no telemetry)`;
220
220
  function retryAfterMs(header, nowMs) {
221
221
  if (!header) return void 0;
222
222
  const t = header.trim();
@@ -276,6 +276,7 @@ async function fetchDocument(url, opts) {
276
276
  const timer = setTimeout(() => ctl.abort(), opts.timeoutMs ?? 15e3);
277
277
  try {
278
278
  const headers = { "user-agent": USER_AGENT, accept: "application/json, text/plain, */*" };
279
+ if (opts.acceptEncoding) headers["accept-encoding"] = opts.acceptEncoding;
279
280
  if (opts.etag) headers["if-none-match"] = opts.etag;
280
281
  const origin = new URL(url);
281
282
  let current = url;
@@ -2248,7 +2249,7 @@ async function cycle(deps, opts) {
2248
2249
  s = countRequest(s, deps.now());
2249
2250
  stores.prod.sources[src.id] = s;
2250
2251
  report.requests[src.id] = (report.requests[src.id] ?? 0) + 1;
2251
- return fetchDocument(url, { now: deps.now, fetchImpl: deps.fetchImpl, maxBytes: 16 * 1024 * 1024, method });
2252
+ return fetchDocument(url, { now: deps.now, fetchImpl: deps.fetchImpl, maxBytes: 16 * 1024 * 1024, method, ...src.kind === "clarity" ? { acceptEncoding: "identity" } : {} });
2252
2253
  };
2253
2254
  const fail = (src, r) => {
2254
2255
  stores.prod.sources[src.id] = afterFailure(stores.prod.sources[src.id] ?? freshSourceState(src.id, deps.now()), r, deps.now(), deps.random);
@@ -46335,7 +46336,7 @@ function storeOf(p) {
46335
46336
  }
46336
46337
  async function main(argv, io) {
46337
46338
  if (argv[0] === "--version" || argv[0] === "version") {
46338
- io.out("0.1.5");
46339
+ io.out("0.1.6");
46339
46340
  return 0;
46340
46341
  }
46341
46342
  const p = parseArgs(argv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "election-vibe",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "US election night, Nov 3, 2026, in your terminal and in Claude Code: unofficial results from official free sources and civicAPI, kept on your machine. Never calls a race. Unofficial results. Not an election authority. Not affiliated with any government, campaign, or party.",
5
5
  "keywords": [
6
6
  "election",