From f10dbbc45ccd836939281b8391429e05ecc4bb40 Mon Sep 17 00:00:00 2001 From: Hank Date: Mon, 13 Jul 2026 19:35:33 -0700 Subject: [PATCH] privacy: remove personal test coordinate from committed docs/tests The Sandpoint lat/lng from .creds.json had been baked into the API-doc example and the integration test. Doc now uses a rounded ~downtown point; the test reads the coordinate from the gitignored .creds.json (rounded, non-personal fallback). Co-Authored-By: Claude Fable 5 --- docs/PARKSMARTER_API.md | 2 +- parksmarter-client/test/integration.test.mjs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/PARKSMARTER_API.md b/docs/PARKSMARTER_API.md index d0c746f..22e27b2 100644 --- a/docs/PARKSMARTER_API.md +++ b/docs/PARKSMARTER_API.md @@ -79,7 +79,7 @@ lookups 401 when signed out, despite being "data" reads. ```ts // By location (only a single coordinate is ever sent — the point you're searching): -const res = await ps.getMetersByLocation({ latitude: 48.2754, longitude: -116.5478 }); +const res = await ps.getMetersByLocation({ latitude: 48.28, longitude: -116.55 }); // ~downtown Sandpoint const zones = res.Zones ?? []; // Pick a zone + space to act on: diff --git a/parksmarter-client/test/integration.test.mjs b/parksmarter-client/test/integration.test.mjs index 797627c..e6bd165 100644 --- a/parksmarter-client/test/integration.test.mjs +++ b/parksmarter-client/test/integration.test.mjs @@ -13,9 +13,11 @@ import { readFileSync, existsSync } from 'node:fs'; import { ParkSmarterClient, isFreeEstimate } from '../dist/index.js'; const ENV = process.env.PS_TEST_ENV || 'test'; -const SANDPOINT = { latitude: 48.27538, longitude: -116.54779 }; const credsUrl = new URL('../.creds.json', import.meta.url); const creds = existsSync(credsUrl) ? JSON.parse(readFileSync(credsUrl, 'utf8')) : {}; +// Search point: your own coordinate from the gitignored .creds.json when present, +// else a rounded, non-personal downtown-Sandpoint point (~1 km precision — not a home). +const SANDPOINT = { latitude: Number(creds.lat) || 48.28, longitude: Number(creds.lng) || -116.55 }; // Probe reachability once; if the instance blocks us, skip the whole suite. let reason = false; @@ -38,7 +40,7 @@ test(`[${ENV}] ApplicationValidity bootstraps a session`, { skip: reason }, asyn assert.ok(av.SessionId || av.Config, 'expected a bootstrap payload'); }); -test(`[${ENV}] Sandpoint (DSB) zones are returned near 48.27,-116.55`, { skip: reason }, async () => { +test(`[${ENV}] Sandpoint (DSB) zones are returned near downtown`, { skip: reason }, async () => { const ps = await client(); const m = await ps.getMetersByLocation(SANDPOINT); assert.ok(Array.isArray(m.Zones) && m.Zones.length > 0, 'expected zones near Sandpoint');