arcli 0.1.2 → 1.2.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/CHANGELOG.md +78 -0
- package/LICENSE +21 -0
- package/README.md +169 -4
- package/dist/cli/commands/billing-family.command.d.ts +2 -0
- package/dist/cli/commands/billing-family.command.js +30 -0
- package/dist/cli/commands/billing-family.command.js.map +1 -0
- package/dist/cli/commands/billing-shortcuts.command.d.ts +2 -0
- package/dist/cli/commands/billing-shortcuts.command.js +18 -0
- package/dist/cli/commands/billing-shortcuts.command.js.map +1 -0
- package/dist/cli/commands/billing.command.interactive-preview.d.ts +18 -0
- package/dist/cli/commands/billing.command.interactive-preview.js +69 -0
- package/dist/cli/commands/billing.command.interactive-preview.js.map +1 -0
- package/dist/cli/commands/billing.command.options.d.ts +2 -0
- package/dist/cli/commands/billing.command.options.js +65 -0
- package/dist/cli/commands/billing.command.options.js.map +1 -0
- package/dist/cli/commands/billing.command.output.d.ts +12 -0
- package/dist/cli/commands/billing.command.output.js +33 -0
- package/dist/cli/commands/billing.command.output.js.map +1 -0
- package/dist/cli/commands/billing.command.parser.d.ts +21 -0
- package/dist/cli/commands/billing.command.parser.js +170 -0
- package/dist/cli/commands/billing.command.parser.js.map +1 -0
- package/dist/cli/commands/billing.command.shared.d.ts +7 -0
- package/dist/cli/commands/billing.command.shared.js +99 -0
- package/dist/cli/commands/billing.command.shared.js.map +1 -0
- package/dist/cli/commands/billing.command.shortcuts.d.ts +7 -0
- package/dist/cli/commands/billing.command.shortcuts.js +52 -0
- package/dist/cli/commands/billing.command.shortcuts.js.map +1 -0
- package/dist/cli/commands/config.command.d.ts +2 -0
- package/dist/cli/commands/config.command.js +125 -0
- package/dist/cli/commands/config.command.js.map +1 -0
- package/dist/cli/commands/examples.command.d.ts +2 -0
- package/dist/cli/commands/examples.command.js +14 -0
- package/dist/cli/commands/examples.command.js.map +1 -0
- package/dist/cli/commands/fce-obligation.command.d.ts +2 -0
- package/dist/cli/commands/fce-obligation.command.js +51 -0
- package/dist/cli/commands/fce-obligation.command.js.map +1 -0
- package/dist/cli/commands/storybook.command.d.ts +2 -0
- package/dist/cli/commands/storybook.command.js +26 -0
- package/dist/cli/commands/storybook.command.js.map +1 -0
- package/dist/cli/help.d.ts +11 -0
- package/dist/cli/help.js +534 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +41 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/program.d.ts +2 -0
- package/dist/cli/program.js +30 -0
- package/dist/cli/program.js.map +1 -0
- package/dist/cli/types.d.ts +6 -0
- package/dist/cli/types.js +2 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/cli/version.d.ts +1 -0
- package/dist/cli/version.js +2 -0
- package/dist/cli/version.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/dates/arca-date.d.ts +6 -0
- package/dist/lib/dates/arca-date.js +45 -0
- package/dist/lib/dates/arca-date.js.map +1 -0
- package/dist/lib/errors/app-error.d.ts +14 -0
- package/dist/lib/errors/app-error.js +29 -0
- package/dist/lib/errors/app-error.js.map +1 -0
- package/dist/lib/files/read-json-file.d.ts +1 -0
- package/dist/lib/files/read-json-file.js +21 -0
- package/dist/lib/files/read-json-file.js.map +1 -0
- package/dist/lib/paths/mask-path.d.ts +1 -0
- package/dist/lib/paths/mask-path.js +17 -0
- package/dist/lib/paths/mask-path.js.map +1 -0
- package/dist/lib/security/certificate.d.ts +7 -0
- package/dist/lib/security/certificate.js +16 -0
- package/dist/lib/security/certificate.js.map +1 -0
- package/dist/lib/security/pem.d.ts +5 -0
- package/dist/lib/security/pem.js +36 -0
- package/dist/lib/security/pem.js.map +1 -0
- package/dist/modules/billing/billing-response.d.ts +4 -0
- package/dist/modules/billing/billing-response.js +74 -0
- package/dist/modules/billing/billing-response.js.map +1 -0
- package/dist/modules/billing/billing.amounts.d.ts +19 -0
- package/dist/modules/billing/billing.amounts.js +72 -0
- package/dist/modules/billing/billing.amounts.js.map +1 -0
- package/dist/modules/billing/billing.associated-period.d.ts +8 -0
- package/dist/modules/billing/billing.associated-period.js +40 -0
- package/dist/modules/billing/billing.associated-period.js.map +1 -0
- package/dist/modules/billing/billing.associated-vouchers.d.ts +12 -0
- package/dist/modules/billing/billing.associated-vouchers.js +73 -0
- package/dist/modules/billing/billing.associated-vouchers.js.map +1 -0
- package/dist/modules/billing/billing.constants.d.ts +2 -0
- package/dist/modules/billing/billing.constants.js +3 -0
- package/dist/modules/billing/billing.constants.js.map +1 -0
- package/dist/modules/billing/billing.currency.d.ts +18 -0
- package/dist/modules/billing/billing.currency.js +53 -0
- package/dist/modules/billing/billing.currency.js.map +1 -0
- package/dist/modules/billing/billing.date-range.d.ts +9 -0
- package/dist/modules/billing/billing.date-range.js +52 -0
- package/dist/modules/billing/billing.date-range.js.map +1 -0
- package/dist/modules/billing/billing.display.d.ts +13 -0
- package/dist/modules/billing/billing.display.js +137 -0
- package/dist/modules/billing/billing.display.js.map +1 -0
- package/dist/modules/billing/billing.fce.d.ts +21 -0
- package/dist/modules/billing/billing.fce.js +59 -0
- package/dist/modules/billing/billing.fce.js.map +1 -0
- package/dist/modules/billing/billing.iva-receptor.d.ts +7 -0
- package/dist/modules/billing/billing.iva-receptor.js +58 -0
- package/dist/modules/billing/billing.iva-receptor.js.map +1 -0
- package/dist/modules/billing/billing.json-format.d.ts +6 -0
- package/dist/modules/billing/billing.json-format.js +5 -0
- package/dist/modules/billing/billing.json-format.js.map +1 -0
- package/dist/modules/billing/billing.labels.d.ts +9 -0
- package/dist/modules/billing/billing.labels.js +108 -0
- package/dist/modules/billing/billing.labels.js.map +1 -0
- package/dist/modules/billing/billing.mappers.d.ts +8 -0
- package/dist/modules/billing/billing.mappers.js +60 -0
- package/dist/modules/billing/billing.mappers.js.map +1 -0
- package/dist/modules/billing/billing.presenter.d.ts +7 -0
- package/dist/modules/billing/billing.presenter.js +3 -0
- package/dist/modules/billing/billing.presenter.js.map +1 -0
- package/dist/modules/billing/billing.schemas.d.ts +107 -0
- package/dist/modules/billing/billing.schemas.js +106 -0
- package/dist/modules/billing/billing.schemas.js.map +1 -0
- package/dist/modules/billing/billing.serialize.d.ts +8 -0
- package/dist/modules/billing/billing.serialize.js +53 -0
- package/dist/modules/billing/billing.serialize.js.map +1 -0
- package/dist/modules/billing/billing.service.d.ts +27 -0
- package/dist/modules/billing/billing.service.js +146 -0
- package/dist/modules/billing/billing.service.js.map +1 -0
- package/dist/modules/billing/billing.text.d.ts +8 -0
- package/dist/modules/billing/billing.text.js +52 -0
- package/dist/modules/billing/billing.text.js.map +1 -0
- package/dist/modules/billing/billing.types.d.ts +13 -0
- package/dist/modules/billing/billing.types.internal.d.ts +27 -0
- package/dist/modules/billing/billing.types.internal.js +2 -0
- package/dist/modules/billing/billing.types.internal.js.map +1 -0
- package/dist/modules/billing/billing.types.js +2 -0
- package/dist/modules/billing/billing.types.js.map +1 -0
- package/dist/modules/billing/billing.validation.d.ts +7 -0
- package/dist/modules/billing/billing.validation.js +80 -0
- package/dist/modules/billing/billing.validation.js.map +1 -0
- package/dist/modules/billing/voucher-kind-map.d.ts +9 -0
- package/dist/modules/billing/voucher-kind-map.js +180 -0
- package/dist/modules/billing/voucher-kind-map.js.map +1 -0
- package/dist/modules/config/config-doctor.d.ts +15 -0
- package/dist/modules/config/config-doctor.js +125 -0
- package/dist/modules/config/config-doctor.js.map +1 -0
- package/dist/modules/config/config-value-parser.d.ts +2 -0
- package/dist/modules/config/config-value-parser.js +99 -0
- package/dist/modules/config/config-value-parser.js.map +1 -0
- package/dist/modules/config/config.presenter.d.ts +7 -0
- package/dist/modules/config/config.presenter.js +88 -0
- package/dist/modules/config/config.presenter.js.map +1 -0
- package/dist/modules/config/config.schemas.d.ts +110 -0
- package/dist/modules/config/config.schemas.js +103 -0
- package/dist/modules/config/config.schemas.js.map +1 -0
- package/dist/modules/config/config.service.d.ts +20 -0
- package/dist/modules/config/config.service.js +82 -0
- package/dist/modules/config/config.service.js.map +1 -0
- package/dist/modules/examples/examples.d.ts +1 -0
- package/dist/modules/examples/examples.js +191 -0
- package/dist/modules/examples/examples.js.map +1 -0
- package/dist/modules/fce/fce-obligation.d.ts +20 -0
- package/dist/modules/fce/fce-obligation.js +33 -0
- package/dist/modules/fce/fce-obligation.js.map +1 -0
- package/dist/modules/fce/fce-obligation.presenter.d.ts +9 -0
- package/dist/modules/fce/fce-obligation.presenter.js +32 -0
- package/dist/modules/fce/fce-obligation.presenter.js.map +1 -0
- package/dist/modules/storybook/showcase-theme.d.ts +7 -0
- package/dist/modules/storybook/showcase-theme.js +6 -0
- package/dist/modules/storybook/showcase-theme.js.map +1 -0
- package/dist/modules/storybook/showcase.d.ts +2 -0
- package/dist/modules/storybook/showcase.js +310 -0
- package/dist/modules/storybook/showcase.js.map +1 -0
- package/dist/modules/update-check/update-check.presenter.d.ts +2 -0
- package/dist/modules/update-check/update-check.presenter.js +6 -0
- package/dist/modules/update-check/update-check.presenter.js.map +1 -0
- package/dist/modules/update-check/update-check.service.d.ts +8 -0
- package/dist/modules/update-check/update-check.service.js +72 -0
- package/dist/modules/update-check/update-check.service.js.map +1 -0
- package/dist/services/arca/arca-billing.gateway.d.ts +10 -0
- package/dist/services/arca/arca-billing.gateway.js +22 -0
- package/dist/services/arca/arca-billing.gateway.js.map +1 -0
- package/dist/services/arca/arca-client.factory.d.ts +5 -0
- package/dist/services/arca/arca-client.factory.js +7 -0
- package/dist/services/arca/arca-client.factory.js.map +1 -0
- package/dist/services/arca/arca-context.resolver.d.ts +44 -0
- package/dist/services/arca/arca-context.resolver.js +120 -0
- package/dist/services/arca/arca-context.resolver.js.map +1 -0
- package/dist/services/arca/arca-fce-obligation.gateway.d.ts +7 -0
- package/dist/services/arca/arca-fce-obligation.gateway.js +36 -0
- package/dist/services/arca/arca-fce-obligation.gateway.js.map +1 -0
- package/dist/ui/components/contentPanel.d.ts +5 -0
- package/dist/ui/components/contentPanel.js +11 -0
- package/dist/ui/components/contentPanel.js.map +1 -0
- package/dist/ui/components/errorPanel.d.ts +1 -0
- package/dist/ui/components/errorPanel.js +13 -0
- package/dist/ui/components/errorPanel.js.map +1 -0
- package/dist/ui/components/index.d.ts +6 -0
- package/dist/ui/components/index.js +7 -0
- package/dist/ui/components/index.js.map +1 -0
- package/dist/ui/components/keyValuePanel.d.ts +3 -0
- package/dist/ui/components/keyValuePanel.js +14 -0
- package/dist/ui/components/keyValuePanel.js.map +1 -0
- package/dist/ui/components/noticePanel.d.ts +3 -0
- package/dist/ui/components/noticePanel.js +11 -0
- package/dist/ui/components/noticePanel.js.map +1 -0
- package/dist/ui/components/rawPanel.d.ts +1 -0
- package/dist/ui/components/rawPanel.js +5 -0
- package/dist/ui/components/rawPanel.js.map +1 -0
- package/dist/ui/components/statusPanel.d.ts +3 -0
- package/dist/ui/components/statusPanel.js +20 -0
- package/dist/ui/components/statusPanel.js.map +1 -0
- package/dist/ui/index.d.ts +5 -0
- package/dist/ui/index.js +6 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/presenters/billing.presenter.d.ts +2 -0
- package/dist/ui/presenters/billing.presenter.js +2 -0
- package/dist/ui/presenters/billing.presenter.js.map +1 -0
- package/dist/ui/presenters/config.presenter.d.ts +1 -0
- package/dist/ui/presenters/config.presenter.js +2 -0
- package/dist/ui/presenters/config.presenter.js.map +1 -0
- package/dist/ui/presenters/errors.presenter.d.ts +1 -0
- package/dist/ui/presenters/errors.presenter.js +89 -0
- package/dist/ui/presenters/errors.presenter.js.map +1 -0
- package/dist/ui/presenters/errors.zod-presenter.d.ts +2 -0
- package/dist/ui/presenters/errors.zod-presenter.js +103 -0
- package/dist/ui/presenters/errors.zod-presenter.js.map +1 -0
- package/dist/ui/presenters/index.d.ts +4 -0
- package/dist/ui/presenters/index.js +5 -0
- package/dist/ui/presenters/index.js.map +1 -0
- package/dist/ui/presenters/showcase.presenter.d.ts +1 -0
- package/dist/ui/presenters/showcase.presenter.js +2 -0
- package/dist/ui/presenters/showcase.presenter.js.map +1 -0
- package/dist/ui/primitives/index.d.ts +10 -0
- package/dist/ui/primitives/index.js +11 -0
- package/dist/ui/primitives/index.js.map +1 -0
- package/dist/ui/primitives/renderDivider.d.ts +5 -0
- package/dist/ui/primitives/renderDivider.js +5 -0
- package/dist/ui/primitives/renderDivider.js.map +1 -0
- package/dist/ui/primitives/renderFooter.d.ts +7 -0
- package/dist/ui/primitives/renderFooter.js +6 -0
- package/dist/ui/primitives/renderFooter.js.map +1 -0
- package/dist/ui/primitives/renderJson.d.ts +3 -0
- package/dist/ui/primitives/renderJson.js +19 -0
- package/dist/ui/primitives/renderJson.js.map +1 -0
- package/dist/ui/primitives/renderKeyValue.d.ts +14 -0
- package/dist/ui/primitives/renderKeyValue.js +34 -0
- package/dist/ui/primitives/renderKeyValue.js.map +1 -0
- package/dist/ui/primitives/renderLogo.d.ts +2 -0
- package/dist/ui/primitives/renderLogo.js +28 -0
- package/dist/ui/primitives/renderLogo.js.map +1 -0
- package/dist/ui/primitives/renderObject.d.ts +1 -0
- package/dist/ui/primitives/renderObject.js +19 -0
- package/dist/ui/primitives/renderObject.js.map +1 -0
- package/dist/ui/primitives/renderPanel.d.ts +23 -0
- package/dist/ui/primitives/renderPanel.js +114 -0
- package/dist/ui/primitives/renderPanel.js.map +1 -0
- package/dist/ui/primitives/renderSubtitle.d.ts +7 -0
- package/dist/ui/primitives/renderSubtitle.js +6 -0
- package/dist/ui/primitives/renderSubtitle.js.map +1 -0
- package/dist/ui/primitives/renderTable.d.ts +6 -0
- package/dist/ui/primitives/renderTable.js +14 -0
- package/dist/ui/primitives/renderTable.js.map +1 -0
- package/dist/ui/primitives/text.d.ts +18 -0
- package/dist/ui/primitives/text.js +154 -0
- package/dist/ui/primitives/text.js.map +1 -0
- package/dist/ui/stream/index.d.ts +1 -0
- package/dist/ui/stream/index.js +2 -0
- package/dist/ui/stream/index.js.map +1 -0
- package/dist/ui/stream/terminal-stream.d.ts +10 -0
- package/dist/ui/stream/terminal-stream.js +20 -0
- package/dist/ui/stream/terminal-stream.js.map +1 -0
- package/dist/ui/theme/index.d.ts +1 -0
- package/dist/ui/theme/index.js +2 -0
- package/dist/ui/theme/index.js.map +1 -0
- package/dist/ui/theme/theme.d.ts +27 -0
- package/dist/ui/theme/theme.js +41 -0
- package/dist/ui/theme/theme.js.map +1 -0
- package/llms.txt +161 -0
- package/package.json +99 -35
- package/.babelrc +0 -4
- package/.eslintignore +0 -1
- package/.eslintrc.js +0 -17
- package/.npmignore +0 -1
- package/lib/arcli.js +0 -275
- package/lib/arcli.min.js +0 -1
- package/src/config.js +0 -22
- package/src/consoler.js +0 -10
- package/src/index.js +0 -21
- package/src/init.js +0 -13
- package/src/run.js +0 -4
- package/src/spinner.js +0 -39
- package/tst/index.js +0 -26
- package/webpack.config.js +0 -47
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { ConfigurationError } from '../../lib/errors/app-error.js';
|
|
2
|
+
import { ensurePathExists, readPemFile } from '../../lib/security/pem.js';
|
|
3
|
+
import { ConfigService } from '../../modules/config/config.service.js';
|
|
4
|
+
export class ArcaContextResolver {
|
|
5
|
+
configService;
|
|
6
|
+
options;
|
|
7
|
+
constructor(options = {}) {
|
|
8
|
+
this.configService = options.configService;
|
|
9
|
+
this.options = options.options ?? {};
|
|
10
|
+
}
|
|
11
|
+
resolve() {
|
|
12
|
+
const validation = this.validate();
|
|
13
|
+
return {
|
|
14
|
+
config: validation.config,
|
|
15
|
+
context: {
|
|
16
|
+
cert: this.readRequiredFile(validation.certPath, 'certificado'),
|
|
17
|
+
cuit: validation.cuit,
|
|
18
|
+
key: this.readRequiredFile(validation.keyPath, 'clave privada'),
|
|
19
|
+
production: validation.environment === 'produccion',
|
|
20
|
+
ticketPath: validation.ticketPath,
|
|
21
|
+
},
|
|
22
|
+
environment: validation.environment,
|
|
23
|
+
outputJson: validation.outputJson,
|
|
24
|
+
outputRaw: validation.outputRaw,
|
|
25
|
+
pointOfSale: validation.pointOfSale,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
validate() {
|
|
29
|
+
const service = this.configService ?? new ConfigService();
|
|
30
|
+
const shouldCloseService = !this.configService;
|
|
31
|
+
try {
|
|
32
|
+
const config = service.getConfig();
|
|
33
|
+
const environment = this.resolveEnvironment(config);
|
|
34
|
+
const cuit = this.resolveCuit(config);
|
|
35
|
+
const certPath = this.resolveCertificatePath(config, environment);
|
|
36
|
+
const keyPath = this.resolveKeyPath(config, environment);
|
|
37
|
+
const pointOfSale = this.resolvePointOfSale(config);
|
|
38
|
+
const outputJson = this.resolveOutputJson(config);
|
|
39
|
+
const outputRaw = this.resolveOutputRaw(config);
|
|
40
|
+
const ticketPath = service.resolveTicketPath(config);
|
|
41
|
+
this.ensurePathExists(certPath, 'certificado');
|
|
42
|
+
this.ensurePathExists(keyPath, 'clave privada');
|
|
43
|
+
return {
|
|
44
|
+
certPath,
|
|
45
|
+
config,
|
|
46
|
+
cuit,
|
|
47
|
+
environment,
|
|
48
|
+
keyPath,
|
|
49
|
+
outputJson,
|
|
50
|
+
outputRaw,
|
|
51
|
+
pointOfSale,
|
|
52
|
+
ticketPath,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
finally {
|
|
56
|
+
if (shouldCloseService) {
|
|
57
|
+
service.close();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
readRequiredFile(filePath, label) {
|
|
62
|
+
return readPemFile(filePath, label);
|
|
63
|
+
}
|
|
64
|
+
ensurePathExists(filePath, label) {
|
|
65
|
+
ensurePathExists(filePath, label);
|
|
66
|
+
}
|
|
67
|
+
resolveCuit(config) {
|
|
68
|
+
const rawValue = config.cuit;
|
|
69
|
+
if (!rawValue) {
|
|
70
|
+
throw new ConfigurationError('Falta el CUIT. Configurelo con "arcli config establecer cuit <valor>". Si quiere una guia rapida, use "arcli config revisar".');
|
|
71
|
+
}
|
|
72
|
+
const parsedValue = Number.parseInt(rawValue, 10);
|
|
73
|
+
if (!Number.isInteger(parsedValue) || rawValue.length !== 11) {
|
|
74
|
+
throw new ConfigurationError(`El CUIT "${rawValue}" no es valido. Debe tener 11 digitos.`);
|
|
75
|
+
}
|
|
76
|
+
return parsedValue;
|
|
77
|
+
}
|
|
78
|
+
resolveEnvironment(config) {
|
|
79
|
+
if (this.options.testing && this.options.produccion) {
|
|
80
|
+
throw new ConfigurationError('Use --testing o --produccion, pero no ambos a la vez.');
|
|
81
|
+
}
|
|
82
|
+
if (this.options.testing) {
|
|
83
|
+
return 'testing';
|
|
84
|
+
}
|
|
85
|
+
if (this.options.produccion) {
|
|
86
|
+
return 'produccion';
|
|
87
|
+
}
|
|
88
|
+
return config.entornoPorDefecto;
|
|
89
|
+
}
|
|
90
|
+
resolveOutputJson(config) {
|
|
91
|
+
if (typeof this.options.json === 'boolean') {
|
|
92
|
+
return this.options.json;
|
|
93
|
+
}
|
|
94
|
+
return config.output.jsonPorDefecto;
|
|
95
|
+
}
|
|
96
|
+
resolvePointOfSale(config) {
|
|
97
|
+
return config.puntoVentaPorDefecto;
|
|
98
|
+
}
|
|
99
|
+
resolveOutputRaw(config) {
|
|
100
|
+
if (typeof this.options.bruto === 'boolean') {
|
|
101
|
+
return this.options.bruto;
|
|
102
|
+
}
|
|
103
|
+
return config.output.brutoPorDefecto;
|
|
104
|
+
}
|
|
105
|
+
resolveCertificatePath(config, environment) {
|
|
106
|
+
const filePath = config.cert[environment];
|
|
107
|
+
if (!filePath) {
|
|
108
|
+
throw new ConfigurationError(`Falta la ruta del certificado para ${environment}. Configure "cert.${environment}". Si necesita ayuda, pruebe "arcli config revisar".`);
|
|
109
|
+
}
|
|
110
|
+
return filePath;
|
|
111
|
+
}
|
|
112
|
+
resolveKeyPath(config, environment) {
|
|
113
|
+
const filePath = config.key[environment];
|
|
114
|
+
if (!filePath) {
|
|
115
|
+
throw new ConfigurationError(`Falta la ruta de la clave privada para ${environment}. Configure "key.${environment}". Si necesita ayuda, pruebe "arcli config revisar".`);
|
|
116
|
+
}
|
|
117
|
+
return filePath;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=arca-context.resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arca-context.resolver.js","sourceRoot":"","sources":["../../../src/services/arca/arca-context.resolver.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AA2BpE,MAAM,OAAO,mBAAmB;IACb,aAAa,CAAiB;IAC9B,OAAO,CAAmB;IAE3C,YAAmB,UAAqC,EAAE;QACxD,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;IACvC,CAAC;IAEM,OAAO;QACZ,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAEnC,OAAO;YACL,MAAM,EAAE,UAAU,CAAC,MAAM;YACzB,OAAO,EAAE;gBACP,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,QAAQ,EAAE,aAAa,CAAC;gBAC/D,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,GAAG,EAAE,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,OAAO,EAAE,eAAe,CAAC;gBAC/D,UAAU,EAAE,UAAU,CAAC,WAAW,KAAK,YAAY;gBACnD,UAAU,EAAE,UAAU,CAAC,UAAU;aAClC;YACD,WAAW,EAAE,UAAU,CAAC,WAAW;YACnC,UAAU,EAAE,UAAU,CAAC,UAAU;YACjC,SAAS,EAAE,UAAU,CAAC,SAAS;YAC/B,WAAW,EAAE,UAAU,CAAC,WAAW;SACpC,CAAC;IACJ,CA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,MAAM,CAAC,cAAc,CAAC;IACtC,CAAC;IAEO,kBAAkB,CAAC,MAAmB;QAC5C,OAAO,MAAM,CAAC,oBAAoB,CAAC;IACrC,CAAC;IAEO,gBAAgB,CAAC,MAAmB;QAC1C,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;QAC5B,CAAC;QAED,OAAO,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC;IACvC,CAAC;IAEO,sBAAsB,CAAC,MAAmB,EAAE,WAA6B;QAC/E,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAE1C,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,kBAAkB,CAC1B,sCAAsC,WAAW,qBAAqB,WAAW,sDAAsD,CACxI,CAAC;QACJ,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;IAEO,cAAc,CAAC,MAAmB,EAAE,WAA6B;QACvE,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAEzC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,kBAAkB,CAC1B,0CAA0C,WAAW,oBAAoB,WAAW,sDAAsD,CAC3I,CAAC;QACJ,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Arca } from '@arcasdk/core';
|
|
2
|
+
import type { FceObligation, FceObligationGateway } from '../../modules/fce/fce-obligation';
|
|
3
|
+
export declare class ArcaFceObligationGateway implements FceObligationGateway {
|
|
4
|
+
private readonly arca;
|
|
5
|
+
constructor(arca: Arca);
|
|
6
|
+
getObligation(cuit: number, issueDate: string): Promise<FceObligation>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { AppError } from '../../lib/errors/app-error.js';
|
|
2
|
+
const NOT_AUTHORIZED_MESSAGE = 'El certificado no esta autorizado para el servicio wsfecred (Factura de Credito Electronica). Autoricelo igual que wsfe: en testing desde WSASS ("Crear autorizacion a servicio") y en produccion desde el Administrador de Relaciones.';
|
|
3
|
+
function toIsoDate(arcaDate) {
|
|
4
|
+
return `${arcaDate.slice(0, 4)}-${arcaDate.slice(4, 6)}-${arcaDate.slice(6, 8)}`;
|
|
5
|
+
}
|
|
6
|
+
export class ArcaFceObligationGateway {
|
|
7
|
+
arca;
|
|
8
|
+
constructor(arca) {
|
|
9
|
+
this.arca = arca;
|
|
10
|
+
}
|
|
11
|
+
async getObligation(cuit, issueDate) {
|
|
12
|
+
let output;
|
|
13
|
+
try {
|
|
14
|
+
output = await this.arca.wsfecredService.consultarMontoObligadoRecepcion({
|
|
15
|
+
cuitConsultada: cuit,
|
|
16
|
+
fechaEmision: toIsoDate(issueDate),
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
if (error instanceof Error && error.message.includes('notAuthorized')) {
|
|
21
|
+
throw new AppError(NOT_AUTHORIZED_MESSAGE, { code: 'FCE_SERVICE_NOT_AUTHORIZED' });
|
|
22
|
+
}
|
|
23
|
+
throw error;
|
|
24
|
+
}
|
|
25
|
+
const result = output.consultarMontoObligadoRecepcionReturn;
|
|
26
|
+
const errors = result.arrayErrores?.codigoDescripcion ?? [];
|
|
27
|
+
if (errors.length > 0) {
|
|
28
|
+
throw new AppError(`ARCA no pudo informar si el receptor esta obligado a FCE: ${errors.map((item) => `${item.codigo} ${item.descripcion}`).join('; ')}`, { code: 'FCE_OBLIGATION_ERROR', details: { errors } });
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
minimumAmount: Number(result.montoDesde ?? 0),
|
|
32
|
+
obligated: result.obligado === 'S',
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=arca-fce-obligation.gateway.js.map
|
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AM,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,QAAQ,CAChB,6DAA6D,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EACpI,EAAE,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,CACtD,CAAC;QACJ,CAAC;QAED,OAAO;YACL,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,CAAC;YAC7C,SAAS,EAAE,MAAM,CAAC,QAAQ,KAAK,GAAG;SACnC,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { UiTextColor } from '../primitives/text';
|
|
2
|
+
import type { UiWidthPreset } from '../theme/theme';
|
|
3
|
+
type ContentPanelAlignment = 'block-center' | 'center' | 'left';
|
|
4
|
+
export declare function contentPanel(title: string, content: string, width?: UiWidthPreset, titleColor?: UiTextColor, contentAlign?: ContentPanelAlignment): string;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { renderPanel } from '../primitives/renderPanel.js';
|
|
2
|
+
export function contentPanel(title, content, width = 'wide', titleColor, contentAlign = 'left') {
|
|
3
|
+
return renderPanel({
|
|
4
|
+
content,
|
|
5
|
+
contentAlign,
|
|
6
|
+
title,
|
|
7
|
+
titleColor,
|
|
8
|
+
width,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=contentPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contentPanel.js","sourceRoot":"","sources":["../../../src/ui/components/contentPanel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAMxD,MAAM,UAAU,YAAY,CAC1B,KAAa,EACb,OAAe,EACf,QAAuB,MAAM,EAC7B,UAAwB,EACxB,eAAsC,MAAM;IAE5C,OAAO,WAAW,CAAC;QACjB,OAAO;QACP,YAAY;QACZ,KAAK;QACL,UAAU;QACV,KAAK;KACN,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function errorPanel(title: string, message: string, details?: readonly string[], hint?: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { toneText } from '../primitives/text.js';
|
|
2
|
+
import { contentPanel } from './contentPanel.js';
|
|
3
|
+
export function errorPanel(title, message, details = [], hint) {
|
|
4
|
+
const lines = [toneText('Error', 'danger'), message];
|
|
5
|
+
if (details.length > 0) {
|
|
6
|
+
lines.push('', toneText('Detalles', 'warning'), ...details);
|
|
7
|
+
}
|
|
8
|
+
if (hint) {
|
|
9
|
+
lines.push('', toneText('Sugerencia', 'info'), hint);
|
|
10
|
+
}
|
|
11
|
+
return contentPanel(title, lines.join('\n'), 'standard', 'danger');
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=errorPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorPanel.js","sourceRoot":"","sources":["../../../src/ui/components/errorPanel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,UAAU,UAAU,CAAC,KAAa,EAAE,OAAe,EAAE,UAA6B,EAAE,EAAE,IAAa;IACvG,MAAM,KAAK,GAAG,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC;IAErD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED,IAAI,IAAI,EAAE,CAAC;QACT,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IAED,OAAO,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;AACrE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { renderPanel } from '../primitives/renderPanel.js';
|
|
2
|
+
export function keyValuePanel(title, rows, footer, width = 'standard', titleColor) {
|
|
3
|
+
return renderPanel({
|
|
4
|
+
content: rows,
|
|
5
|
+
contentAlign: 'left',
|
|
6
|
+
footer,
|
|
7
|
+
footerColor: titleColor,
|
|
8
|
+
footerDivider: Boolean(footer),
|
|
9
|
+
title,
|
|
10
|
+
titleColor,
|
|
11
|
+
width,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=keyValuePanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyValuePanel.js","sourceRoot":"","sources":["../../../src/ui/components/keyValuePanel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAIxD,MAAM,UAAU,aAAa,CAC3B,KAAa,EACb,IAAuB,EACvB,MAAe,EACf,QAAuB,UAAU,EACjC,UAAwB;IAExB,OAAO,WAAW,CAAC;QACjB,OAAO,EAAE,IAAI;QACb,YAAY,EAAE,MAAM;QACpB,MAAM;QACN,WAAW,EAAE,UAAU;QACvB,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC;QAC9B,KAAK;QACL,UAAU;QACV,KAAK;KACN,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { renderPanel } from '../primitives/renderPanel.js';
|
|
2
|
+
import { toneText } from '../primitives/text.js';
|
|
3
|
+
export function noticePanel(message, color = 'info', borderType = 'note') {
|
|
4
|
+
return renderPanel({
|
|
5
|
+
borderType,
|
|
6
|
+
content: toneText(message, color),
|
|
7
|
+
contentAlign: 'center',
|
|
8
|
+
width: 'compact',
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=noticePanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"noticePanel.js","sourceRoot":"","sources":["../../../src/ui/components/noticePanel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAoB,MAAM,oBAAoB,CAAC;AAGhE,MAAM,UAAU,WAAW,CAAC,OAAe,EAAE,QAAqB,MAAM,EAAE,aAA2B,MAAM;IACzG,OAAO,WAAW,CAAC;QACjB,UAAU;QACV,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;QACjC,YAAY,EAAE,QAAQ;QACtB,KAAK,EAAE,SAAS;KACjB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function rawPanel(title: string, content: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rawPanel.js","sourceRoot":"","sources":["../../../src/ui/components/rawPanel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,UAAU,QAAQ,CAAC,KAAa,EAAE,OAAe;IACrD,OAAO,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { renderPanel } from '../primitives/renderPanel.js';
|
|
2
|
+
export function statusPanel(title, rows, footer, width = 'standard', titleColor) {
|
|
3
|
+
return renderPanel({
|
|
4
|
+
content: rows,
|
|
5
|
+
contentAlign: 'left',
|
|
6
|
+
footer,
|
|
7
|
+
footerColor: titleColor,
|
|
8
|
+
footerDivider: true,
|
|
9
|
+
padding: {
|
|
10
|
+
bottom: 1,
|
|
11
|
+
left: 2,
|
|
12
|
+
right: 2,
|
|
13
|
+
top: 1,
|
|
14
|
+
},
|
|
15
|
+
title,
|
|
16
|
+
titleColor,
|
|
17
|
+
width,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=statusPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statusPanel.js","sourceRoot":"","sources":["../../../src/ui/components/statusPanel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAIxD,MAAM,UAAU,WAAW,CACzB,KAAa,EACb,IAAuB,EACvB,MAAc,EACd,QAAuB,UAAU,EACjC,UAAwB;IAExB,OAAO,WAAW,CAAC;QACjB,OAAO,EAAE,IAAI;QACb,YAAY,EAAE,MAAM;QACpB,MAAM;QACN,WAAW,EAAE,UAAU;QACvB,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE;YACP,MAAM,EAAE,CAAC;YACT,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,CAAC;YACR,GAAG,EAAE,CAAC;SACP;QACD,KAAK;QACL,UAAU;QACV,KAAK;KACN,CAAC,CAAC;AACL,CAAC"}
|
package/dist/ui/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing.presenter.js","sourceRoot":"","sources":["../../../src/ui/presenters/billing.presenter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { formatConfig, formatConfigAsText, formatConfigDoctor, formatConfigDoctorAsText, formatConfigPath, } from '../../modules/config/config.presenter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.presenter.js","sourceRoot":"","sources":["../../../src/ui/presenters/config.presenter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,gBAAgB,GACjB,MAAM,uCAAuC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatCliError(error: unknown, useJson: boolean): string;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { ZodError } from 'zod';
|
|
2
|
+
import { AppError } from '../../lib/errors/app-error.js';
|
|
3
|
+
import { errorPanel } from '../components/errorPanel.js';
|
|
4
|
+
import { renderJson } from '../primitives/renderJson.js';
|
|
5
|
+
import { bold } from '../primitives/text.js';
|
|
6
|
+
import { formatZodError } from './errors.zod-presenter.js';
|
|
7
|
+
function formatErrorTitle(code) {
|
|
8
|
+
switch (code) {
|
|
9
|
+
case 'CONFIGURATION_ERROR':
|
|
10
|
+
return 'Error de configuracion';
|
|
11
|
+
case 'INPUT_VALIDATION_ERROR':
|
|
12
|
+
return 'Error de entrada';
|
|
13
|
+
default:
|
|
14
|
+
return 'Error';
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function formatErrorHint(error) {
|
|
18
|
+
switch (error.code) {
|
|
19
|
+
case 'CONFIGURATION_ERROR':
|
|
20
|
+
return 'Revise la configuracion con `arcli config` o corra `arcli config revisar`.';
|
|
21
|
+
case 'INPUT_VALIDATION_ERROR':
|
|
22
|
+
return 'Revise los parametros del comando con `ayuda` e intente nuevamente.';
|
|
23
|
+
default:
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function detectTransientError(message) {
|
|
28
|
+
if (message.includes('coe.alreadyAuthenticated')) {
|
|
29
|
+
return {
|
|
30
|
+
sugerencia: 'WSAA informo que ya existe un TA valido para este servicio. Espere unos segundos y vuelva a intentar sin cambiar el payload.',
|
|
31
|
+
title: 'Error transitorio WSAA',
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
if (message.includes('Transacción Activa')) {
|
|
35
|
+
return {
|
|
36
|
+
sugerencia: 'ARCA devolvio una transaccion activa. Espere unos segundos y reintente la emision antes de modificar datos del comprobante.',
|
|
37
|
+
title: 'Error transitorio ARCA',
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
function formatErrorDetails(details) {
|
|
43
|
+
if (!details) {
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
return Object.entries(details)
|
|
47
|
+
.filter(([, value]) => value !== null && value !== undefined && value !== '')
|
|
48
|
+
.map(([key, value]) => {
|
|
49
|
+
const label = key === 'path' ? 'Ruta' : key;
|
|
50
|
+
return `${bold(`${label}:`)} ${String(value)}`;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function formatErrorDetailsAsJson(details) {
|
|
54
|
+
if (!details) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
return Object.fromEntries(Object.entries(details)
|
|
58
|
+
.filter(([, value]) => value !== null && value !== undefined && value !== '')
|
|
59
|
+
.map(([key, value]) => [key === 'path' ? 'ruta' : key, value]));
|
|
60
|
+
}
|
|
61
|
+
export function formatCliError(error, useJson) {
|
|
62
|
+
if (error instanceof ZodError) {
|
|
63
|
+
return formatZodError(error, useJson);
|
|
64
|
+
}
|
|
65
|
+
if (error instanceof AppError) {
|
|
66
|
+
if (useJson) {
|
|
67
|
+
return renderJson({
|
|
68
|
+
codigo: error.code,
|
|
69
|
+
detalles: formatErrorDetailsAsJson(error.details),
|
|
70
|
+
error: error.message,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
const details = formatErrorDetails(error.details);
|
|
74
|
+
const hint = formatErrorHint(error);
|
|
75
|
+
return errorPanel(formatErrorTitle(error.code), error.message, details, hint ?? undefined);
|
|
76
|
+
}
|
|
77
|
+
const message = error instanceof Error ? error.message : 'Ocurrio un error inesperado.';
|
|
78
|
+
const transientError = detectTransientError(message);
|
|
79
|
+
if (useJson) {
|
|
80
|
+
return renderJson({
|
|
81
|
+
codigo: transientError ? 'TRANSIENT_ERROR' : 'UNEXPECTED_ERROR',
|
|
82
|
+
detalles: null,
|
|
83
|
+
error: message,
|
|
84
|
+
sugerencia: transientError?.sugerencia ?? null,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
return errorPanel(transientError?.title ?? 'Error inesperado', message, [], transientError?.sugerencia ?? 'Si el problema persiste, revise la configuracion o reintente con mas contexto.');
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=errors.presenter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.presenter.js","sourceRoot":"","sources":["../../../src/ui/presenters/errors.presenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MA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AAU,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,IAAI,SAAS,CAAC,CAAC;IAC7F,CAAC;IAED,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,8BAA8B,CAAC;IACxF,MAAM,cAAc,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAErD,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,UAAU,CAAC;YAChB,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,kBAAkB;YAC/D,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,OAAO;YACd,UAAU,EAAE,cAAc,EAAE,UAAU,IAAI,IAAI;SAC/C,CAAC,CAAC;IACL,CAAC;IAED,OAAO,UAAU,CACf,cAAc,EAAE,KAAK,IAAI,kBAAkB,EAC3C,OAAO,EACP,EAAE,EACF,cAAc,EAAE,UAAU,IAAI,gFAAgF,CAC/G,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { errorPanel } from '../components/errorPanel.js';
|
|
2
|
+
import { renderJson } from '../primitives/renderJson.js';
|
|
3
|
+
import { bold } from '../primitives/text.js';
|
|
4
|
+
const ZOD_PATH_LABELS = {
|
|
5
|
+
associatedPeriod: 'periodo asociado',
|
|
6
|
+
associatedVoucher: 'comprobante asociado',
|
|
7
|
+
billingDate: 'fecha del comprobante',
|
|
8
|
+
cancellation: 'anulacion',
|
|
9
|
+
cbu: 'CBU',
|
|
10
|
+
cbuAlias: 'alias del CBU',
|
|
11
|
+
concept: 'concepto',
|
|
12
|
+
currencyCode: 'moneda',
|
|
13
|
+
documentNumber: 'numero de documento',
|
|
14
|
+
documentType: 'tipo de documento',
|
|
15
|
+
dueDay: 'dia de vencimiento',
|
|
16
|
+
exchangeRate: 'cotizacion',
|
|
17
|
+
exemptAmount: 'importe exento',
|
|
18
|
+
ivaRate: 'alicuota de IVA',
|
|
19
|
+
ivaCondition: 'IVA receptor',
|
|
20
|
+
paymentDueDate: 'vencimiento de pago',
|
|
21
|
+
pointOfSale: 'punto de venta',
|
|
22
|
+
sameCurrency: 'misma moneda',
|
|
23
|
+
serviceEndDate: 'servicio hasta',
|
|
24
|
+
serviceStartDate: 'servicio desde',
|
|
25
|
+
totalAmount: 'monto',
|
|
26
|
+
transferMode: 'modalidad de transferencia',
|
|
27
|
+
untaxedAmount: 'importe no gravado',
|
|
28
|
+
};
|
|
29
|
+
const ZOD_PUBLIC_PATHS = {
|
|
30
|
+
associatedPeriod: ['periodoAsociado'],
|
|
31
|
+
associatedVoucher: ['comprobanteAsociado'],
|
|
32
|
+
billingDate: ['fechaComprobante'],
|
|
33
|
+
cancellation: ['anulacion'],
|
|
34
|
+
cbu: ['cbu'],
|
|
35
|
+
cbuAlias: ['aliasCbu'],
|
|
36
|
+
concept: ['concepto'],
|
|
37
|
+
currencyCode: ['codigoMoneda'],
|
|
38
|
+
documentNumber: ['numeroDocumento'],
|
|
39
|
+
documentType: ['tipoDocumento'],
|
|
40
|
+
dueDay: ['dia'],
|
|
41
|
+
exchangeRate: ['cotizacionMoneda'],
|
|
42
|
+
exemptAmount: ['importeExento'],
|
|
43
|
+
ivaRate: ['alicuotaIva'],
|
|
44
|
+
ivaCondition: ['ivaReceptor'],
|
|
45
|
+
paymentDueDate: ['vencimientoPago'],
|
|
46
|
+
pointOfSale: ['puntoVenta'],
|
|
47
|
+
sameCurrency: ['mismaMoneda'],
|
|
48
|
+
serviceEndDate: ['servicioHasta'],
|
|
49
|
+
serviceStartDate: ['servicioDesde'],
|
|
50
|
+
totalAmount: ['montoTotal'],
|
|
51
|
+
transferMode: ['transferencia'],
|
|
52
|
+
untaxedAmount: ['importeNoGravado'],
|
|
53
|
+
};
|
|
54
|
+
function formatZodIssuePath(path) {
|
|
55
|
+
if (path.length === 0) {
|
|
56
|
+
return 'Entrada';
|
|
57
|
+
}
|
|
58
|
+
return path.map((segment) => String(segment)).join('.');
|
|
59
|
+
}
|
|
60
|
+
function humanizeZodIssue(issue) {
|
|
61
|
+
const pathKey = formatZodIssuePath(issue.path);
|
|
62
|
+
const label = ZOD_PATH_LABELS[pathKey] ?? pathKey;
|
|
63
|
+
if (issue.code === 'invalid_type' && issue.input === undefined) {
|
|
64
|
+
return `Falta ${label}.`;
|
|
65
|
+
}
|
|
66
|
+
if (issue.code === 'too_small' && typeof issue.minimum === 'number') {
|
|
67
|
+
if (pathKey === 'totalAmount') {
|
|
68
|
+
return 'El monto debe ser mayor a 0.';
|
|
69
|
+
}
|
|
70
|
+
return `${label[0]?.toUpperCase() ?? ''}${label.slice(1)} debe ser mayor a ${issue.minimum}.`;
|
|
71
|
+
}
|
|
72
|
+
if (issue.code === 'invalid_value') {
|
|
73
|
+
const allowedValues = issue.values.map((value) => String(value)).join(', ');
|
|
74
|
+
return `${label[0]?.toUpperCase() ?? ''}${label.slice(1)} tiene un valor no soportado. Valores validos: ${allowedValues}.`;
|
|
75
|
+
}
|
|
76
|
+
if (issue.code === 'invalid_type') {
|
|
77
|
+
return `${label[0]?.toUpperCase() ?? ''}${label.slice(1)} tiene un formato invalido.`;
|
|
78
|
+
}
|
|
79
|
+
return issue.message;
|
|
80
|
+
}
|
|
81
|
+
function formatPublicIssuePath(path) {
|
|
82
|
+
const pathKey = formatZodIssuePath(path);
|
|
83
|
+
return ZOD_PUBLIC_PATHS[pathKey] ?? path.map((segment) => String(segment));
|
|
84
|
+
}
|
|
85
|
+
export function formatZodError(error, useJson) {
|
|
86
|
+
if (useJson) {
|
|
87
|
+
return renderJson({
|
|
88
|
+
codigo: 'INPUT_VALIDATION_ERROR',
|
|
89
|
+
detalles: error.issues.map((issue) => ({
|
|
90
|
+
mensaje: humanizeZodIssue(issue),
|
|
91
|
+
ruta: formatPublicIssuePath(issue.path),
|
|
92
|
+
})),
|
|
93
|
+
error: 'Hay parametros invalidos o incompletos en la entrada.',
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
const detailLines = error.issues.map((issue) => {
|
|
97
|
+
const pathKey = formatZodIssuePath(issue.path);
|
|
98
|
+
const label = ZOD_PATH_LABELS[pathKey] ?? pathKey;
|
|
99
|
+
return `${bold(`${label}:`)} ${humanizeZodIssue(issue)}`;
|
|
100
|
+
});
|
|
101
|
+
return errorPanel('Error de entrada', 'Hay parametros invalidos o incompletos en la entrada.', detailLines, 'Revise los parametros del comando con `ayuda` e intente nuevamente.');
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=errors.zod-presenter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.zod-presenter.js","sourceRoot":"","sources":["../../../src/ui/presenters/errors.zod-presenter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,eAAe,GAA2B;IAC9C,gBAAgB,EAAE,kBAAkB;IACpC,iBAAiB,EAAE,sBAAsB;IACzC,WAAW,EAAE,uBAAuB;IACpC,YAAY,EAAE,WAAW;IACzB,GAAG,EAAE,KAAK;IACV,QAAQ,EAAE,eAAe;IACzB,OAAO,EAAE,UAAU;IACnB,YAAY,EAAE,QAAQ;IACtB,cAAc,EAAE,qBAAqB;IACrC,YAAY,EAAE,mBAAmB;IACjC,MAAM,EAAE,oBAAoB;IAC5B,YAAY,EAAE,YAAY;IAC1B,YAAY,EAAE,gBAAgB;IAC9B,OAAO,EAAE,iBAAiB;IAC1B,YAAY,EAAE,cAAc;IAC5B,cAAc,EAAE,qBAAqB;IACrC,WAAW,EAAE,gBAAgB;IAC7B,YAAY,EAAE,cAAc;IAC5B,cAAc,EAAE,gBAAgB;IAChC,gBAAgB,EAAE,gBAAgB;IAClC,W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AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { renderStorybookShowcase, type StorybookScene } from '../../modules/storybook/showcase';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"showcase.presenter.js","sourceRoot":"","sources":["../../../src/ui/presenters/showcase.presenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAuB,MAAM,kCAAkC,CAAC"}
|