@ham2k/lib-cqmag-data 0.0.1 → 0.0.2
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/package.json +8 -1
- package/scripts/generate.js +3 -3
- package/src/lib/preprocessing.js +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ham2k/lib-cqmag-data",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"type": "commonjs",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": "./src/index.js"
|
|
7
|
+
},
|
|
8
|
+
"devDependencies": {
|
|
9
|
+
"@ham2k/lib-country-files": "^0.0.1",
|
|
10
|
+
"@ham2k/lib-dxcc-data": "^0.0.1"
|
|
11
|
+
},
|
|
5
12
|
"scripts": {
|
|
6
13
|
"generate": "node ./scripts/generate.js"
|
|
7
14
|
}
|
package/scripts/generate.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const fs = require("fs")
|
|
2
2
|
const path = require("path")
|
|
3
3
|
const { preprocessCQWWData } = require("../src/lib/preprocessing")
|
|
4
|
-
const
|
|
4
|
+
const { ENTITIES } = require("@ham2k/lib-dxcc-data")
|
|
5
5
|
|
|
6
|
-
console.log("Generating
|
|
6
|
+
console.log("Generating CQWW json")
|
|
7
7
|
|
|
8
|
-
const cqww = preprocessCQWWData(
|
|
8
|
+
const cqww = preprocessCQWWData(ENTITIES)
|
|
9
9
|
|
|
10
10
|
fs.writeFileSync(path.join(__dirname, "../src/data/cqwwByPrefix.json"), JSON.stringify(cqww), "utf8")
|
|
11
11
|
fs.writeFileSync(path.join(__dirname, "../src/data/cqww.json"), JSON.stringify(Object.values(cqww)), "utf8")
|
package/src/lib/preprocessing.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// const { parse } = require("csv/dist/cjs/sync.cjs") // Use this line when running tests
|
|
2
2
|
|
|
3
|
-
const CTYData = require("
|
|
3
|
+
const { CTYData } = require("@ham2k/lib-country-files/builtinData")
|
|
4
4
|
const WAE = require("../../data/wae.json")
|
|
5
5
|
|
|
6
6
|
function preprocessCQWWData(dxcc) {
|