election-vibe 0.1.4 → 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 +44 -43
  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.4"} (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);
@@ -24348,8 +24349,8 @@ var registry_default = {
24348
24349
  state: "CA",
24349
24350
  county: "santa-clara",
24350
24351
  level: "measure",
24351
- office: "Measure A - City of Morgan Hill, Elected City Treasurer to an Appointive Position",
24352
- title: "Measure A - City of Morgan Hill, Elected City Treasurer to an Appointive Position",
24352
+ office: "Measure A - City of Morgan Hill, Elected City Treasurer to an Appointive Position - Majority Vote Required",
24353
+ title: "Measure A - City of Morgan Hill, Elected City Treasurer to an Appointive Position - Majority Vote Required",
24353
24354
  stage: "regular",
24354
24355
  seats: 0,
24355
24356
  method: "measure",
@@ -24376,8 +24377,8 @@ var registry_default = {
24376
24377
  state: "CA",
24377
24378
  county: "santa-clara",
24378
24379
  level: "measure",
24379
- office: "Measure B - City of Gilroy, Transient Occupancy Tax",
24380
- title: "Measure B - City of Gilroy, Transient Occupancy Tax",
24380
+ office: "Measure B - City of Gilroy, Transient Occupancy Tax - Majority Vote Required",
24381
+ title: "Measure B - City of Gilroy, Transient Occupancy Tax - Majority Vote Required",
24381
24382
  stage: "regular",
24382
24383
  seats: 0,
24383
24384
  method: "measure",
@@ -24404,8 +24405,8 @@ var registry_default = {
24404
24405
  state: "CA",
24405
24406
  county: "santa-clara",
24406
24407
  level: "measure",
24407
- office: "Measure C - City of Santa Clara, Public Works Charter Amendment",
24408
- title: "Measure C - City of Santa Clara, Public Works Charter Amendment",
24408
+ office: "Measure C - City of Santa Clara, Public Works Charter Amendment - Majority Vote Required",
24409
+ title: "Measure C - City of Santa Clara, Public Works Charter Amendment - Majority Vote Required",
24409
24410
  stage: "regular",
24410
24411
  seats: 0,
24411
24412
  method: "measure",
@@ -24432,8 +24433,8 @@ var registry_default = {
24432
24433
  state: "CA",
24433
24434
  county: "santa-clara",
24434
24435
  level: "measure",
24435
- office: "Measure D - City of Los Altos, Citizen-Sponsored Initiative, Los Altos Downtown Parking Plaza Ordinance",
24436
- title: "Measure D - City of Los Altos, Citizen-Sponsored Initiative, Los Altos Downtown Parking Plaza Ordinance",
24436
+ office: "Measure D - City of Los Altos, Citizen-Sponsored Initiative, Los Altos Downtown Parking Plaza Ordinance - Majority Vote",
24437
+ title: "Measure D - City of Los Altos, Citizen-Sponsored Initiative, Los Altos Downtown Parking Plaza Ordinance - Majority Vote",
24437
24438
  stage: "regular",
24438
24439
  seats: 0,
24439
24440
  method: "measure",
@@ -24460,8 +24461,8 @@ var registry_default = {
24460
24461
  state: "CA",
24461
24462
  county: "santa-clara",
24462
24463
  level: "measure",
24463
- office: "Measure E - City of Mountain View, Charter Amendment, Modernize and Clarify Its Provisions",
24464
- title: "Measure E - City of Mountain View, Charter Amendment, Modernize and Clarify Its Provisions",
24464
+ office: "Measure E - City of Mountain View, Charter Amendment, Modernize and Clarify Its Provisions - Majority Vote Required",
24465
+ title: "Measure E - City of Mountain View, Charter Amendment, Modernize and Clarify Its Provisions - Majority Vote Required",
24465
24466
  stage: "regular",
24466
24467
  seats: 0,
24467
24468
  method: "measure",
@@ -24488,8 +24489,8 @@ var registry_default = {
24488
24489
  state: "CA",
24489
24490
  county: "santa-clara",
24490
24491
  level: "measure",
24491
- office: "Measure F - City of Mountain View, Transient Occupancy Tax",
24492
- title: "Measure F - City of Mountain View, Transient Occupancy Tax",
24492
+ office: "Measure F - City of Mountain View, Transient Occupancy Tax - Majority Vote Required",
24493
+ title: "Measure F - City of Mountain View, Transient Occupancy Tax - Majority Vote Required",
24493
24494
  stage: "regular",
24494
24495
  seats: 0,
24495
24496
  method: "measure",
@@ -24516,8 +24517,8 @@ var registry_default = {
24516
24517
  state: "CA",
24517
24518
  county: "santa-clara",
24518
24519
  level: "measure",
24519
- office: "Measure G - City of Sunnyvale, Charter Amendment, Public Works Contracts",
24520
- title: "Measure G - City of Sunnyvale, Charter Amendment, Public Works Contracts",
24520
+ office: "Measure G - City of Sunnyvale, Charter Amendment, Public Works Contracts - Majority Vote Required",
24521
+ title: "Measure G - City of Sunnyvale, Charter Amendment, Public Works Contracts - Majority Vote Required",
24521
24522
  stage: "regular",
24522
24523
  seats: 0,
24523
24524
  method: "measure",
@@ -24544,8 +24545,8 @@ var registry_default = {
24544
24545
  state: "CA",
24545
24546
  county: "santa-clara",
24546
24547
  level: "measure",
24547
- office: "Measure H - City of Sunnyvale, City Manager Settlement Authority",
24548
- title: "Measure H - City of Sunnyvale, City Manager Settlement Authority",
24548
+ office: "Measure H - City of Sunnyvale, City Manager Settlement Authority - Majority Vote Required",
24549
+ title: "Measure H - City of Sunnyvale, City Manager Settlement Authority - Majority Vote Required",
24549
24550
  stage: "regular",
24550
24551
  seats: 0,
24551
24552
  method: "measure",
@@ -24572,8 +24573,8 @@ var registry_default = {
24572
24573
  state: "CA",
24573
24574
  county: "santa-clara",
24574
24575
  level: "measure",
24575
- office: "Measure I - City of Sunnyvale, Charter Amendment, Elections to Fill Council Vacancies",
24576
- title: "Measure I - City of Sunnyvale, Charter Amendment, Elections to Fill Council Vacancies",
24576
+ office: "Measure I - City of Sunnyvale, Charter Amendment, Elections to Fill Council Vacancies - Majority Vote Required",
24577
+ title: "Measure I - City of Sunnyvale, Charter Amendment, Elections to Fill Council Vacancies - Majority Vote Required",
24577
24578
  stage: "regular",
24578
24579
  seats: 0,
24579
24580
  method: "measure",
@@ -24600,8 +24601,8 @@ var registry_default = {
24600
24601
  state: "CA",
24601
24602
  county: "santa-clara",
24602
24603
  level: "measure",
24603
- office: "Measure J - City of Palo Alto, Transactions and Use Tax",
24604
- title: "Measure J - City of Palo Alto, Transactions and Use Tax",
24604
+ office: "Measure J - City of Palo Alto, Transactions and Use Tax - Majority Vote Required",
24605
+ title: "Measure J - City of Palo Alto, Transactions and Use Tax - Majority Vote Required",
24605
24606
  stage: "regular",
24606
24607
  seats: 0,
24607
24608
  method: "measure",
@@ -24628,8 +24629,8 @@ var registry_default = {
24628
24629
  state: "CA",
24629
24630
  county: "santa-clara",
24630
24631
  level: "measure",
24631
- office: "Measure K - City of Milpitas, Business Tax Modernization",
24632
- title: "Measure K - City of Milpitas, Business Tax Modernization",
24632
+ office: "Measure K - City of Milpitas, Business Tax Modernization - Majority Vote Required",
24633
+ title: "Measure K - City of Milpitas, Business Tax Modernization - Majority Vote Required",
24633
24634
  stage: "regular",
24634
24635
  seats: 0,
24635
24636
  method: "measure",
@@ -24656,8 +24657,8 @@ var registry_default = {
24656
24657
  state: "CA",
24657
24658
  county: "santa-clara",
24658
24659
  level: "measure",
24659
- office: "Measure L - City of Cupertino, General Plan Amendment",
24660
- title: "Measure L - City of Cupertino, General Plan Amendment",
24660
+ office: "Measure L - City of Cupertino, General Plan Amendment - Majority Vote Required",
24661
+ title: "Measure L - City of Cupertino, General Plan Amendment - Majority Vote Required",
24661
24662
  stage: "regular",
24662
24663
  seats: 0,
24663
24664
  method: "measure",
@@ -24684,8 +24685,8 @@ var registry_default = {
24684
24685
  state: "CA",
24685
24686
  county: "santa-clara",
24686
24687
  level: "measure",
24687
- office: "Measure M - Gilroy Unified School District, School Bond",
24688
- title: "Measure M - Gilroy Unified School District, School Bond",
24688
+ office: "Measure M - Gilroy Unified School District, School Bond - 55% Vote Required",
24689
+ title: "Measure M - Gilroy Unified School District, School Bond - 55% Vote Required",
24689
24690
  stage: "regular",
24690
24691
  seats: 0,
24691
24692
  method: "measure",
@@ -24712,8 +24713,8 @@ var registry_default = {
24712
24713
  state: "CA",
24713
24714
  county: "santa-clara",
24714
24715
  level: "measure",
24715
- office: "Measure N - Los Gatos-Saratoga Union High School District, School Bond",
24716
- title: "Measure N - Los Gatos-Saratoga Union High School District, School Bond",
24716
+ office: "Measure N - Los Gatos-Saratoga Union High School District, School Bond - 55% Vote Required",
24717
+ title: "Measure N - Los Gatos-Saratoga Union High School District, School Bond - 55% Vote Required",
24717
24718
  stage: "regular",
24718
24719
  seats: 0,
24719
24720
  method: "measure",
@@ -24740,8 +24741,8 @@ var registry_default = {
24740
24741
  state: "CA",
24741
24742
  county: "santa-clara",
24742
24743
  level: "measure",
24743
- office: "Measure O - Alum Rock Union School District, Parcel Tax",
24744
- title: "Measure O - Alum Rock Union School District, Parcel Tax",
24744
+ office: "Measure O - Alum Rock Union School District, Parcel Tax - 2/3rds (66.67%) Vote Required",
24745
+ title: "Measure O - Alum Rock Union School District, Parcel Tax - 2/3rds (66.67%) Vote Required",
24745
24746
  stage: "regular",
24746
24747
  seats: 0,
24747
24748
  method: "measure",
@@ -24768,8 +24769,8 @@ var registry_default = {
24768
24769
  state: "CA",
24769
24770
  county: "santa-clara",
24770
24771
  level: "measure",
24771
- office: "Measure P - Alum Rock Union School District, School Bond",
24772
- title: "Measure P - Alum Rock Union School District, School Bond",
24772
+ office: "Measure P - Alum Rock Union School District, School Bond - 55% Vote Required",
24773
+ title: "Measure P - Alum Rock Union School District, School Bond - 55% Vote Required",
24773
24774
  stage: "regular",
24774
24775
  seats: 0,
24775
24776
  method: "measure",
@@ -24796,8 +24797,8 @@ var registry_default = {
24796
24797
  state: "CA",
24797
24798
  county: "santa-clara",
24798
24799
  level: "measure",
24799
- office: "Measure Q - Cambrian School District, Parcel Tax",
24800
- title: "Measure Q - Cambrian School District, Parcel Tax",
24800
+ office: "Measure Q - Cambrian School District, Parcel Tax - 2/3rds (66.67%) Vote Required",
24801
+ title: "Measure Q - Cambrian School District, Parcel Tax - 2/3rds (66.67%) Vote Required",
24801
24802
  stage: "regular",
24802
24803
  seats: 0,
24803
24804
  method: "measure",
@@ -24824,8 +24825,8 @@ var registry_default = {
24824
24825
  state: "CA",
24825
24826
  county: "santa-clara",
24826
24827
  level: "measure",
24827
- office: "Measure R - Orchard School District, Parcel Tax",
24828
- title: "Measure R - Orchard School District, Parcel Tax",
24828
+ office: "Measure R - Orchard School District, Parcel Tax - 2/3rds (66.67%) Vote Required",
24829
+ title: "Measure R - Orchard School District, Parcel Tax - 2/3rds (66.67%) Vote Required",
24829
24830
  stage: "regular",
24830
24831
  seats: 0,
24831
24832
  method: "measure",
@@ -24852,8 +24853,8 @@ var registry_default = {
24852
24853
  state: "CA",
24853
24854
  county: "santa-clara",
24854
24855
  level: "measure",
24855
- office: "Measure RTM - Public Transit Revenue Measure District (PTRMD), Regional Transit Measure",
24856
- title: "Measure RTM - Public Transit Revenue Measure District (PTRMD), Regional Transit Measure",
24856
+ office: "Measure RTM - Public Transit Revenue Measure District (PTRMD), Regional Transit Measure - Majority Vote Required",
24857
+ title: "Measure RTM - Public Transit Revenue Measure District (PTRMD), Regional Transit Measure - Majority Vote Required",
24857
24858
  stage: "regular",
24858
24859
  seats: 0,
24859
24860
  method: "measure",
@@ -24880,8 +24881,8 @@ var registry_default = {
24880
24881
  state: "CA",
24881
24882
  county: "santa-clara",
24882
24883
  level: "measure",
24883
- office: "Measure S - El Camino Healthcare District, Limit Number of Terms for Directors",
24884
- title: "Measure S - El Camino Healthcare District, Limit Number of Terms for Directors",
24884
+ office: "Measure S - El Camino Healthcare District, Limit Number of Terms for Directors - Majority Vote Required",
24885
+ title: "Measure S - El Camino Healthcare District, Limit Number of Terms for Directors - Majority Vote Required",
24885
24886
  stage: "regular",
24886
24887
  seats: 0,
24887
24888
  method: "measure",
@@ -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.4");
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.4",
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",