@treeviz/gedcom-parser 1.0.1 → 1.0.3

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 (90) hide show
  1. package/README.md +176 -0
  2. package/bin/gedcom-parser.js +3 -0
  3. package/dist/classes/common.js +7 -7
  4. package/dist/classes/date.js +4 -4
  5. package/dist/classes/fam.js +3 -3
  6. package/dist/classes/fams.js +3 -3
  7. package/dist/classes/gedcom.d.ts +29 -0
  8. package/dist/classes/gedcom.d.ts.map +1 -1
  9. package/dist/classes/gedcom.js +180 -4
  10. package/dist/classes/index.js +18 -18
  11. package/dist/classes/indi.js +13 -13
  12. package/dist/classes/indis.d.ts.map +1 -1
  13. package/dist/classes/indis.js +42 -24
  14. package/dist/classes/list.js +6 -6
  15. package/dist/classes/name.js +2 -2
  16. package/dist/classes/note.js +2 -2
  17. package/dist/classes/obje.js +1 -1
  18. package/dist/classes/objes.js +1 -1
  19. package/dist/classes/repo.js +1 -1
  20. package/dist/classes/repos.js +1 -1
  21. package/dist/classes/sour.js +1 -1
  22. package/dist/classes/sours.js +1 -1
  23. package/dist/classes/subm.js +1 -1
  24. package/dist/classes/subms.js +1 -1
  25. package/dist/cli/commands/convert.d.ts +3 -0
  26. package/dist/cli/commands/convert.d.ts.map +1 -0
  27. package/dist/cli/commands/convert.js +83 -0
  28. package/dist/cli/commands/extract.d.ts +3 -0
  29. package/dist/cli/commands/extract.d.ts.map +1 -0
  30. package/dist/cli/commands/extract.js +85 -0
  31. package/dist/cli/commands/find.d.ts +3 -0
  32. package/dist/cli/commands/find.d.ts.map +1 -0
  33. package/dist/cli/commands/find.js +97 -0
  34. package/dist/cli/commands/info.d.ts +3 -0
  35. package/dist/cli/commands/info.d.ts.map +1 -0
  36. package/dist/cli/commands/info.js +80 -0
  37. package/dist/cli/commands/merge.d.ts +3 -0
  38. package/dist/cli/commands/merge.d.ts.map +1 -0
  39. package/dist/cli/commands/merge.js +93 -0
  40. package/dist/cli/commands/relatives.d.ts +3 -0
  41. package/dist/cli/commands/relatives.d.ts.map +1 -0
  42. package/dist/cli/commands/relatives.js +107 -0
  43. package/dist/cli/commands/show.d.ts +3 -0
  44. package/dist/cli/commands/show.d.ts.map +1 -0
  45. package/dist/cli/commands/show.js +176 -0
  46. package/dist/cli/commands/stats.d.ts +3 -0
  47. package/dist/cli/commands/stats.d.ts.map +1 -0
  48. package/dist/cli/commands/stats.js +59 -0
  49. package/dist/cli/commands/validate.d.ts +3 -0
  50. package/dist/cli/commands/validate.d.ts.map +1 -0
  51. package/dist/cli/commands/validate.js +148 -0
  52. package/dist/cli/index.d.ts +3 -0
  53. package/dist/cli/index.d.ts.map +1 -0
  54. package/dist/cli/index.js +40 -0
  55. package/dist/cli/utils/formatters.d.ts +69 -0
  56. package/dist/cli/utils/formatters.d.ts.map +1 -0
  57. package/dist/cli/utils/formatters.js +125 -0
  58. package/dist/cli/utils/helpers.d.ts +21 -0
  59. package/dist/cli/utils/helpers.d.ts.map +1 -0
  60. package/dist/cli/utils/helpers.js +58 -0
  61. package/dist/constants/filters.js +1 -1
  62. package/dist/constants/index.js +3 -3
  63. package/dist/constants/orders.js +2 -2
  64. package/dist/factories/cache-factory.js +1 -1
  65. package/dist/factories/date-locale-factory.js +1 -1
  66. package/dist/factories/i18n-factory.js +1 -1
  67. package/dist/factories/index.js +4 -4
  68. package/dist/factories/kinship-factory.js +2 -2
  69. package/dist/factories/place-parser-provider.js +1 -1
  70. package/dist/factories/place-translator-provider.js +1 -1
  71. package/dist/index.js +37 -37
  72. package/dist/kinship-translator/index.js +9 -9
  73. package/dist/kinship-translator/kinship-translator.de.js +3 -3
  74. package/dist/kinship-translator/kinship-translator.en.js +4 -4
  75. package/dist/kinship-translator/kinship-translator.es.js +4 -4
  76. package/dist/kinship-translator/kinship-translator.fr.js +4 -4
  77. package/dist/kinship-translator/kinship-translator.hu.js +4 -4
  78. package/dist/kinship-translator/kinship-translator.js +1 -1
  79. package/dist/kinship-translator/translators.js +5 -5
  80. package/dist/types/index.js +3 -3
  81. package/dist/utils/cache.js +2 -2
  82. package/dist/utils/common-creator.js +11 -11
  83. package/dist/utils/date-formatter.js +3 -3
  84. package/dist/utils/get-places.js +1 -1
  85. package/dist/utils/get-product-details.js +1 -1
  86. package/dist/utils/index.js +16 -16
  87. package/dist/utils/name-formatter.js +2 -2
  88. package/dist/utils/nested-group.js +3 -3
  89. package/dist/utils/parser.js +14 -14
  90. package/package.json +13 -4
