@getpeppr/cli 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.
package/dist/index.js ADDED
@@ -0,0 +1,172 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/index.ts
4
+ import { createRequire } from "module";
5
+ import { Command } from "commander";
6
+
7
+ // src/utils/file.ts
8
+ import { readFileSync, existsSync } from "fs";
9
+ import { resolve } from "path";
10
+ function readJsonFile(filePath) {
11
+ const resolved = resolve(filePath);
12
+ if (!existsSync(resolved)) {
13
+ return { ok: false, error: `Error: file not found \u2014 ${resolved}` };
14
+ }
15
+ let content;
16
+ try {
17
+ content = readFileSync(resolved, "utf-8");
18
+ } catch {
19
+ return { ok: false, error: `Error: could not read file \u2014 ${resolved}` };
20
+ }
21
+ try {
22
+ const data = JSON.parse(content);
23
+ return { ok: true, data };
24
+ } catch {
25
+ return { ok: false, error: `Error: invalid JSON in file \u2014 ${resolved}` };
26
+ }
27
+ }
28
+
29
+ // src/formatters/validation.ts
30
+ import pc from "picocolors";
31
+ function sectionHeader(title) {
32
+ const pad = 45 - title.length - 4;
33
+ return pc.dim(`\u2500\u2500 ${title} ${"\u2500".repeat(Math.max(pad, 3))}`);
34
+ }
35
+ function formatError(item) {
36
+ const ruleId = "ruleId" in item && item.ruleId ? pc.dim(` (${item.ruleId})`) : "";
37
+ const field = "field" in item && item.field ? `${item.field} \u2014 ` : "";
38
+ return ` ${pc.red("\u2717")} ${field}${item.message}${ruleId}`;
39
+ }
40
+ function formatWarning(item) {
41
+ const ruleId = "ruleId" in item && item.ruleId ? pc.dim(` (${item.ruleId})`) : "";
42
+ const field = "field" in item && item.field ? `${item.field} \u2014 ` : "";
43
+ return ` ${pc.yellow("\u26A0")} ${field}${item.message}${ruleId}`;
44
+ }
45
+ function formatSection(title, errors, warnings) {
46
+ const lines = [sectionHeader(title)];
47
+ if (errors.length === 0 && warnings.length === 0) {
48
+ lines.push(` ${pc.green("\u2713")} All rules passed`);
49
+ return lines.join("\n");
50
+ }
51
+ if (errors.length === 0) {
52
+ lines.push(` ${pc.green("\u2713")} No errors`);
53
+ }
54
+ for (const err of errors) {
55
+ lines.push(formatError(err));
56
+ }
57
+ for (const warn of warnings) {
58
+ lines.push(formatWarning(warn));
59
+ }
60
+ return lines.join("\n");
61
+ }
62
+ function formatValidationResult(filename, result) {
63
+ const lines = [];
64
+ lines.push(`
65
+ Validating: ${pc.bold(filename)}
66
+ `);
67
+ lines.push(
68
+ formatSection(
69
+ "Structure",
70
+ result.structure.errors,
71
+ result.structure.warnings
72
+ )
73
+ );
74
+ lines.push("");
75
+ lines.push(
76
+ formatSection(
77
+ "Business Rules (Peppol BIS 3.0)",
78
+ result.schematron.errors,
79
+ result.schematron.warnings
80
+ )
81
+ );
82
+ lines.push("");
83
+ lines.push(
84
+ formatSection(
85
+ "Country Rules",
86
+ result.countryRules.errors,
87
+ result.countryRules.warnings
88
+ )
89
+ );
90
+ lines.push("");
91
+ lines.push(sectionHeader("Summary"));
92
+ const { totalErrors, totalWarnings, valid } = result;
93
+ if (valid && totalWarnings === 0) {
94
+ lines.push(` ${pc.green(pc.bold("\u2713 Invoice is valid"))}`);
95
+ } else if (valid) {
96
+ lines.push(
97
+ ` ${pc.green(pc.bold("\u2713 Invoice is valid"))} ${pc.dim(`(${totalWarnings} warning${totalWarnings === 1 ? "" : "s"})`)}`
98
+ );
99
+ } else {
100
+ const parts = [];
101
+ parts.push(`${totalErrors} error${totalErrors === 1 ? "" : "s"}`);
102
+ if (totalWarnings > 0) {
103
+ parts.push(`${totalWarnings} warning${totalWarnings === 1 ? "" : "s"}`);
104
+ }
105
+ lines.push(
106
+ ` ${pc.red(pc.bold(`\u2717 ${parts.join(", ")}`))} \u2014 invoice non-compliant`
107
+ );
108
+ }
109
+ lines.push("");
110
+ return lines.join("\n");
111
+ }
112
+
113
+ // src/commands/validate.ts
114
+ import {
115
+ validateInvoice,
116
+ validateSchematron,
117
+ validateCountryRules
118
+ } from "@getpeppr/sdk";
119
+ function runValidation(input) {
120
+ const structure = validateInvoice(input);
121
+ const schematron = validateSchematron(input);
122
+ const countryRules = validateCountryRules(input);
123
+ const totalErrors = structure.errors.length + schematron.errors.length + countryRules.errors.length;
124
+ const totalWarnings = structure.warnings.length + schematron.warnings.length + countryRules.warnings.length;
125
+ return {
126
+ structure: { errors: structure.errors, warnings: structure.warnings },
127
+ schematron: { errors: schematron.errors, warnings: schematron.warnings },
128
+ countryRules: {
129
+ errors: countryRules.errors,
130
+ warnings: countryRules.warnings
131
+ },
132
+ totalErrors,
133
+ totalWarnings,
134
+ valid: totalErrors === 0
135
+ };
136
+ }
137
+ function registerValidateCommand(program2) {
138
+ program2.command("validate").description("Validate a Peppol invoice JSON file").argument("<file>", "path to invoice JSON file").option("--json", "output results as JSON").option("--quiet", "exit code only, no output").action(async (file, options) => {
139
+ const parseResult = readJsonFile(file);
140
+ if (!parseResult.ok) {
141
+ process.stderr.write(parseResult.error + "\n");
142
+ process.exit(2);
143
+ }
144
+ if (typeof parseResult.data !== "object" || parseResult.data === null || Array.isArray(parseResult.data)) {
145
+ process.stderr.write(
146
+ "Error: JSON file must contain an object, not an array or primitive\n"
147
+ );
148
+ process.exit(2);
149
+ }
150
+ const input = parseResult.data;
151
+ const result = runValidation(input);
152
+ if (options.quiet) {
153
+ process.exit(result.valid ? 0 : 1);
154
+ }
155
+ if (options.json) {
156
+ console.log(JSON.stringify(result, null, 2));
157
+ process.exit(result.valid ? 0 : 1);
158
+ }
159
+ const output = formatValidationResult(file, result);
160
+ console.log(output);
161
+ process.exit(result.valid ? 0 : 1);
162
+ });
163
+ }
164
+
165
+ // src/index.ts
166
+ var require2 = createRequire(import.meta.url);
167
+ var { version } = require2("../package.json");
168
+ var program = new Command();
169
+ program.name("getpeppr").description("CLI tool for Peppol e-invoice validation and development").version(version);
170
+ registerValidateCommand(program);
171
+ program.parse();
172
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/utils/file.ts","../src/formatters/validation.ts","../src/commands/validate.ts"],"sourcesContent":["import { createRequire } from \"node:module\";\nimport { Command } from \"commander\";\nimport { registerValidateCommand } from \"./commands/validate.js\";\n\nconst require = createRequire(import.meta.url);\nconst { version } = require(\"../package.json\") as { version: string };\n\nconst program = new Command();\n\nprogram\n .name(\"getpeppr\")\n .description(\"CLI tool for Peppol e-invoice validation and development\")\n .version(version);\n\nregisterValidateCommand(program);\n\nprogram.parse();\n","import { readFileSync, existsSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\n\nexport type FileReadResult =\n | { ok: true; data: unknown }\n | { ok: false; error: string };\n\nexport function readJsonFile(filePath: string): FileReadResult {\n const resolved = resolve(filePath);\n\n if (!existsSync(resolved)) {\n return { ok: false, error: `Error: file not found — ${resolved}` };\n }\n\n let content: string;\n try {\n content = readFileSync(resolved, \"utf-8\");\n } catch {\n return { ok: false, error: `Error: could not read file — ${resolved}` };\n }\n\n try {\n const data: unknown = JSON.parse(content);\n return { ok: true, data };\n } catch {\n return { ok: false, error: `Error: invalid JSON in file — ${resolved}` };\n }\n}\n","import pc from \"picocolors\";\nimport type { MergedValidationResult } from \"../commands/validate.js\";\nimport type { ValidationError, ValidationWarning, SchematronViolation } from \"@getpeppr/sdk\";\n\nfunction sectionHeader(title: string): string {\n const pad = 45 - title.length - 4;\n return pc.dim(`── ${title} ${\"─\".repeat(Math.max(pad, 3))}`);\n}\n\nfunction formatError(item: ValidationError | SchematronViolation): string {\n const ruleId = \"ruleId\" in item && item.ruleId ? pc.dim(` (${item.ruleId})`) : \"\";\n const field = \"field\" in item && item.field ? `${item.field} — ` : \"\";\n return ` ${pc.red(\"✗\")} ${field}${item.message}${ruleId}`;\n}\n\nfunction formatWarning(item: ValidationWarning | SchematronViolation): string {\n const ruleId = \"ruleId\" in item && item.ruleId ? pc.dim(` (${item.ruleId})`) : \"\";\n const field = \"field\" in item && item.field ? `${item.field} — ` : \"\";\n return ` ${pc.yellow(\"⚠\")} ${field}${item.message}${ruleId}`;\n}\n\nfunction formatSection(\n title: string,\n errors: (ValidationError | SchematronViolation)[],\n warnings: (ValidationWarning | SchematronViolation)[],\n): string {\n const lines: string[] = [sectionHeader(title)];\n\n if (errors.length === 0 && warnings.length === 0) {\n lines.push(` ${pc.green(\"✓\")} All rules passed`);\n return lines.join(\"\\n\");\n }\n\n if (errors.length === 0) {\n lines.push(` ${pc.green(\"✓\")} No errors`);\n }\n\n for (const err of errors) {\n lines.push(formatError(err));\n }\n\n for (const warn of warnings) {\n lines.push(formatWarning(warn));\n }\n\n return lines.join(\"\\n\");\n}\n\nexport function formatValidationResult(\n filename: string,\n result: MergedValidationResult,\n): string {\n const lines: string[] = [];\n\n lines.push(`\\nValidating: ${pc.bold(filename)}\\n`);\n\n lines.push(\n formatSection(\n \"Structure\",\n result.structure.errors,\n result.structure.warnings,\n ),\n );\n lines.push(\"\");\n\n lines.push(\n formatSection(\n \"Business Rules (Peppol BIS 3.0)\",\n result.schematron.errors,\n result.schematron.warnings,\n ),\n );\n lines.push(\"\");\n\n lines.push(\n formatSection(\n \"Country Rules\",\n result.countryRules.errors,\n result.countryRules.warnings,\n ),\n );\n lines.push(\"\");\n\n // Summary\n lines.push(sectionHeader(\"Summary\"));\n const { totalErrors, totalWarnings, valid } = result;\n\n if (valid && totalWarnings === 0) {\n lines.push(` ${pc.green(pc.bold(\"✓ Invoice is valid\"))}`);\n } else if (valid) {\n lines.push(\n ` ${pc.green(pc.bold(\"✓ Invoice is valid\"))} ${pc.dim(`(${totalWarnings} warning${totalWarnings === 1 ? \"\" : \"s\"})`)}`,\n );\n } else {\n const parts: string[] = [];\n parts.push(`${totalErrors} error${totalErrors === 1 ? \"\" : \"s\"}`);\n if (totalWarnings > 0) {\n parts.push(`${totalWarnings} warning${totalWarnings === 1 ? \"\" : \"s\"}`);\n }\n lines.push(\n ` ${pc.red(pc.bold(`✗ ${parts.join(\", \")}`))} — invoice non-compliant`,\n );\n }\n\n lines.push(\"\");\n return lines.join(\"\\n\");\n}\n","import type { Command } from \"commander\";\nimport { readJsonFile } from \"../utils/file.js\";\nimport { formatValidationResult } from \"../formatters/validation.js\";\nimport {\n validateInvoice,\n validateSchematron,\n validateCountryRules,\n type InvoiceInput,\n type ValidationError,\n type ValidationWarning,\n type SchematronViolation,\n} from \"@getpeppr/sdk\";\n\nexport interface MergedValidationResult {\n structure: {\n errors: ValidationError[];\n warnings: ValidationWarning[];\n };\n schematron: {\n errors: SchematronViolation[];\n warnings: SchematronViolation[];\n };\n countryRules: {\n errors: ValidationError[];\n warnings: ValidationWarning[];\n };\n totalErrors: number;\n totalWarnings: number;\n valid: boolean;\n}\n\nexport function runValidation(input: InvoiceInput): MergedValidationResult {\n const structure = validateInvoice(input);\n const schematron = validateSchematron(input);\n const countryRules = validateCountryRules(input);\n\n const totalErrors =\n structure.errors.length +\n schematron.errors.length +\n countryRules.errors.length;\n\n const totalWarnings =\n structure.warnings.length +\n schematron.warnings.length +\n countryRules.warnings.length;\n\n return {\n structure: { errors: structure.errors, warnings: structure.warnings },\n schematron: { errors: schematron.errors, warnings: schematron.warnings },\n countryRules: {\n errors: countryRules.errors,\n warnings: countryRules.warnings,\n },\n totalErrors,\n totalWarnings,\n valid: totalErrors === 0,\n };\n}\n\nexport function registerValidateCommand(program: Command): void {\n program\n .command(\"validate\")\n .description(\"Validate a Peppol invoice JSON file\")\n .argument(\"<file>\", \"path to invoice JSON file\")\n .option(\"--json\", \"output results as JSON\")\n .option(\"--quiet\", \"exit code only, no output\")\n .action(async (file: string, options: { json?: boolean; quiet?: boolean }) => {\n // 1. Read and parse the JSON file\n // Fatal errors always go to stderr regardless of --quiet (UNIX convention)\n const parseResult = readJsonFile(file);\n if (!parseResult.ok) {\n process.stderr.write(parseResult.error + \"\\n\");\n process.exit(2);\n }\n\n if (\n typeof parseResult.data !== \"object\" ||\n parseResult.data === null ||\n Array.isArray(parseResult.data)\n ) {\n process.stderr.write(\n \"Error: JSON file must contain an object, not an array or primitive\\n\",\n );\n process.exit(2);\n }\n\n const input = parseResult.data as InvoiceInput;\n\n // 2. Run all 3 validators\n const result = runValidation(input);\n\n // 3. Output\n if (options.quiet) {\n process.exit(result.valid ? 0 : 1);\n }\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n process.exit(result.valid ? 0 : 1);\n }\n\n // 4. Formatted output\n const output = formatValidationResult(file, result);\n console.log(output);\n process.exit(result.valid ? 0 : 1);\n });\n}\n"],"mappings":";;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,eAAe;;;ACDxB,SAAS,cAAc,kBAAkB;AACzC,SAAS,eAAe;AAMjB,SAAS,aAAa,UAAkC;AAC7D,QAAM,WAAW,QAAQ,QAAQ;AAEjC,MAAI,CAAC,WAAW,QAAQ,GAAG;AACzB,WAAO,EAAE,IAAI,OAAO,OAAO,gCAA2B,QAAQ,GAAG;AAAA,EACnE;AAEA,MAAI;AACJ,MAAI;AACF,cAAU,aAAa,UAAU,OAAO;AAAA,EAC1C,QAAQ;AACN,WAAO,EAAE,IAAI,OAAO,OAAO,qCAAgC,QAAQ,GAAG;AAAA,EACxE;AAEA,MAAI;AACF,UAAM,OAAgB,KAAK,MAAM,OAAO;AACxC,WAAO,EAAE,IAAI,MAAM,KAAK;AAAA,EAC1B,QAAQ;AACN,WAAO,EAAE,IAAI,OAAO,OAAO,sCAAiC,QAAQ,GAAG;AAAA,EACzE;AACF;;;AC3BA,OAAO,QAAQ;AAIf,SAAS,cAAc,OAAuB;AAC5C,QAAM,MAAM,KAAK,MAAM,SAAS;AAChC,SAAO,GAAG,IAAI,gBAAM,KAAK,IAAI,SAAI,OAAO,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE;AAC7D;AAEA,SAAS,YAAY,MAAqD;AACxE,QAAM,SAAS,YAAY,QAAQ,KAAK,SAAS,GAAG,IAAI,KAAK,KAAK,MAAM,GAAG,IAAI;AAC/E,QAAM,QAAQ,WAAW,QAAQ,KAAK,QAAQ,GAAG,KAAK,KAAK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YAAY,GAAG;AAC7C,IAAM,EAAE,QAAQ,IAAIA,SAAQ,iBAAiB;AAE7C,IAAM,UAAU,IAAI,QAAQ;AAE5B,QACG,KAAK,UAAU,EACf,YAAY,0DAA0D,EACtE,QAAQ,OAAO;AAElB,wBAAwB,OAAO;AAE/B,QAAQ,MAAM;","names":["program","require"]}
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@getpeppr/cli",
3
+ "version": "0.1.0",
4
+ "description": "CLI tool for Peppol e-invoice validation and development",
5
+ "type": "module",
6
+ "bin": {
7
+ "getpeppr": "./dist/index.js"
8
+ },
9
+ "main": "dist/index.js",
10
+ "files": [
11
+ "dist",
12
+ "README.md"
13
+ ],
14
+ "scripts": {
15
+ "build": "tsup",
16
+ "dev": "tsx src/index.ts",
17
+ "test": "vitest run",
18
+ "test:watch": "vitest",
19
+ "typecheck": "tsc --noEmit"
20
+ },
21
+ "keywords": [
22
+ "peppol",
23
+ "e-invoice",
24
+ "validate",
25
+ "cli",
26
+ "ubl",
27
+ "bis3",
28
+ "electronic-invoicing",
29
+ "typescript"
30
+ ],
31
+ "author": "getpeppr <hello@getpeppr.dev>",
32
+ "license": "MIT",
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "https://github.com/zerolooplabs/getpeppr.git",
36
+ "directory": "packages/cli"
37
+ },
38
+ "homepage": "https://getpeppr.dev",
39
+ "engines": {
40
+ "node": ">=18.0.0"
41
+ },
42
+ "publishConfig": {
43
+ "access": "public"
44
+ },
45
+ "dependencies": {
46
+ "@getpeppr/sdk": "^1.1.2",
47
+ "commander": "^13.1.0",
48
+ "picocolors": "^1.1.1"
49
+ },
50
+ "devDependencies": {
51
+ "tsup": "^8.4.0",
52
+ "tsx": "^4.19.0",
53
+ "typescript": "^5.7.0",
54
+ "@types/node": "^25.3.0"
55
+ }
56
+ }