datera 0.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.
Files changed (159) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +132 -0
  3. package/dist/api/clean.d.ts +138 -0
  4. package/dist/api/clean.js +138 -0
  5. package/dist/api/formats.d.ts +19 -0
  6. package/dist/api/formats.js +106 -0
  7. package/dist/api/index.d.ts +8 -0
  8. package/dist/api/index.js +27 -0
  9. package/dist/api/inspect.d.ts +13 -0
  10. package/dist/api/inspect.js +44 -0
  11. package/dist/api/parse.d.ts +2 -0
  12. package/dist/api/parse.js +19 -0
  13. package/dist/api/rows.d.ts +23 -0
  14. package/dist/api/rows.js +63 -0
  15. package/dist/cli.d.ts +62 -0
  16. package/dist/cli.js +225 -0
  17. package/dist/commands.d.ts +3 -0
  18. package/dist/commands.js +169 -0
  19. package/dist/config/check.d.ts +11 -0
  20. package/dist/config/check.js +99 -0
  21. package/dist/config/index.d.ts +7 -0
  22. package/dist/config/index.js +16 -0
  23. package/dist/config/ioSchema.d.ts +97 -0
  24. package/dist/config/ioSchema.js +111 -0
  25. package/dist/config/load.d.ts +5 -0
  26. package/dist/config/load.js +68 -0
  27. package/dist/config/mergeSchema.d.ts +36 -0
  28. package/dist/config/mergeSchema.js +46 -0
  29. package/dist/config/messages.d.ts +7 -0
  30. package/dist/config/messages.js +33 -0
  31. package/dist/config/prepareSchema.d.ts +12 -0
  32. package/dist/config/prepareSchema.js +15 -0
  33. package/dist/config/schema.d.ts +195 -0
  34. package/dist/config/schema.js +44 -0
  35. package/dist/config/validationSchema.d.ts +27 -0
  36. package/dist/config/validationSchema.js +50 -0
  37. package/dist/env.d.ts +2 -0
  38. package/dist/env.js +15 -0
  39. package/dist/filters/combine.d.ts +10 -0
  40. package/dist/filters/combine.js +60 -0
  41. package/dist/filters/combineTypes.d.ts +6 -0
  42. package/dist/filters/combineTypes.js +2 -0
  43. package/dist/filters/dedupe.d.ts +12 -0
  44. package/dist/filters/dedupe.js +45 -0
  45. package/dist/filters/fillEmpty.d.ts +9 -0
  46. package/dist/filters/fillEmpty.js +32 -0
  47. package/dist/filters/fillEmptyTypes.d.ts +5 -0
  48. package/dist/filters/fillEmptyTypes.js +2 -0
  49. package/dist/filters/merge.d.ts +15 -0
  50. package/dist/filters/merge.js +113 -0
  51. package/dist/filters/mergeStrategies.d.ts +10 -0
  52. package/dist/filters/mergeStrategies.js +69 -0
  53. package/dist/filters/mergeTypes.d.ts +32 -0
  54. package/dist/filters/mergeTypes.js +2 -0
  55. package/dist/filters/mergeUnkeyed.d.ts +3 -0
  56. package/dist/filters/mergeUnkeyed.js +21 -0
  57. package/dist/filters/types.d.ts +3 -0
  58. package/dist/filters/types.js +2 -0
  59. package/dist/filters/validate.d.ts +16 -0
  60. package/dist/filters/validate.js +79 -0
  61. package/dist/filters/validateTypes.d.ts +28 -0
  62. package/dist/filters/validateTypes.js +2 -0
  63. package/dist/index.d.ts +13 -0
  64. package/dist/index.js +40 -0
  65. package/dist/io/csv/csvFormat.d.ts +4 -0
  66. package/dist/io/csv/csvFormat.js +94 -0
  67. package/dist/io/csv/csvSink.d.ts +14 -0
  68. package/dist/io/csv/csvSink.js +32 -0
  69. package/dist/io/csv/csvSource.d.ts +13 -0
  70. package/dist/io/csv/csvSource.js +29 -0
  71. package/dist/io/custom/loader.d.ts +1 -0
  72. package/dist/io/custom/loader.js +36 -0
  73. package/dist/io/custom/registry.d.ts +13 -0
  74. package/dist/io/custom/registry.js +50 -0
  75. package/dist/io/excel/excelCell.d.ts +4 -0
  76. package/dist/io/excel/excelCell.js +29 -0
  77. package/dist/io/excel/excelSink.d.ts +14 -0
  78. package/dist/io/excel/excelSink.js +57 -0
  79. package/dist/io/excel/excelSource.d.ts +11 -0
  80. package/dist/io/excel/excelSource.js +47 -0
  81. package/dist/io/excel/workbook.d.ts +4 -0
  82. package/dist/io/excel/workbook.js +20 -0
  83. package/dist/io/factory.d.ts +5 -0
  84. package/dist/io/factory.js +106 -0
  85. package/dist/io/files.d.ts +7 -0
  86. package/dist/io/files.js +48 -0
  87. package/dist/io/header.d.ts +2 -0
  88. package/dist/io/header.js +42 -0
  89. package/dist/io/json/jsonSink.d.ts +12 -0
  90. package/dist/io/json/jsonSink.js +19 -0
  91. package/dist/io/json/jsonSource.d.ts +11 -0
  92. package/dist/io/json/jsonSource.js +66 -0
  93. package/dist/io/mysql/client.d.ts +13 -0
  94. package/dist/io/mysql/client.js +73 -0
  95. package/dist/io/mysql/mysqlSource.d.ts +13 -0
  96. package/dist/io/mysql/mysqlSource.js +25 -0
  97. package/dist/io/optional.d.ts +2 -0
  98. package/dist/io/optional.js +36 -0
  99. package/dist/io/parquet/parquetLibrary.d.ts +11 -0
  100. package/dist/io/parquet/parquetLibrary.js +20 -0
  101. package/dist/io/parquet/parquetSink.d.ts +15 -0
  102. package/dist/io/parquet/parquetSink.js +58 -0
  103. package/dist/io/parquet/parquetSource.d.ts +13 -0
  104. package/dist/io/parquet/parquetSource.js +68 -0
  105. package/dist/io/postgres/postgresSource.d.ts +26 -0
  106. package/dist/io/postgres/postgresSource.js +42 -0
  107. package/dist/io/safety.d.ts +4 -0
  108. package/dist/io/safety.js +83 -0
  109. package/dist/io/sheets/client.d.ts +10 -0
  110. package/dist/io/sheets/client.js +141 -0
  111. package/dist/io/sheets/sheetsSink.d.ts +12 -0
  112. package/dist/io/sheets/sheetsSink.js +24 -0
  113. package/dist/io/sheets/sheetsSource.d.ts +10 -0
  114. package/dist/io/sheets/sheetsSource.js +47 -0
  115. package/dist/io/sql/cell.d.ts +5 -0
  116. package/dist/io/sql/cell.js +38 -0
  117. package/dist/io/sql/driver.d.ts +1 -0
  118. package/dist/io/sql/driver.js +15 -0
  119. package/dist/io/sql/names.d.ts +1 -0
  120. package/dist/io/sql/names.js +12 -0
  121. package/dist/io/sqlite/sqliteSource.d.ts +11 -0
  122. package/dist/io/sqlite/sqliteSource.js +52 -0
  123. package/dist/io/sqlserver/sqlServerSource.d.ts +24 -0
  124. package/dist/io/sqlserver/sqlServerSource.js +49 -0
  125. package/dist/io/types.d.ts +11 -0
  126. package/dist/io/types.js +2 -0
  127. package/dist/io/xml/xmlParse.d.ts +9 -0
  128. package/dist/io/xml/xmlParse.js +178 -0
  129. package/dist/io/xml/xmlSink.d.ts +18 -0
  130. package/dist/io/xml/xmlSink.js +79 -0
  131. package/dist/io/xml/xmlSource.d.ts +11 -0
  132. package/dist/io/xml/xmlSource.js +93 -0
  133. package/dist/logger.d.ts +11 -0
  134. package/dist/logger.js +29 -0
  135. package/dist/main.d.ts +2 -0
  136. package/dist/main.js +18 -0
  137. package/dist/normalizers/builtin.d.ts +5 -0
  138. package/dist/normalizers/builtin.js +23 -0
  139. package/dist/normalizers/index.d.ts +2 -0
  140. package/dist/normalizers/index.js +14 -0
  141. package/dist/normalizers/loader.d.ts +1 -0
  142. package/dist/normalizers/loader.js +30 -0
  143. package/dist/normalizers/registry.d.ts +9 -0
  144. package/dist/normalizers/registry.js +29 -0
  145. package/dist/pipeline/index.d.ts +7 -0
  146. package/dist/pipeline/index.js +17 -0
  147. package/dist/pipeline/modes.d.ts +6 -0
  148. package/dist/pipeline/modes.js +48 -0
  149. package/dist/pipeline/report.d.ts +3 -0
  150. package/dist/pipeline/report.js +32 -0
  151. package/dist/pipeline/runEtl.d.ts +24 -0
  152. package/dist/pipeline/runEtl.js +98 -0
  153. package/dist/pipeline/steps.d.ts +4 -0
  154. package/dist/pipeline/steps.js +36 -0
  155. package/dist/pipeline/types.d.ts +34 -0
  156. package/dist/pipeline/types.js +2 -0
  157. package/dist/types.d.ts +3 -0
  158. package/dist/types.js +2 -0
  159. package/package.json +128 -0
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatDuration = exports.formatReport = exports.buildModeStep = exports.parseMode = exports.MODES = exports.buildSteps = exports.DEFAULT_PREVIEW_SIZE = exports.countPendingReasons = exports.applySteps = exports.runEtl = void 0;
4
+ var runEtl_1 = require("./runEtl");
5
+ Object.defineProperty(exports, "runEtl", { enumerable: true, get: function () { return runEtl_1.runEtl; } });
6
+ Object.defineProperty(exports, "applySteps", { enumerable: true, get: function () { return runEtl_1.applySteps; } });
7
+ Object.defineProperty(exports, "countPendingReasons", { enumerable: true, get: function () { return runEtl_1.countPendingReasons; } });
8
+ Object.defineProperty(exports, "DEFAULT_PREVIEW_SIZE", { enumerable: true, get: function () { return runEtl_1.DEFAULT_PREVIEW_SIZE; } });
9
+ var steps_1 = require("./steps");
10
+ Object.defineProperty(exports, "buildSteps", { enumerable: true, get: function () { return steps_1.buildSteps; } });
11
+ var modes_1 = require("./modes");
12
+ Object.defineProperty(exports, "MODES", { enumerable: true, get: function () { return modes_1.MODES; } });
13
+ Object.defineProperty(exports, "parseMode", { enumerable: true, get: function () { return modes_1.parseMode; } });
14
+ Object.defineProperty(exports, "buildModeStep", { enumerable: true, get: function () { return modes_1.buildModeStep; } });
15
+ var report_1 = require("./report");
16
+ Object.defineProperty(exports, "formatReport", { enumerable: true, get: function () { return report_1.formatReport; } });
17
+ Object.defineProperty(exports, "formatDuration", { enumerable: true, get: function () { return report_1.formatDuration; } });
@@ -0,0 +1,6 @@
1
+ import { EtlConfig } from "../config";
2
+ import { Step } from "./types";
3
+ export declare const MODES: readonly ["raw", "dedupe", "merge"];
4
+ export type Mode = (typeof MODES)[number];
5
+ export declare function parseMode(value: string): Mode;
6
+ export declare function buildModeStep(mode: Mode, config: EtlConfig): Step;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MODES = void 0;
4
+ exports.parseMode = parseMode;
5
+ exports.buildModeStep = buildModeStep;
6
+ const dedupe_1 = require("../filters/dedupe");
7
+ const merge_1 = require("../filters/merge");
8
+ const registry_1 = require("../normalizers/registry");
9
+ exports.MODES = ["raw", "dedupe", "merge"];
10
+ function parseMode(value) {
11
+ const mode = exports.MODES.find((known) => known === value);
12
+ if (mode === undefined) {
13
+ throw new Error(`Modo inválido: "${value}". Modos aceitos: ${exports.MODES.join(", ")}.`);
14
+ }
15
+ return mode;
16
+ }
17
+ function buildModeStep(mode, config) {
18
+ switch (mode) {
19
+ case "raw":
20
+ return { name: "raw", run: (rows) => ({ rows }) };
21
+ case "dedupe": {
22
+ if (!config.dedupeColumn) {
23
+ throw new Error("dedupeColumn não definido na config para o modo dedupe.");
24
+ }
25
+ const filter = new dedupe_1.DedupeFilter(config.dedupeColumn, config.dedupeStrategy, config.dedupeKeyNormalizer === undefined
26
+ ? undefined
27
+ : (0, registry_1.getKeyNormalizer)(config.dedupeKeyNormalizer));
28
+ return {
29
+ name: "dedupe",
30
+ run: (rows) => ({ rows: filter.apply(rows) }),
31
+ };
32
+ }
33
+ case "merge": {
34
+ if (!config.mergeKeyColumn || !config.mergeColumns) {
35
+ throw new Error("mergeKeyColumn/mergeColumns não definidos na config para o modo merge.");
36
+ }
37
+ const filter = new merge_1.MergeFilter(config.mergeKeyColumn, config.mergeColumns, {
38
+ emptyKeyLabel: config.mergeEmptyKeyLabel,
39
+ rejectedKeyLabel: config.mergeRejectedKeyLabel,
40
+ keyNormalizer: config.mergeKeyNormalizer,
41
+ });
42
+ return {
43
+ name: "merge",
44
+ run: (rows) => ({ rows: filter.apply(rows) }),
45
+ };
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,3 @@
1
+ import { EtlReport } from "./types";
2
+ export declare function formatDuration(ms: number): string;
3
+ export declare function formatReport(report: EtlReport): string[];
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatDuration = formatDuration;
4
+ exports.formatReport = formatReport;
5
+ function formatDuration(ms) {
6
+ if (ms < 1000)
7
+ return `${Math.round(ms)} ms`;
8
+ return `${(ms / 1000).toFixed(1).replace(".", ",")} s`;
9
+ }
10
+ function plural(count, one, many) {
11
+ return `${count} ${count === 1 ? one : many}`;
12
+ }
13
+ function formatReport(report) {
14
+ const lines = [
15
+ "Resumo da execução",
16
+ ` Modo: ${report.mode}`,
17
+ ` Linhas lidas: ${report.rowsRead}`,
18
+ ];
19
+ for (const step of report.steps) {
20
+ const pending = step.pending > 0
21
+ ? `, ${plural(step.pending, "pendência", "pendências")}`
22
+ : "";
23
+ lines.push(` ${step.name}: de ${step.rowsIn} para ${step.rowsOut}${pending} (${formatDuration(step.durationMs)})`);
24
+ }
25
+ lines.push(` Linhas no resultado: ${report.rowsOut}`);
26
+ lines.push(` Pendências: ${report.pendingRows}`);
27
+ lines.push(` Tempo total: ${formatDuration(report.durationMs)}`);
28
+ if (report.dryRun) {
29
+ lines.push(" Nada foi gravado, porque era só um teste (--dry-run).");
30
+ }
31
+ return lines;
32
+ }
@@ -0,0 +1,24 @@
1
+ import { EtlConfig } from "../config";
2
+ import { Sink, Source } from "../io/types";
3
+ import { Logger } from "../logger";
4
+ import { TableRow } from "../types";
5
+ import { Mode } from "./modes";
6
+ import { EtlReport, PendingReason, Step, StepReport } from "./types";
7
+ export declare const DEFAULT_PREVIEW_SIZE = 5;
8
+ export declare function countPendingReasons(pending: TableRow[], reasonColumn?: string): PendingReason[];
9
+ export interface AppliedSteps {
10
+ rows: TableRow[];
11
+ pending: TableRow[];
12
+ steps: StepReport[];
13
+ }
14
+ export declare function applySteps(steps: Step[], input: TableRow[], onStep?: (report: StepReport) => void): AppliedSteps;
15
+ export interface RunEtlOptions {
16
+ mode?: Mode | undefined;
17
+ dryRun?: boolean | undefined;
18
+ logger?: Logger | undefined;
19
+ source?: Source | undefined;
20
+ sink?: Sink | undefined;
21
+ previewSize?: number | undefined;
22
+ onStep?: ((report: StepReport) => void) | undefined;
23
+ }
24
+ export declare function runEtl(config: EtlConfig, options?: RunEtlOptions): Promise<EtlReport>;
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEFAULT_PREVIEW_SIZE = void 0;
4
+ exports.countPendingReasons = countPendingReasons;
5
+ exports.applySteps = applySteps;
6
+ exports.runEtl = runEtl;
7
+ const factory_1 = require("../io/factory");
8
+ const loader_1 = require("../io/custom/loader");
9
+ const validate_1 = require("../filters/validate");
10
+ const normalizers_1 = require("../normalizers");
11
+ const logger_1 = require("../logger");
12
+ const steps_1 = require("./steps");
13
+ exports.DEFAULT_PREVIEW_SIZE = 5;
14
+ function countPendingReasons(pending, reasonColumn = validate_1.DEFAULT_REASON_COLUMN) {
15
+ const counts = new Map();
16
+ for (const row of pending) {
17
+ const text = row[reasonColumn];
18
+ if (text === null || text === undefined)
19
+ continue;
20
+ for (const part of String(text).split(";")) {
21
+ const reason = part.trim();
22
+ if (reason === "")
23
+ continue;
24
+ counts.set(reason, (counts.get(reason) ?? 0) + 1);
25
+ }
26
+ }
27
+ return Array.from(counts, ([reason, count]) => ({ reason, count })).sort((a, b) => b.count - a.count || a.reason.localeCompare(b.reason));
28
+ }
29
+ function applySteps(steps, input, onStep) {
30
+ let rows = input;
31
+ const pending = [];
32
+ const reports = [];
33
+ for (const step of steps) {
34
+ const startedAt = Date.now();
35
+ const output = step.run(rows);
36
+ const stepPending = output.pending ?? [];
37
+ pending.push(...stepPending);
38
+ const report = {
39
+ name: step.name,
40
+ rowsIn: rows.length,
41
+ rowsOut: output.rows.length,
42
+ pending: stepPending.length,
43
+ durationMs: Date.now() - startedAt,
44
+ };
45
+ reports.push(report);
46
+ onStep?.(report);
47
+ rows = output.rows;
48
+ }
49
+ return { rows, pending, steps: reports };
50
+ }
51
+ async function runEtl(config, options = {}) {
52
+ const startedAt = Date.now();
53
+ const logger = options.logger ?? logger_1.consoleLogger;
54
+ const dryRun = options.dryRun ?? false;
55
+ const mode = options.mode ?? config.mode;
56
+ (0, normalizers_1.registerBuiltinKeyNormalizers)();
57
+ (0, normalizers_1.loadNormalizerModules)(config.normalizerModules ?? []);
58
+ (0, loader_1.loadAdapterModules)(config.adapterModules ?? []);
59
+ const steps = (0, steps_1.buildSteps)(config, mode);
60
+ const sink = options.sink ?? (0, factory_1.createSink)(config, logger);
61
+ const ownsSource = options.source === undefined;
62
+ const source = options.source ?? (0, factory_1.createSource)(config, logger);
63
+ try {
64
+ logger.info(dryRun ? `Modo em uso: ${mode} (só teste)` : `Modo em uso: ${mode}`);
65
+ const rawRows = await source.read();
66
+ logger.info(`${rawRows.length} linhas lidas.`);
67
+ const { rows, pending, steps: stepReports, } = applySteps(steps, rawRows, options.onStep);
68
+ if (!dryRun) {
69
+ await sink.write(rows);
70
+ if (config.validation) {
71
+ await sink.write(pending, {
72
+ name: config.validation.pendingSheet ?? validate_1.DEFAULT_PENDING_SHEET,
73
+ });
74
+ }
75
+ }
76
+ return {
77
+ mode,
78
+ dryRun,
79
+ written: !dryRun,
80
+ rowsRead: rawRows.length,
81
+ rowsOut: rows.length,
82
+ pendingRows: pending.length,
83
+ pendingByReason: countPendingReasons(pending, config.validation?.reasonColumn),
84
+ steps: stepReports,
85
+ durationMs: Date.now() - startedAt,
86
+ preview: dryRun
87
+ ? rows.slice(0, options.previewSize ?? exports.DEFAULT_PREVIEW_SIZE)
88
+ : [],
89
+ pendingPreview: dryRun
90
+ ? pending.slice(0, options.previewSize ?? exports.DEFAULT_PREVIEW_SIZE)
91
+ : [],
92
+ };
93
+ }
94
+ finally {
95
+ if (ownsSource)
96
+ await source.close?.();
97
+ }
98
+ }
@@ -0,0 +1,4 @@
1
+ import { EtlConfig } from "../config";
2
+ import { Mode } from "./modes";
3
+ import { Step } from "./types";
4
+ export declare function buildSteps(config: EtlConfig, mode: Mode): Step[];
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildSteps = buildSteps;
4
+ const fillEmpty_1 = require("../filters/fillEmpty");
5
+ const combine_1 = require("../filters/combine");
6
+ const validate_1 = require("../filters/validate");
7
+ const modes_1 = require("./modes");
8
+ function buildSteps(config, mode) {
9
+ const steps = [];
10
+ if (config.fillEmpty) {
11
+ const filter = new fillEmpty_1.FillEmptyFilter(config.fillEmpty);
12
+ steps.push({
13
+ name: "fillEmpty",
14
+ run: (rows) => ({ rows: filter.apply(rows) }),
15
+ });
16
+ }
17
+ if (config.combineColumns) {
18
+ const filter = new combine_1.CombineFilter(config.combineColumns);
19
+ steps.push({
20
+ name: "combineColumns",
21
+ run: (rows) => ({ rows: filter.apply(rows) }),
22
+ });
23
+ }
24
+ if (config.validation) {
25
+ const validator = new validate_1.RowValidator(config.validation.rules, config.validation.reasonColumn);
26
+ steps.push({
27
+ name: "validation",
28
+ run: (rows) => {
29
+ const { valid, pending } = validator.split(rows);
30
+ return { rows: valid, pending };
31
+ },
32
+ });
33
+ }
34
+ steps.push((0, modes_1.buildModeStep)(mode, config));
35
+ return steps;
36
+ }
@@ -0,0 +1,34 @@
1
+ import { TableRow } from "../types";
2
+ import { Mode } from "./modes";
3
+ export interface StepOutput {
4
+ rows: TableRow[];
5
+ pending?: TableRow[] | undefined;
6
+ }
7
+ export interface Step {
8
+ name: string;
9
+ run(rows: TableRow[]): StepOutput;
10
+ }
11
+ export interface StepReport {
12
+ name: string;
13
+ rowsIn: number;
14
+ rowsOut: number;
15
+ pending: number;
16
+ durationMs: number;
17
+ }
18
+ export interface PendingReason {
19
+ reason: string;
20
+ count: number;
21
+ }
22
+ export interface EtlReport {
23
+ mode: Mode;
24
+ dryRun: boolean;
25
+ written: boolean;
26
+ rowsRead: number;
27
+ rowsOut: number;
28
+ pendingRows: number;
29
+ pendingByReason: PendingReason[];
30
+ steps: StepReport[];
31
+ durationMs: number;
32
+ preview: TableRow[];
33
+ pendingPreview: TableRow[];
34
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export interface TableRow {
2
+ [key: string]: string | number | null;
3
+ }
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json ADDED
@@ -0,0 +1,128 @@
1
+ {
2
+ "name": "datera",
3
+ "version": "0.1.0",
4
+ "description": "Limpa, unifica e organiza dados bagunçados de bancos de dados, planilhas, CSV, JSON, XML e Parquet, e exporta pro Google Sheets, Excel, CSV, JSON, XML ou Parquet.",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "bin": {
8
+ "datera": "dist/main.js"
9
+ },
10
+ "files": [
11
+ "dist"
12
+ ],
13
+ "workspaces": [
14
+ "apps/*"
15
+ ],
16
+ "scripts": {
17
+ "build": "tsc -p tsconfig.build.json",
18
+ "prepublishOnly": "npm run build && npm test",
19
+ "start": "tsx src/main.ts",
20
+ "validate": "tsx src/main.ts validate",
21
+ "example": "tsx src/main.ts --config examples/config.csv.json",
22
+ "example:excel": "tsx src/main.ts --config examples/config.excel.json",
23
+ "example:xml": "tsx src/main.ts --config examples/config.xml.json",
24
+ "desktop": "npm run dev -w apps/desktop",
25
+ "desktop:dev": "npm run dev -w apps/dev",
26
+ "test": "vitest run",
27
+ "test:watch": "vitest",
28
+ "typecheck": "tsc --noEmit",
29
+ "test:connection": "tsx scripts/testConnection.ts",
30
+ "test:config": "tsx scripts/testConfig.ts",
31
+ "test:sheet": "tsx scripts/testSheetFake.ts",
32
+ "prepare": "husky"
33
+ },
34
+ "keywords": [
35
+ "etl",
36
+ "csv",
37
+ "excel",
38
+ "xml",
39
+ "parquet",
40
+ "sqlite",
41
+ "postgres",
42
+ "mysql",
43
+ "dedupe",
44
+ "merge",
45
+ "data-cleaning",
46
+ "google-sheets"
47
+ ],
48
+ "repository": {
49
+ "type": "git",
50
+ "url": "git+https://github.com/alessandravieiradev-blip/datera.git"
51
+ },
52
+ "homepage": "https://github.com/alessandravieiradev-blip/datera#readme",
53
+ "bugs": "https://github.com/alessandravieiradev-blip/datera/issues",
54
+ "engines": {
55
+ "node": ">=22.13"
56
+ },
57
+ "author": "Alessandra Vieira",
58
+ "license": "MIT",
59
+ "type": "commonjs",
60
+ "devDependencies": {
61
+ "@commitlint/cli": "^21.2.3",
62
+ "@commitlint/config-conventional": "^21.2.3",
63
+ "@googleapis/sheets": "^18.0.1",
64
+ "@types/node": "^22.20.3",
65
+ "exceljs": "^4.4.0",
66
+ "husky": "^9.1.7",
67
+ "hyparquet": "^1.31.2",
68
+ "hyparquet-compressors": "^1.1.2",
69
+ "hyparquet-writer": "^0.16.10",
70
+ "lint-staged": "^17.5.1",
71
+ "mssql": "^12.7.2",
72
+ "mysql2": "^3.24.4",
73
+ "pg": "^8.23.0",
74
+ "prettier": "^3.9.9",
75
+ "tsx": "^4.23.13",
76
+ "typescript": "^7.0.2",
77
+ "vitest": "^5.0.1"
78
+ },
79
+ "dependencies": {
80
+ "commander": "^15.0.0",
81
+ "dotenv": "^17.4.2",
82
+ "zod": "^4.6.5"
83
+ },
84
+ "peerDependencies": {
85
+ "@googleapis/sheets": "^18.0.1",
86
+ "exceljs": "^4.4.0",
87
+ "hyparquet": "^1.31.2",
88
+ "hyparquet-compressors": "^1.1.2",
89
+ "hyparquet-writer": "^0.16.10",
90
+ "mssql": "^12.7.2",
91
+ "mysql2": "^3.24.4",
92
+ "pg": "^8.23.0"
93
+ },
94
+ "peerDependenciesMeta": {
95
+ "@googleapis/sheets": {
96
+ "optional": true
97
+ },
98
+ "exceljs": {
99
+ "optional": true
100
+ },
101
+ "hyparquet": {
102
+ "optional": true
103
+ },
104
+ "hyparquet-compressors": {
105
+ "optional": true
106
+ },
107
+ "hyparquet-writer": {
108
+ "optional": true
109
+ },
110
+ "mssql": {
111
+ "optional": true
112
+ },
113
+ "mysql2": {
114
+ "optional": true
115
+ },
116
+ "pg": {
117
+ "optional": true
118
+ }
119
+ },
120
+ "lint-staged": {
121
+ "**/*.{ts,tsx,json,md}": [
122
+ "prettier --write"
123
+ ]
124
+ },
125
+ "overrides": {
126
+ "uuid": "^11.1.1"
127
+ }
128
+ }