@hebcal/geo-sqlite 4.1.0 → 4.2.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.
- package/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/geo-sqlite v4.
|
|
1
|
+
/*! @hebcal/geo-sqlite v4.2.0 */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -222,6 +222,7 @@ class GeoDb {
|
|
|
222
222
|
const cityDescr = `${result.CityMixedCase}, ${result.State} ${zip}`;
|
|
223
223
|
const location = new core.Location(result.Latitude, result.Longitude, false, tzid, cityDescr, 'US', zip);
|
|
224
224
|
location.admin1 = location.state = result.State;
|
|
225
|
+
location.stateName = stateNames[location.state];
|
|
225
226
|
location.geo = 'zip';
|
|
226
227
|
location.zip = zip;
|
|
227
228
|
return location;
|
|
@@ -623,7 +624,7 @@ async function buildGeonamesSqlite(opts) {
|
|
|
623
624
|
AND alt.isolanguage = 'en'
|
|
624
625
|
AND g.geonameid = alt.geonameid
|
|
625
626
|
AND g.country||'.'||g.admin1 = a1.key
|
|
626
|
-
|
|
627
|
+
`, 'VACUUM');
|
|
627
628
|
db.close();
|
|
628
629
|
return Promise.resolve(true);
|
|
629
630
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/geo-sqlite v4.
|
|
1
|
+
/*! @hebcal/geo-sqlite v4.2.0 */
|
|
2
2
|
import Database from 'better-sqlite3';
|
|
3
3
|
import { Location, Locale } from '@hebcal/core';
|
|
4
4
|
import '@hebcal/cities';
|
|
@@ -210,6 +210,7 @@ class GeoDb {
|
|
|
210
210
|
const cityDescr = `${result.CityMixedCase}, ${result.State} ${zip}`;
|
|
211
211
|
const location = new Location(result.Latitude, result.Longitude, false, tzid, cityDescr, 'US', zip);
|
|
212
212
|
location.admin1 = location.state = result.State;
|
|
213
|
+
location.stateName = stateNames[location.state];
|
|
213
214
|
location.geo = 'zip';
|
|
214
215
|
location.zip = zip;
|
|
215
216
|
return location;
|
|
@@ -611,7 +612,7 @@ async function buildGeonamesSqlite(opts) {
|
|
|
611
612
|
AND alt.isolanguage = 'en'
|
|
612
613
|
AND g.geonameid = alt.geonameid
|
|
613
614
|
AND g.country||'.'||g.admin1 = a1.key
|
|
614
|
-
|
|
615
|
+
`, 'VACUUM');
|
|
615
616
|
db.close();
|
|
616
617
|
return Promise.resolve(true);
|
|
617
618
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebcal/geo-sqlite",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"author": "Michael J. Radwin (https://github.com/mjradwin)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hebcal"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"geo-sqlite.d.ts"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@hebcal/cities": "^3.1.
|
|
31
|
+
"@hebcal/cities": "^3.1.2",
|
|
32
32
|
"@hebcal/core": "^3.33.3",
|
|
33
33
|
"better-sqlite3": "^7.5.0",
|
|
34
34
|
"pino": "^7.8.0",
|