mirror of
https://github.com/acamarata/solar-spa.git
synced 2026-06-30 19:04:28 +00:00
add opt-in telemetry via @acamarata/telemetry (off by default)
This commit is contained in:
parent
f28abeea65
commit
7308f9b8db
4 changed files with 26 additions and 1 deletions
|
|
@ -59,6 +59,11 @@ This package includes the Solar Position Algorithm (SPA) developed at the Nation
|
||||||
|
|
||||||
> Reda, I., Andreas, A. (2004). "Solar Position Algorithm for Solar Radiation Applications." *Solar Energy*, 76(5), 577-589.
|
> Reda, I., Andreas, A. (2004). "Solar Position Algorithm for Solar Radiation Applications." *Solar Energy*, 76(5), 577-589.
|
||||||
|
|
||||||
|
## 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 (wrapper, TypeScript source, and build tooling). The NREL SPA C source (`src/spa.c`, `src/spa.h`) is subject to its own terms; see the notice in those files.
|
MIT (wrapper, TypeScript source, and build tooling). The NREL SPA C source (`src/spa.c`, `src/spa.h`) is subject to its own terms; see the notice in those files.
|
||||||
|
|
|
||||||
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)
|
||||||
|
|
@ -88,7 +88,8 @@
|
||||||
"typedoc": "^0.28.19",
|
"typedoc": "^0.28.19",
|
||||||
"typedoc-plugin-markdown": "^4.11.0",
|
"typedoc-plugin-markdown": "^4.11.0",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
"typescript-eslint": "^8.56.1"
|
"typescript-eslint": "^8.56.1",
|
||||||
|
"@acamarata/telemetry": "^0.1.0"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.11.1",
|
"packageManager": "pnpm@10.11.1",
|
||||||
"prettier": "@acamarata/prettier-config"
|
"prettier": "@acamarata/prettier-config"
|
||||||
|
|
|
||||||
11
src/index.ts
11
src/index.ts
|
|
@ -309,3 +309,14 @@ export async function spaFormatted(
|
||||||
}
|
}
|
||||||
|
|
||||||
export default spa;
|
export default spa;
|
||||||
|
|
||||||
|
// ── 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: 'solar-spa', version: '2.0.2' }),
|
||||||
|
)
|
||||||
|
.catch(() => {
|
||||||
|
// telemetry not installed or disabled — that is fine
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue