mirror of
https://github.com/acamarata/qibla.git
synced 2026-07-01 11:24:28 +00:00
add opt-in anonymous telemetry (#1)
Some checks failed
CI / Test (Node 20) (push) Failing after 34s
CI / Test (Node 22) (push) Failing after 35s
CI / Test (Node 24) (push) Failing after 26s
CI / Lint & Format (push) Failing after 27s
CI / Typecheck (push) Failing after 25s
CI / Pack Check (push) Failing after 31s
CI / Coverage (push) Failing after 3s
Some checks failed
CI / Test (Node 20) (push) Failing after 34s
CI / Test (Node 22) (push) Failing after 35s
CI / Test (Node 24) (push) Failing after 26s
CI / Lint & Format (push) Failing after 27s
CI / Typecheck (push) Failing after 25s
CI / Pack Check (push) Failing after 31s
CI / Coverage (push) Failing after 3s
* add opt-in telemetry via @acamarata/telemetry (off by default) * chore: update lockfile for @acamarata/telemetry devDep * chore: fix prettier formatting on telemetry import
This commit is contained in:
parent
b5c6ca007a
commit
1cbfa04acf
5 changed files with 33 additions and 1 deletions
|
|
@ -56,6 +56,11 @@ Full API reference, algorithm design, and spherical trigonometry notes: [GitHub
|
||||||
|
|
||||||
Ka'bah coordinates verified against published GPS surveys and cross-checked with satellite imagery. Forward azimuth formula follows standard spherical trigonometry as used in aviation and geodesy.
|
Ka'bah coordinates verified against published GPS surveys and cross-checked with satellite imagery. Forward azimuth formula follows standard spherical trigonometry as used in aviation and geodesy.
|
||||||
|
|
||||||
|
## Telemetry
|
||||||
|
|
||||||
|
This package supports opt-in anonymous usage telemetry — off by default.
|
||||||
|
Enable: `ACAMARATA_TELEMETRY=1`. See [TELEMETRY.md](./TELEMETRY.md) for what is sent and how to disable.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
[MIT](LICENSE)
|
[MIT](LICENSE)
|
||||||
|
|
|
||||||
8
TELEMETRY.md
Normal file
8
TELEMETRY.md
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
# Telemetry Disclosure
|
||||||
|
|
||||||
|
This package supports opt-in anonymous usage telemetry via [`@acamarata/telemetry`](https://github.com/acamarata/telemetry).
|
||||||
|
|
||||||
|
Telemetry is **off by default**. No data is sent unless you set `ACAMARATA_TELEMETRY=1`.
|
||||||
|
|
||||||
|
Full disclosure (what is sent, where it goes, how to disable):
|
||||||
|
[github.com/acamarata/telemetry/blob/main/TELEMETRY.md](https://github.com/acamarata/telemetry/blob/main/TELEMETRY.md)
|
||||||
|
|
@ -85,7 +85,8 @@
|
||||||
"typedoc": "^0.28.19",
|
"typedoc": "^0.28.19",
|
||||||
"typedoc-plugin-markdown": "^4.11.0",
|
"typedoc-plugin-markdown": "^4.11.0",
|
||||||
"typescript": "^5.8.3",
|
"typescript": "^5.8.3",
|
||||||
"typescript-eslint": "^8.32.1"
|
"typescript-eslint": "^8.32.1",
|
||||||
|
"@acamarata/telemetry": "^0.1.0"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"packageManager": "pnpm@10.11.1",
|
"packageManager": "pnpm@10.11.1",
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,9 @@ importers:
|
||||||
'@acamarata/prettier-config':
|
'@acamarata/prettier-config':
|
||||||
specifier: ^0.1.0
|
specifier: ^0.1.0
|
||||||
version: 0.1.0(prettier@3.8.1)
|
version: 0.1.0(prettier@3.8.1)
|
||||||
|
'@acamarata/telemetry':
|
||||||
|
specifier: ^0.1.0
|
||||||
|
version: 0.1.0
|
||||||
'@acamarata/tsconfig':
|
'@acamarata/tsconfig':
|
||||||
specifier: ^0.1.0
|
specifier: ^0.1.0
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
|
|
@ -81,6 +84,10 @@ packages:
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
prettier: '>=3.0.0'
|
prettier: '>=3.0.0'
|
||||||
|
|
||||||
|
'@acamarata/telemetry@0.1.0':
|
||||||
|
resolution: {integrity: sha512-iP09ZD0bHencHLbv6kQZDgwN9crLCWGKxmiMrfJjhBCoWTgv4koSgg0Li/LFKwCCFluua6orj9fVeQ8eqcJXSQ==}
|
||||||
|
engines: {node: '>=20'}
|
||||||
|
|
||||||
'@acamarata/tsconfig@0.1.0':
|
'@acamarata/tsconfig@0.1.0':
|
||||||
resolution: {integrity: sha512-bgzyBak43mE+0HhduZX3cvaPjKcggtGGZZMjr35qtYWolsIWgZ9nx7OOswbVYoU35qoUv6rZ0mTK6GbZ8QTYjw==}
|
resolution: {integrity: sha512-bgzyBak43mE+0HhduZX3cvaPjKcggtGGZZMjr35qtYWolsIWgZ9nx7OOswbVYoU35qoUv6rZ0mTK6GbZ8QTYjw==}
|
||||||
engines: {node: '>=20'}
|
engines: {node: '>=20'}
|
||||||
|
|
@ -1222,6 +1229,8 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
prettier: 3.8.1
|
prettier: 3.8.1
|
||||||
|
|
||||||
|
'@acamarata/telemetry@0.1.0': {}
|
||||||
|
|
||||||
'@acamarata/tsconfig@0.1.0': {}
|
'@acamarata/tsconfig@0.1.0': {}
|
||||||
|
|
||||||
'@bcoe/v8-coverage@1.0.2': {}
|
'@bcoe/v8-coverage@1.0.2': {}
|
||||||
|
|
|
||||||
|
|
@ -146,3 +146,12 @@ export function distanceKm(lat1: number, lng1: number, lat2: number, lng2: numbe
|
||||||
Math.sin(dLat / 2) ** 2 + Math.cos(lat1 * DEG) * Math.cos(lat2 * DEG) * Math.sin(dLng / 2) ** 2;
|
Math.sin(dLat / 2) ** 2 + Math.cos(lat1 * DEG) * Math.cos(lat2 * DEG) * Math.sin(dLng / 2) ** 2;
|
||||||
return EARTH_RADIUS_KM * 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
return EARTH_RADIUS_KM * 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ── Opt-in anonymous telemetry ────────────────────────────────────────────────
|
||||||
|
// Off by default. Enable: ACAMARATA_TELEMETRY=1
|
||||||
|
// What is sent + how to disable: https://github.com/acamarata/telemetry/blob/main/TELEMETRY.md
|
||||||
|
import("@acamarata/telemetry")
|
||||||
|
.then(({ track }) => track("load", { package: "@acamarata/qibla", version: "1.1.2" }))
|
||||||
|
.catch(() => {
|
||||||
|
// telemetry not installed or disabled — that is fine
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue