@neaps/tide-database 0.0.20251220
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.
- package/LICENSE +25 -0
- package/README.md +79 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.js +46289 -0
- package/package.json +44 -0
- package/schemas/station.schema.json +251 -0
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@neaps/tide-database",
|
|
3
|
+
"version": "0.0.20251220",
|
|
4
|
+
"description": "A public database of tide harmonics",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"tides",
|
|
7
|
+
"harmonics",
|
|
8
|
+
"database"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://github.com/neaps/tide-database#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/neaps/tide-database/issues"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/neaps/tide-database.git"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"author": "",
|
|
20
|
+
"type": "module",
|
|
21
|
+
"main": "dist/index.js",
|
|
22
|
+
"directories": {
|
|
23
|
+
"doc": "docs"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "vite build",
|
|
27
|
+
"prepare": "npm run build",
|
|
28
|
+
"test": "vitest"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"ajv": "^8.17.1",
|
|
32
|
+
"ajv-formats": "^3.0.1",
|
|
33
|
+
"geo-tz": "^8.1.4",
|
|
34
|
+
"make-fetch-happen": "^15.0.3",
|
|
35
|
+
"moment": "^2.30.1",
|
|
36
|
+
"vite": "^7.2.6",
|
|
37
|
+
"vite-plugin-dts": "^4.5.4",
|
|
38
|
+
"vitest": "^4.0.15"
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"dist",
|
|
42
|
+
"schemas"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://neaps.js.org/station.schema.json",
|
|
4
|
+
"title": "Tide Station",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"id",
|
|
8
|
+
"name",
|
|
9
|
+
"continent",
|
|
10
|
+
"country",
|
|
11
|
+
"type",
|
|
12
|
+
"latitude",
|
|
13
|
+
"longitude",
|
|
14
|
+
"timezone",
|
|
15
|
+
"source",
|
|
16
|
+
"license"
|
|
17
|
+
],
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"$defs": {
|
|
20
|
+
"offsets": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"required": [
|
|
23
|
+
"reference",
|
|
24
|
+
"height",
|
|
25
|
+
"time"
|
|
26
|
+
],
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"properties": {
|
|
29
|
+
"reference": {
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
"height": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"required": [
|
|
35
|
+
"high",
|
|
36
|
+
"low",
|
|
37
|
+
"type"
|
|
38
|
+
],
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"properties": {
|
|
41
|
+
"high": {
|
|
42
|
+
"type": "number"
|
|
43
|
+
},
|
|
44
|
+
"low": {
|
|
45
|
+
"type": "number"
|
|
46
|
+
},
|
|
47
|
+
"type": {
|
|
48
|
+
"enum": [
|
|
49
|
+
"ratio",
|
|
50
|
+
"fixed"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"time": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"required": [
|
|
58
|
+
"high",
|
|
59
|
+
"low"
|
|
60
|
+
],
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"properties": {
|
|
63
|
+
"high": {
|
|
64
|
+
"type": "number"
|
|
65
|
+
},
|
|
66
|
+
"low": {
|
|
67
|
+
"type": "number"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"properties": {
|
|
75
|
+
"id": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"minLength": 1
|
|
78
|
+
},
|
|
79
|
+
"name": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"minLength": 1
|
|
82
|
+
},
|
|
83
|
+
"continent": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"minLength": 1
|
|
86
|
+
},
|
|
87
|
+
"country": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"minLength": 1
|
|
90
|
+
},
|
|
91
|
+
"region": {
|
|
92
|
+
"type": "string"
|
|
93
|
+
},
|
|
94
|
+
"timezone": {
|
|
95
|
+
"type": "string"
|
|
96
|
+
},
|
|
97
|
+
"disclaimers": {
|
|
98
|
+
"type": "string"
|
|
99
|
+
},
|
|
100
|
+
"type": {
|
|
101
|
+
"enum": [
|
|
102
|
+
"reference",
|
|
103
|
+
"subordinate"
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"latitude": {
|
|
107
|
+
"type": "number"
|
|
108
|
+
},
|
|
109
|
+
"longitude": {
|
|
110
|
+
"type": "number"
|
|
111
|
+
},
|
|
112
|
+
"source": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"required": [
|
|
115
|
+
"name",
|
|
116
|
+
"id",
|
|
117
|
+
"published_harmonics",
|
|
118
|
+
"url",
|
|
119
|
+
"source_url"
|
|
120
|
+
],
|
|
121
|
+
"additionalProperties": true,
|
|
122
|
+
"properties": {
|
|
123
|
+
"name": {
|
|
124
|
+
"type": "string"
|
|
125
|
+
},
|
|
126
|
+
"id": {
|
|
127
|
+
"type": [
|
|
128
|
+
"string",
|
|
129
|
+
"number"
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
"published_harmonics": {
|
|
133
|
+
"type": "boolean"
|
|
134
|
+
},
|
|
135
|
+
"url": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"format": "uri"
|
|
138
|
+
},
|
|
139
|
+
"source_url": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"format": "uri"
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"license": {
|
|
146
|
+
"type": "object",
|
|
147
|
+
"required": [
|
|
148
|
+
"type",
|
|
149
|
+
"commercial_use",
|
|
150
|
+
"url"
|
|
151
|
+
],
|
|
152
|
+
"additionalProperties": true,
|
|
153
|
+
"properties": {
|
|
154
|
+
"type": {
|
|
155
|
+
"type": "string"
|
|
156
|
+
},
|
|
157
|
+
"commercial_use": {
|
|
158
|
+
"type": "boolean"
|
|
159
|
+
},
|
|
160
|
+
"url": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"format": "uri"
|
|
163
|
+
},
|
|
164
|
+
"notes": {
|
|
165
|
+
"type": "string"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"harmonic_constituents": {
|
|
170
|
+
"type": "array",
|
|
171
|
+
"items": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"required": [
|
|
174
|
+
"name",
|
|
175
|
+
"amplitude",
|
|
176
|
+
"phase_UTC",
|
|
177
|
+
"phase_local"
|
|
178
|
+
],
|
|
179
|
+
"additionalProperties": false,
|
|
180
|
+
"properties": {
|
|
181
|
+
"name": {
|
|
182
|
+
"type": "string"
|
|
183
|
+
},
|
|
184
|
+
"description": {
|
|
185
|
+
"type": [
|
|
186
|
+
"string",
|
|
187
|
+
"number",
|
|
188
|
+
"null"
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
"amplitude": {
|
|
192
|
+
"type": "number"
|
|
193
|
+
},
|
|
194
|
+
"phase_UTC": {
|
|
195
|
+
"type": "number"
|
|
196
|
+
},
|
|
197
|
+
"phase_local": {
|
|
198
|
+
"type": "number"
|
|
199
|
+
},
|
|
200
|
+
"speed": {
|
|
201
|
+
"type": "number"
|
|
202
|
+
},
|
|
203
|
+
"comments": {
|
|
204
|
+
"type": "string"
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"offsets": {
|
|
210
|
+
"anyOf": [
|
|
211
|
+
{
|
|
212
|
+
"type": "object",
|
|
213
|
+
"maxProperties": 0
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"$ref": "#/$defs/offsets"
|
|
217
|
+
}
|
|
218
|
+
]
|
|
219
|
+
},
|
|
220
|
+
"datums": {
|
|
221
|
+
"type": "object",
|
|
222
|
+
"patternProperties": {
|
|
223
|
+
"^[A-Z0-9_]+$": {
|
|
224
|
+
"type": "number"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"additionalProperties": false
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"allOf": [
|
|
231
|
+
{
|
|
232
|
+
"if": {
|
|
233
|
+
"properties": {
|
|
234
|
+
"type": {
|
|
235
|
+
"const": "subordinate"
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"then": {
|
|
240
|
+
"properties": {
|
|
241
|
+
"harmonic_constituents": {
|
|
242
|
+
"maxItems": 0
|
|
243
|
+
},
|
|
244
|
+
"offsets": {
|
|
245
|
+
"$ref": "#/$defs/offsets"
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
]
|
|
251
|
+
}
|