text-to-map 1.0.8 → 1.1.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.
@@ -1,9 +1,8 @@
1
1
  import { existsSync, mkdirSync } from "fs";
2
2
  import { tmpdir } from "os";
3
3
  import { dirname, join } from "path";
4
- import { MunicipalityType } from "../db/types";
5
- import { setDbConfig } from "../db/db";
6
4
  import { fileURLToPath } from "url";
5
+ import { MunicipalityType } from "../db/types";
7
6
  const appName = "text-to-map";
8
7
  export const getAppDataDirPath = () => join(process.env.APPDATA ||
9
8
  (process.platform == "darwin"
@@ -40,12 +39,6 @@ export const prepareOptions = (options) => {
40
39
  };
41
40
  return Object.assign(Object.assign({}, defaults), options);
42
41
  };
43
- export const initDb = (options) => {
44
- setDbConfig({
45
- filePath: options.dbFilePath,
46
- initFilePath: options.dbInitFilePath,
47
- });
48
- };
49
42
  const cityPatterns = [
50
43
  /^[sS]tatutární město +(.*)$/,
51
44
  /^[oO]bec +(.*)$/,
package/package.json CHANGED
@@ -7,25 +7,28 @@
7
7
  "chevrotain": "^10.4.2",
8
8
  "csv-parse": "^5.3.3",
9
9
  "czech-address": "^1.0.1",
10
+ "dotenv": "^16.3.1",
10
11
  "feedparser": "^2.2.10",
11
12
  "iconv-lite": "^0.6.3",
13
+ "knex": "^2.4.2",
12
14
  "node-fetch": "^3.3.0",
13
15
  "parsedbf": "^1.1.1",
16
+ "pg": "^8.11.1",
14
17
  "sax": "^1.2.4",
15
18
  "typescript": "^4.9.4"
16
19
  },
17
20
  "devDependencies": {
18
21
  "@chevrotain/types": "^10.5.0",
19
- "@jest/globals": "^29.3.1",
22
+ "@jest/globals": "^29.5.0",
20
23
  "@types/adm-zip": "^0.5.0",
21
24
  "@types/better-sqlite3": "^7.6.3",
22
25
  "@types/feedparser": "^2.2.5",
23
26
  "@types/node": "^18.11.17",
24
27
  "copyfiles": "^2.4.1",
25
- "jest": "^29.3.1",
26
- "npm-run-all": "^4.1.5",
28
+ "jest": "^29.5.0",
29
+ "npm-run-all": "^1.7.0",
27
30
  "rimraf": "^5.0.1",
28
- "ts-jest": "^29.0.3",
31
+ "ts-jest": "^29.1.1",
29
32
  "ts-node": "^10.9.1"
30
33
  },
31
34
  "scripts": {
@@ -37,6 +40,7 @@
37
40
  "diagrams": "ts-node --experimental-specifier-resolution=node --esm src/bin/generate-syntax-diagrams.ts",
38
41
  "clear-all": "ts-node --experimental-specifier-resolution=node --esm src/bin/clear-all.ts",
39
42
  "parse-ordinance": "ts-node --experimental-specifier-resolution=node --esm src/bin/parse-ordinance.ts",
43
+ "knex": "ts-node --experimental-specifier-resolution=node --esm src/bin/knex.ts",
40
44
  "test": "node --experimental-vm-modules --no-warnings node_modules/jest/bin/jest.js -c=jest-esm.config.mjs --no-cache",
41
45
  "ordinance-to-csv-rules": "node src/smd-to-csv/ordinance-to-csv-rules.js",
42
46
  "clean": "rimraf dist",
@@ -48,7 +52,7 @@
48
52
  },
49
53
  "name": "text-to-map",
50
54
  "description": "Text To Map usiluje o lepší, strojově zpracovatelné využití částí vyhlášek s výčtem ulic a dalších lokací. Jde o rozšiřitelnou sadu konceptů a nástrojů, které zajistí hladký převod výčtu ulic a jejich rozsahů v lidsky srozumitelném jazyce do strojově zpracovatelného, uchopitelného formátu.",
51
- "version": "1.0.8",
55
+ "version": "1.1.0",
52
56
  "main": "dist/index.js",
53
57
  "types": "dist/index.d.ts",
54
58
  "files": [