@@ -1,17 +1,17 @@
1
- import { Common, getListTag, isId } from "../classes/common";
2
- import { Families } from "../classes/fams";
3
- import { createGedCom } from "../classes/gedcom";
4
- import { Indi } from "../classes/indi";
5
- import { Individuals } from "../classes/indis";
6
- import { List } from "../classes/list";
7
- import { Objects } from "../classes/objes";
8
- import { Repositories } from "../classes/repos";
9
- import { Sources } from "../classes/sours";
10
- import { Submitters } from "../classes/subms";
11
- import { LINE_REG, MAX_FILE_SIZE_TO_SYNC, REF_LINE_REG, } from "../constants/constants";
12
- import { create } from "./common-creator";
13
- import { isDevelopment } from "./get-product-details";
14
- import { getRawSize } from "./get-raw-size";
1
+ import { Common, getListTag, isId } from "../classes/common.js";
2
+ import { Families } from "../classes/fams.js";
3
+ import { createGedCom } from "../classes/gedcom.js";
4
+ import { Indi } from "../classes/indi.js";
5
+ import { Individuals } from "../classes/indis.js";
6
+ import { List } from "../classes/list.js";
7
+ import { Objects } from "../classes/objes.js";
8
+ import { Repositories } from "../classes/repos.js";
9
+ import { Sources } from "../classes/sours.js";
10
+ import { Submitters } from "../classes/subms.js";
11
+ import { LINE_REG, MAX_FILE_SIZE_TO_SYNC, REF_LINE_REG, } from "../constants/constants.js";
12
+ import { create } from "./common-creator.js";
13
+ import { isDevelopment } from "./get-product-details.js";
14
+ import { getRawSize } from "./get-raw-size.js";
15
15
  const isDev = isDevelopment();
16
16
  // let lastTime: number | undefined;
17
17
  // interface Props {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treeviz/gedcom-parser",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Lightweight, pluggable GEDCOM parser for JavaScript/TypeScript with optional caching and place matching. Zero browser dependencies.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -91,13 +91,17 @@
91
91
  "import": "./src/__tests__/test-utils/index.ts"
92
92
  }
93
93
  },
94
+ "bin": {
95
+ "gedcom-parser": "./bin/gedcom-parser.js"
96
+ },
94
97
  "files": [
95
98
  "dist",
99
+ "bin",
96
100
  "README.md",
97
101
  "LICENSE"
98
102
  ],
99
103
  "scripts": {
100
- "build": "tsc -p tsconfig.json",
104
+ "build": "tsc -p tsconfig.json && node scripts/fix-imports.mjs",
101
105
  "dev": "tsc -p tsconfig.json --watch",
102
106
  "test": "vitest run",
103
107
  "test:watch": "vitest",
@@ -130,7 +134,9 @@
130
134
  "place-matching",
131
135
  "ssr",
132
136
  "browser",
133
- "nodejs"
137
+ "nodejs",
138
+ "cli",
139
+ "command-line"
134
140
  ],
135
141
  "author": {
136
142
  "name": "idavidka & @treeviz contributors",
@@ -138,11 +144,14 @@
138
144
  },
139
145
  "license": "MIT",
140
146
  "dependencies": {
147
+ "chalk": "^5.6.2",
148
+ "commander": "^14.0.2",
141
149
  "date-fns": "^2.30.0",
142
- "lodash": "^4.17.21"
150
+ "lodash-es": "^4.17.22"
143
151
  },
144
152
  "devDependencies": {
145
153
  "@types/lodash": "^4.17.13",
154
+ "@types/lodash-es": "^4.17.12",
146
155
  "@types/node": "^20.17.23",
147
156
  "typescript": "^5.6.3",
148
157
  "vitest": "^3.0.7"