@openwaters/noaa-current-stations 0.4.0 → 0.5.0

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 (3) hide show
  1. package/README.md +24 -3
  2. package/currents.json +145454 -0
  3. package/package.json +3 -2
package/README.md CHANGED
@@ -16,6 +16,27 @@ schema — so you don't have to talk to the API at all.
16
16
  npm install @openwaters/noaa-current-stations
17
17
  ```
18
18
 
19
+ ## Use the bundle
20
+
21
+ The extracted station bundle ships with the package, so the common case needs no
22
+ network and no CLI run:
23
+
24
+ ```js
25
+ import bundle from "@openwaters/noaa-current-stations/currents.json" with { type: "json" };
26
+
27
+ // { note, generated, crossFlow, stations } — the records are under `stations`,
28
+ // and their ids are bare NOAA keys, unprefixed.
29
+ const deception = bundle.stations.find((s) => s.id === "PUG1701");
30
+ ```
31
+
32
+ That path is a supported entry point and will not move without a major version.
33
+ It adds about 260 KB to the download and 3.2 MB unpacked — JSON compresses well,
34
+ so the wire cost is far smaller than the file. Consumers that only want the
35
+ extractor or the schema can ignore it; nothing imports it implicitly.
36
+
37
+ Regenerate it yourself with `npx noaa-current-stations extract currents.json` if
38
+ you need fresher data than the last release.
39
+
19
40
  ## Use it as a CLI
20
41
 
21
42
  ```bash
@@ -117,8 +138,8 @@ as a diff. [`update-stations`](.github/workflows/update-stations.yml) keeps it c
117
138
  | Monthly | forced full extraction (~2,800 paced requests, ~25 min) | NOAA revising an existing station's constituents in place |
118
139
 
119
140
  The weekly pre-flight only escalates to a full extraction when something moved, so the
120
- common case costs a single request. Either way, a change opens a **pull request** with
121
- the validation summary — nothing updates silently.
141
+ common case costs a single request. Either way, a change pushes a branch and files a
142
+ review issue with the validation summary and pull-request link — nothing updates silently.
122
143
 
123
144
  `stations.lock.json` pins the current list; `noaa-current-stations check` is the same
124
145
  pre-flight you can run yourself, and exits non-zero on drift.
@@ -128,7 +149,7 @@ npx noaa-current-stations check # has NOAA's list moved?
128
149
  npx noaa-current-stations validate currents.json # structural check on a bundle
129
150
  ```
130
151
 
131
- `validate` is what gates the automated PR: it fails on a subordinate whose reference
152
+ `validate` gates the automated review branch: it fails on a subordinate whose reference
132
153
  went missing, duplicate ids, a harmonic station with no constituents, or a bundle that
133
154
  lost its Z₀ offsets — the shapes a truncated extraction takes.
134
155