@maschinenlesbar.org/regionalatlas-cli 0.0.1

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 (73) hide show
  1. package/CONTRIBUTING.md +25 -0
  2. package/LICENSE +661 -0
  3. package/LICENSING.md +47 -0
  4. package/README.md +85 -0
  5. package/dist/src/cli/commands/regions.d.ts +4 -0
  6. package/dist/src/cli/commands/regions.d.ts.map +1 -0
  7. package/dist/src/cli/commands/regions.js +66 -0
  8. package/dist/src/cli/commands/regions.js.map +1 -0
  9. package/dist/src/cli/index.d.ts +3 -0
  10. package/dist/src/cli/index.d.ts.map +1 -0
  11. package/dist/src/cli/index.js +11 -0
  12. package/dist/src/cli/index.js.map +1 -0
  13. package/dist/src/cli/io.d.ts +12 -0
  14. package/dist/src/cli/io.d.ts.map +1 -0
  15. package/dist/src/cli/io.js +7 -0
  16. package/dist/src/cli/io.js.map +1 -0
  17. package/dist/src/cli/program.d.ts +7 -0
  18. package/dist/src/cli/program.d.ts.map +1 -0
  19. package/dist/src/cli/program.js +54 -0
  20. package/dist/src/cli/program.js.map +1 -0
  21. package/dist/src/cli/run.d.ts +3 -0
  22. package/dist/src/cli/run.d.ts.map +1 -0
  23. package/dist/src/cli/run.js +85 -0
  24. package/dist/src/cli/run.js.map +1 -0
  25. package/dist/src/cli/shared.d.ts +73 -0
  26. package/dist/src/cli/shared.d.ts.map +1 -0
  27. package/dist/src/cli/shared.js +154 -0
  28. package/dist/src/cli/shared.js.map +1 -0
  29. package/dist/src/client/catalog.d.ts +32 -0
  30. package/dist/src/client/catalog.d.ts.map +1 -0
  31. package/dist/src/client/catalog.js +127 -0
  32. package/dist/src/client/catalog.js.map +1 -0
  33. package/dist/src/client/client.d.ts +56 -0
  34. package/dist/src/client/client.d.ts.map +1 -0
  35. package/dist/src/client/client.js +195 -0
  36. package/dist/src/client/client.js.map +1 -0
  37. package/dist/src/client/engine.d.ts +77 -0
  38. package/dist/src/client/engine.d.ts.map +1 -0
  39. package/dist/src/client/engine.js +167 -0
  40. package/dist/src/client/engine.js.map +1 -0
  41. package/dist/src/client/errors.d.ts +51 -0
  42. package/dist/src/client/errors.d.ts.map +1 -0
  43. package/dist/src/client/errors.js +63 -0
  44. package/dist/src/client/errors.js.map +1 -0
  45. package/dist/src/client/http.d.ts +26 -0
  46. package/dist/src/client/http.d.ts.map +1 -0
  47. package/dist/src/client/http.js +80 -0
  48. package/dist/src/client/http.js.map +1 -0
  49. package/dist/src/client/index.d.ts +15 -0
  50. package/dist/src/client/index.d.ts.map +1 -0
  51. package/dist/src/client/index.js +11 -0
  52. package/dist/src/client/index.js.map +1 -0
  53. package/dist/src/client/levels.d.ts +16 -0
  54. package/dist/src/client/levels.d.ts.map +1 -0
  55. package/dist/src/client/levels.js +59 -0
  56. package/dist/src/client/levels.js.map +1 -0
  57. package/dist/src/client/query.d.ts +9 -0
  58. package/dist/src/client/query.d.ts.map +1 -0
  59. package/dist/src/client/query.js +33 -0
  60. package/dist/src/client/query.js.map +1 -0
  61. package/dist/src/client/sql.d.ts +12 -0
  62. package/dist/src/client/sql.d.ts.map +1 -0
  63. package/dist/src/client/sql.js +64 -0
  64. package/dist/src/client/sql.js.map +1 -0
  65. package/dist/src/client/types.d.ts +137 -0
  66. package/dist/src/client/types.d.ts.map +1 -0
  67. package/dist/src/client/types.js +5 -0
  68. package/dist/src/client/types.js.map +1 -0
  69. package/dist/src/index.d.ts +2 -0
  70. package/dist/src/index.d.ts.map +1 -0
  71. package/dist/src/index.js +3 -0
  72. package/dist/src/index.js.map +1 -0
  73. package/package.json +71 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/client/query.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;AACjF,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,cAAc,EAAE,CAAC;AAC3D,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAQrD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAe5D"}
