@uwrl/qc-utils 0.0.17 → 0.0.19

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 (40) hide show
  1. package/README.md +56 -0
  2. package/dist/index.js +2149 -893
  3. package/dist/index.umd.cjs +15 -5
  4. package/package.json +61 -56
  5. package/dist/index.d.ts +0 -4
  6. package/dist/models/dataSource.d.ts +0 -173
  7. package/dist/models/index.d.ts +0 -2
  8. package/dist/models/payload.d.ts +0 -24
  9. package/dist/models/settings.d.ts +0 -65
  10. package/dist/models/timestamp.d.ts +0 -150
  11. package/dist/services/__tests__/createPatchObject.spec.d.ts +0 -1
  12. package/dist/services/__tests__/requestInterceptor.spec.d.ts +0 -1
  13. package/dist/services/__tests__/responseInterceptor.spec.d.ts +0 -1
  14. package/dist/services/api.d.ts +0 -147
  15. package/dist/services/apiMethods.d.ts +0 -8
  16. package/dist/services/createPatchObject.d.ts +0 -17
  17. package/dist/services/getCSRFToken.d.ts +0 -1
  18. package/dist/services/index.d.ts +0 -6
  19. package/dist/services/requestInterceptor.d.ts +0 -12
  20. package/dist/services/responseInterceptor.d.ts +0 -2
  21. package/dist/types/index.d.ts +0 -350
  22. package/dist/utils/__tests__/ellapsed-time.spec.d.ts +0 -1
  23. package/dist/utils/__tests__/format.spec.d.ts +0 -1
  24. package/dist/utils/__tests__/notifications.spec.d.ts +0 -1
  25. package/dist/utils/__tests__/observations.spec.d.ts +0 -1
  26. package/dist/utils/ellapsed-time.d.ts +0 -4
  27. package/dist/utils/format.d.ts +0 -5
  28. package/dist/utils/index.d.ts +0 -5
  29. package/dist/utils/notifications.d.ts +0 -46
  30. package/dist/utils/observations.d.ts +0 -5
  31. package/dist/utils/plotting/__tests__/delete-data.worker.spec.d.ts +0 -1
  32. package/dist/utils/plotting/__tests__/mock.d.ts +0 -4
  33. package/dist/utils/plotting/__tests__/observation-record.spec.d.ts +0 -1
  34. package/dist/utils/plotting/add-data.worker.d.ts +0 -0
  35. package/dist/utils/plotting/delete-data.worker.d.ts +0 -0
  36. package/dist/utils/plotting/drift-correction.worker.d.ts +0 -0
  37. package/dist/utils/plotting/fill-gaps.worker.d.ts +0 -0
  38. package/dist/utils/plotting/interpolate.worker.d.ts +0 -0
  39. package/dist/utils/plotting/observation-record.d.ts +0 -155
  40. package/dist/utils/plotting/shift-datetimes.worker.d.ts +0 -0
package/README.md CHANGED
@@ -0,0 +1,56 @@
1
+ # @uwrl/qc-utils
2
+
3
+ Quality-control utilities for hydrological time-series data. Used by [hydroserver-qc-app](https://github.com/hydroserver2/hydroserver-qc-app).
4
+
5
+ ## Local development with `npm link`
6
+
7
+ This package is consumed by `hydroserver-qc-app` via `npm link`. For active local development:
8
+
9
+ **1. From `qc-utils/`** (this repo):
10
+
11
+ ```sh
12
+ npm install
13
+ npm link # registers @uwrl/qc-utils globally
14
+ npm run dev # starts vite build --watch — rebuilds dist/ on every source change
15
+ ```
16
+
17
+ Leave that terminal running.
18
+
19
+ **2. From `hydroserver-qc-app/`** (the consumer, in a second terminal):
20
+
21
+ ```sh
22
+ npm install
23
+ npm run link-qc-utils # symlinks node_modules/@uwrl/qc-utils → this dist/
24
+ npm run dev # starts the Vite dev server
25
+ ```
26
+
27
+ Edit any file in `qc-utils/src/`. The watcher rebuilds `dist/` within ~1s. Refresh the app browser to pick up the change.
28
+
29
+ ### Caveats
30
+
31
+ - `vite build --watch` rebuilds the JS bundle but **does not emit `.d.ts` files** (those come from the full `npm run build`). If the app surfaces stale type errors during dev, run `npm run build` once in `qc-utils` and they'll refresh.
32
+ - Two terminals required (one per repo). If the friction proves real, a future phase can wire `concurrently` to run both watchers from a single command.
33
+ - HMR is **not** propagated through the linked dependency — Vite library mode doesn't expose HMR boundaries to the consumer. Browser refresh is the loop.
34
+
35
+ ## Scripts
36
+
37
+ | Script | Purpose |
38
+ |--------|---------|
39
+ | `npm run dev` | Start the watch-mode bundler for linked-dev workflow (alias of `watch`). |
40
+ | `npm run watch` | Same as `dev` (kept for backward compatibility). |
41
+ | `npm run build` | Production build — bundle + emit `.d.ts` declarations. |
42
+ | `npm run test` | Run the Vitest suite once. |
43
+ | `npm run coverage` | Run the suite with v8 coverage and the 80% threshold. |
44
+ | `npm run lint` | Run ESLint over `src/`. |
45
+ | `npm run lint:fix` | Auto-fix lintable errors. |
46
+ | `npm run preview` | Preview the production build with Vite. |
47
+ | `npm link` | Register this package for `npm link @uwrl/qc-utils` in consumers. |
48
+ | `npm publish` (`pub`) | Publish to npm under `--access public`. |
49
+
50
+ ## CI
51
+
52
+ GitHub Actions runs `tsc --noEmit → coverage → lint → build` on every push and PR-to-main. See `.github/workflows/ci.yml`.
53
+
54
+ ## License
55
+
56
+ ISC