@@ -0,0 +1,33 @@
1
+ // Tiny, dependency-free query-string builder.
2
+ // - `undefined` / `null` values are omitted entirely
3
+ // - arrays are serialised as repeated keys (`?id=a&id=b`)
4
+ // - booleans become the strings "true"/"false"
5
+ // - Date values become full ISO-8601 strings
6
+ // - everything else is coerced with String()
7
+ function serializeScalar(value) {
8
+ if (value instanceof Date)
9
+ return value.toISOString();
10
+ if (typeof value === "boolean")
11
+ return value ? "true" : "false";
12
+ return String(value);
13
+ }
14
+ /**
15
+ * Build a query string (without a leading `?`) from a params object.
16
+ * Returns an empty string when no parameters survive filtering.
17
+ */
18
+ export function buildQueryString(params) {
19
+ const search = new URLSearchParams();
20
+ for (const [key, raw] of Object.entries(params)) {
21
+ if (raw === undefined || raw === null)
22
+ continue;
23
+ const values = Array.isArray(raw) ? raw : [raw];
24
+ for (const value of values) {
25
+ if (value === undefined || value === null)
26
+ continue;
27
+ search.append(key, serializeScalar(value));
28
+ }
29
+ }
30
+ // URLSearchParams encodes spaces as "+"; "%20" is more broadly interoperable.
31
+ return search.toString().replace(/\+/g, "%20");
32
+ }
33
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/client/query.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uDAAuD;AACvD,4DAA4D;AAC5D,iDAAiD;AACjD,+CAA+C;AAC/C,+CAA+C;AAM/C,SAAS,eAAe,CAAC,KAAgD;IACvE,IAAI,KAAK,YAAY,IAAI;QAAE,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;IACtD,IAAI,OAAO,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;IAChE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAmB;IAClD,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;IAErC,KAAK,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAChD,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI;YAAE,SAAS;QAEhD,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QAChD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;gBAAE,SAAS;YACpD,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;IAED,8EAA8E;IAC9E,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACjD,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Build the raw SQL SELECT that joins the administrative-boundary table to the
3
+ * indicator table. Only the pre-validated `table`, `typ` and `year` are interpolated.
4
+ */
5
+ export declare function buildSql(table: string, typ: number, year: number): string;
6
+ /**
7
+ * Build the ArcGIS `layer` parameter (a JSON object) that wraps the SQL query as a
8
+ * `queryTable` data source. Returned as an object; the caller JSON-stringifies it
9
+ * for the `layer=` query param.
10
+ */
11
+ export declare function buildLayerParam(table: string, typ: number, year: number): unknown;
12
+ //# sourceMappingURL=sql.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sql.d.ts","sourceRoot":"","sources":["../../../src/client/sql.ts"],"names":[],"mappings":"AAoCA;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CASzE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAejF"}
@@ -0,0 +1,64 @@
1
+ // Builds the ArcGIS `dynamicLayer` JSON that embeds the raw SQL join for a data
2
+ // query. This is the security-critical file: the SQL is assembled here, and every
3
+ // value it interpolates MUST already be validated:
4
+ // - `table` is the `Indicator.table` of a catalogue-matched entry (allowlist),
5
+ // - `typ` is one of the fixed integers 1/2/3/5 (from levels.ts),
6
+ // - `year` is a validated integer present in the indicator's catalogue years.
7
+ // No raw user text (region filter, field names) ever reaches this file — those are
8
+ // applied client-side.
9
+ /**
10
+ * Extra defence-in-depth: assert the pieces are exactly the shape we expect right
11
+ * before they enter the SQL string. These should never fire when called through the
12
+ * client (the catalogue + levels layers already guarantee them), but a hard assert
13
+ * here means a future refactor cannot accidentally route unvalidated text into SQL.
14
+ */
15
+ function assertSafeTable(table) {
16
+ // A catalogue table name is lowercase letters, digits and underscores only.
17
+ if (!/^[a-z0-9_]+$/.test(table)) {
18
+ throw new Error(`Refusing to build SQL: table "${table}" is not a valid catalogue table name.`);
19
+ }
20
+ }
21
+ function assertSafeTyp(typ) {
22
+ if (typ !== 1 && typ !== 2 && typ !== 3 && typ !== 5) {
23
+ throw new Error(`Refusing to build SQL: typ ${typ} is not an allowed geo level.`);
24
+ }
25
+ }
26
+ function assertSafeYear(year) {
27
+ if (!Number.isInteger(year) || year < 1000 || year > 9999) {
28
+ throw new Error(`Refusing to build SQL: year ${year} is not a 4-digit integer.`);
29
+ }
30
+ }
31
+ /**
32
+ * Build the raw SQL SELECT that joins the administrative-boundary table to the
33
+ * indicator table. Only the pre-validated `table`, `typ` and `year` are interpolated.
34
+ */
35
+ export function buildSql(table, typ, year) {
36
+ assertSafeTable(table);
37
+ assertSafeTyp(typ);
38
+ assertSafeYear(year);
39
+ return (`SELECT * FROM verwaltungsgrenzen_gesamt ` +
40
+ `LEFT OUTER JOIN ${table} ON ags = ags2 and jahr = jahr2 ` +
41
+ `WHERE typ = ${typ} AND jahr = ${year} AND (jahr2 = ${year} OR jahr2 IS NULL)`);
42
+ }
43
+ /**
44
+ * Build the ArcGIS `layer` parameter (a JSON object) that wraps the SQL query as a
45
+ * `queryTable` data source. Returned as an object; the caller JSON-stringifies it
46
+ * for the `layer=` query param.
47
+ */
48
+ export function buildLayerParam(table, typ, year) {
49
+ const query = buildSql(table, typ, year);
50
+ return {
51
+ source: {
52
+ type: "dataLayer",
53
+ dataSource: {
54
+ type: "queryTable",
55
+ geometryType: "esriGeometryPolygon",
56
+ workspaceId: "gdb",
57
+ oidFields: "id",
58
+ spatialReference: { wkid: 25832 },
59
+ query,
60
+ },
61
+ },
62
+ };
63
+ }
64
+ //# sourceMappingURL=sql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sql.js","sourceRoot":"","sources":["../../../src/client/sql.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,kFAAkF;AAClF,mDAAmD;AACnD,iFAAiF;AACjF,mEAAmE;AACnE,gFAAgF;AAChF,mFAAmF;AACnF,uBAAuB;AAIvB;;;;;GAKG;AACH,SAAS,eAAe,CAAC,KAAa;IACpC,4EAA4E;IAC5E,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,KAAK,wCAAwC,CAAC,CAAC;IAClG,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,GAAW;IAChC,IAAI,GAAG,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC;QACrD,MAAM,IAAI,KAAK,CAAC,8BAA8B,GAAG,+BAA+B,CAAC,CAAC;IACpF,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CAAC,IAAY;IAClC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,IAAI,EAAE,CAAC;QAC1D,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,4BAA4B,CAAC,CAAC;IACnF,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAa,EAAE,GAAW,EAAE,IAAY;IAC/D,eAAe,CAAC,KAAK,CAAC,CAAC;IACvB,aAAa,CAAC,GAAG,CAAC,CAAC;IACnB,cAAc,CAAC,IAAI,CAAC,CAAC;IACrB,OAAO,CACL,0CAA0C;QAC1C,mBAAmB,KAAK,kCAAkC;QAC1D,eAAe,GAAG,eAAe,IAAI,iBAAiB,IAAI,oBAAoB,CAC/E,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,KAAa,EAAE,GAAW,EAAE,IAAY;IACtE,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IACzC,OAAO;QACL,MAAM,EAAE;YACN,IAAI,EAAE,WAAW;YACjB,UAAU,EAAE;gBACV,IAAI,EAAE,YAAY;gBAClB,YAAY,EAAE,qBAAqB;gBACnC,WAAW,EAAE,KAAK;gBAClB,SAAS,EAAE,IAAI;gBACf,gBAAgB,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;gBACjC,KAAK;aACN;SACF;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,137 @@
1
+ /**
2
+ * The Regionalatlas geographic level, called `typ` in the data. Only these four
3
+ * integers are ever interpolated into the SQL query — the CLI maps friendly names
4
+ * onto them and rejects anything else. (`typ = 4` is not published.)
5
+ */
6
+ export type GeoLevel = 1 | 2 | 3 | 5;
7
+ /** A friendly geo-level name and the `typ` it maps to. */
8
+ export interface GeoLevelInfo {
9
+ /** Canonical friendly name (e.g. "land", "kreis"). */
10
+ name: string;
11
+ /** The `typ` integer used in the SQL. */
12
+ typ: GeoLevel;
13
+ /** A short human label (e.g. "Bundesländer"). */
14
+ label: string;
15
+ }
16
+ /**
17
+ * One indicator entry in the raw services.json catalogue. `years` is a map from a
18
+ * 4-digit year string to per-year detail arrays; we only need its keys.
19
+ */
20
+ export interface RawCatalogIndicator {
21
+ code: string;
22
+ title_short?: string;
23
+ title_long?: string;
24
+ timestamp?: string;
25
+ years?: Record<string, unknown>;
26
+ [key: string]: unknown;
27
+ }
28
+ /** One theme (subject area) in the raw services.json catalogue. */
29
+ export interface RawCatalogTheme {
30
+ title: string;
31
+ children?: RawCatalogIndicator[];
32
+ [key: string]: unknown;
33
+ }
34
+ /** The parsed services.json is an array of themes. */
35
+ export type RawCatalog = RawCatalogTheme[];
36
+ /** A subject area (Themenbereich) with its indicator count. */
37
+ export interface Theme {
38
+ /** Theme title, e.g. "Bevölkerung". */
39
+ title: string;
40
+ /** Number of indicators under this theme. */
41
+ indicatorCount: number;
42
+ }
43
+ /**
44
+ * A single indicator (Indikator), flattened out of the catalogue with a resolved
45
+ * SQL `table` name and its available years. The `table` is derived solely from the
46
+ * catalogue `code` and is the ONLY value ever interpolated as a table name into the
47
+ * SQL query.
48
+ */
49
+ export interface Indicator {
50
+ /** Catalogue code, e.g. "AI002-1-5". */
51
+ code: string;
52
+ /** The SQL table name derived from the code (`code.toLowerCase().replace(/-/g,"_")`). */
53
+ table: string;
54
+ /** The theme (subject area) this indicator belongs to. */
55
+ theme: string;
56
+ /** Short title. */
57
+ titleShort: string;
58
+ /** Long, descriptive title. */
59
+ titleLong: string;
60
+ /** Available years, ascending, as 4-digit strings (e.g. ["2000","2005",…]). */
61
+ years: string[];
62
+ }
63
+ /** ArcGIS field metadata (from the query response). */
64
+ export interface FieldInfo {
65
+ name: string;
66
+ type?: string;
67
+ alias?: string;
68
+ length?: number;
69
+ [key: string]: unknown;
70
+ }
71
+ /** The raw attributes of one ArcGIS feature returned by the data query. */
72
+ export interface RawFeatureAttributes {
73
+ id?: number;
74
+ typ?: number;
75
+ ags?: string;
76
+ jahr?: number;
77
+ gen?: string;
78
+ jahr2?: number | null;
79
+ ags2?: string | null;
80
+ gen2?: string | null;
81
+ /** The indicator value fields (e.g. `ai0201`) plus their `<field>v` flag variants. */
82
+ [key: string]: unknown;
83
+ }
84
+ /** An ArcGIS feature (data query returns `returnGeometry=false`, so attributes only). */
85
+ export interface RawFeature {
86
+ attributes: RawFeatureAttributes;
87
+ }
88
+ /**
89
+ * The raw ArcGIS `/query` response envelope. On a logical failure the server still
90
+ * answers HTTP 200 but sets `error` (checked by the client).
91
+ */
92
+ export interface ArcGisQueryResponse {
93
+ features?: RawFeature[];
94
+ fields?: FieldInfo[];
95
+ exceededTransferLimit?: boolean;
96
+ objectIdFieldName?: string;
97
+ geometryType?: string;
98
+ error?: {
99
+ code?: number;
100
+ message?: string;
101
+ details?: string[];
102
+ };
103
+ [key: string]: unknown;
104
+ }
105
+ /**
106
+ * One parsed region row: the geographic unit plus its indicator values. The value
107
+ * map keeps only the indicator value fields (the `<field>v` precision flags are
108
+ * dropped from the parsed row — see the client), with numbers or `null`.
109
+ */
110
+ export interface RegionRow {
111
+ /** Amtlicher Gemeindeschlüssel (AGS). */
112
+ ags: string;
113
+ /** Gebietsname (region name), trimmed. */
114
+ name: string;
115
+ /** The `typ` integer (geo level). */
116
+ typ: GeoLevel;
117
+ /** The friendly geo-level name (e.g. "land"). */
118
+ level: string;
119
+ /** The reporting year. */
120
+ year: number;
121
+ /** Indicator value fields → number or null. */
122
+ values: Record<string, number | null>;
123
+ }
124
+ /** Options for a data query. */
125
+ export interface QueryOptions {
126
+ /** Indicator code (`AI002-1-5`) or table form (`ai002_1_5`); resolved against the catalogue. */
127
+ indicator: string;
128
+ /** Geo level: a friendly name (`land`, `kreis`, …) resolved to a `typ`. */
129
+ level: string;
130
+ /** Year; defaults to the indicator's latest available year. */
131
+ year?: number;
132
+ /** Client-side region filter: an AGS (numeric) or a substring of the name. */
133
+ region?: string;
134
+ /** Client-side field projection: keep only these value fields. */
135
+ fields?: string[];
136
+ }
137
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/client/types.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,5 @@
1
+ // Types for the Regionalatlas Deutschland: the indicator catalogue (from the
2
+ // statistikportal.de services.json) and the ArcGIS dynamicLayer data query
3
+ // (from the gis-idmz.nrw.de MapServer).
4
+ export {};
5
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/client/types.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,2EAA2E;AAC3E,wCAAwC"}
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ // Library root. Import from here when using regionalatlas-cli as a dependency.
2
+ export * from "./client/index.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,cAAc,mBAAmB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "@maschinenlesbar.org/regionalatlas-cli",
3
+ "version": "0.0.1",
4
+ "description": "TypeScript API client and CLI for the Regionalatlas Deutschland — regional statistics indicators of the Statistische Ämter des Bundes und der Länder, per Bundesland / Kreis / Gemeinde",
5
+ "type": "module",
6
+ "bin": {
7
+ "regionalatlas": "dist/src/cli/index.js"
8
+ },
9
+ "main": "dist/src/index.js",
10
+ "types": "dist/src/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/src/index.d.ts",
14
+ "import": "./dist/src/index.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist/src",
19
+ "LICENSING.md",
20
+ "CONTRIBUTING.md"
21
+ ],
22
+ "engines": {
23
+ "node": ">=20"
24
+ },
25
+ "scripts": {
26
+ "clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
27
+ "build": "tsc -p tsconfig.json",
28
+ "prepack": "npm run build",
29
+ "typecheck": "tsc -p tsconfig.json --noEmit",
30
+ "pretest": "npm run build",
31
+ "test": "node --test dist/test/*.test.js",
32
+ "docs": "typedoc src/index.ts --out out",
33
+ "start": "node dist/src/cli/index.js"
34
+ },
35
+ "keywords": [
36
+ "regionalatlas",
37
+ "regionaldatenbank",
38
+ "regionalstatistik",
39
+ "statistische-aemter",
40
+ "destatis",
41
+ "indikatoren",
42
+ "bundesland",
43
+ "kreise",
44
+ "gemeinden",
45
+ "arcgis",
46
+ "germany",
47
+ "cli",
48
+ "api-client"
49
+ ],
50
+ "author": "Sebastian Schürmann <sebs@2xs.org>",
51
+ "license": "AGPL-3.0-or-later",
52
+ "repository": {
53
+ "type": "git",
54
+ "url": "git+https://github.com/maschinenlesbar-org/regionalatlas-cli.git"
55
+ },
56
+ "bugs": {
57
+ "url": "https://github.com/maschinenlesbar-org/regionalatlas-cli/issues"
58
+ },
59
+ "homepage": "https://github.com/maschinenlesbar-org/regionalatlas-cli#readme",
60
+ "publishConfig": {
61
+ "access": "public"
62
+ },
63
+ "dependencies": {
64
+ "commander": "15.0.0"
65
+ },
66
+ "devDependencies": {
67
+ "@types/node": "^22.19.19",
68
+ "typedoc": "0.28.19",
69
+ "typescript": "6.0.3"
70
+ }
71
+ }