arcli 2.1.0 → 2.2.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.
- package/CHANGELOG.md +67 -1
- package/README.md +37 -2
- package/dist/cli/arca-runtime.js +0 -1
- package/dist/cli/commands/billing-family.command.js +36 -9
- package/dist/cli/commands/billing-shortcuts.command.js +8 -2
- package/dist/cli/commands/billing.command.batch.js +0 -1
- package/dist/cli/commands/billing.command.interactive-preview.js +9 -13
- package/dist/cli/commands/billing.command.options.js +83 -39
- package/dist/cli/commands/billing.command.output.js +0 -1
- package/dist/cli/commands/billing.command.parser.js +18 -17
- package/dist/cli/commands/billing.command.pdf.js +9 -6
- package/dist/cli/commands/billing.command.shared.js +2 -2
- package/dist/cli/commands/billing.command.shortcuts.js +3 -4
- package/dist/cli/commands/completion.command.js +140 -0
- package/dist/cli/commands/config.command.js +9 -10
- package/dist/cli/commands/cuit-argument.js +6 -6
- package/dist/cli/commands/examples.command.js +0 -1
- package/dist/cli/commands/export-shortcut.command.js +19 -0
- package/dist/cli/commands/export.command.js +106 -0
- package/dist/cli/commands/export.command.options.js +140 -0
- package/dist/cli/commands/export.command.parser.js +84 -0
- package/dist/cli/commands/export.command.pdf.js +61 -0
- package/dist/cli/commands/fce-obligation.command.js +2 -3
- package/dist/cli/commands/interactive.command.js +2 -3
- package/dist/cli/commands/padron.command.js +5 -6
- package/dist/cli/commands/parameters.command.js +5 -6
- package/dist/cli/commands/pdf.command.js +1 -2
- package/dist/cli/commands/storybook.command.js +4 -4
- package/dist/cli/commands/vouchers.command.js +9 -9
- package/dist/cli/error-output.js +21 -3
- package/dist/cli/global-options.js +2 -3
- package/dist/cli/help-argv.js +0 -1
- package/dist/cli/help.js +186 -380
- package/dist/cli/ignored-global-options.js +1 -2
- package/dist/cli/index.js +5 -3
- package/dist/cli/interactive/advanced-options.js +13 -14
- package/dist/cli/interactive/config.flow.js +55 -17
- package/dist/cli/interactive/export.flow.js +263 -0
- package/dist/cli/interactive/history.flow.js +2 -3
- package/dist/cli/interactive/interactive-mode.js +16 -17
- package/dist/cli/interactive/invoice-picker.js +7 -7
- package/dist/cli/interactive/invoice.flow.js +32 -11
- package/dist/cli/interactive/note.flow.js +12 -13
- package/dist/cli/interactive/pdf.flow.js +9 -7
- package/dist/cli/interactive/prompts.js +0 -1
- package/dist/cli/interactive/receiver-padron.js +3 -4
- package/dist/cli/interactive/repeat.flow.js +7 -8
- package/dist/cli/interactive/session.js +9 -7
- package/dist/cli/interactive/status.flow.js +0 -1
- package/dist/cli/interactive/update.flow.js +0 -1
- package/dist/cli/interactive/validators.js +7 -6
- package/dist/cli/option-parsers.js +14 -4
- package/dist/cli/program.js +6 -3
- package/dist/cli/skipped-options.js +14 -0
- package/dist/cli/spinner.js +0 -1
- package/dist/cli/types.js +0 -1
- package/dist/cli/version.js +1 -2
- package/dist/index.js +0 -1
- package/dist/lib/dates/arca-date.js +3 -4
- package/dist/lib/errors/app-error.js +0 -1
- package/dist/lib/files/read-json-file.js +2 -3
- package/dist/lib/files/restrict-to-owner.js +0 -1
- package/dist/lib/files/write-new-file.js +0 -1
- package/dist/lib/identity/cuit.js +26 -0
- package/dist/lib/identity/format-cuit.js +1 -2
- package/dist/lib/links.js +0 -1
- package/dist/lib/numbers/argentine-amount.js +3 -4
- package/dist/lib/numbers/strict-integer.js +0 -1
- package/dist/lib/paths/mask-path.js +0 -1
- package/dist/lib/security/certificate.js +0 -1
- package/dist/lib/security/pem.js +2 -3
- package/dist/modules/billing/billing-response.js +6 -7
- package/dist/modules/billing/billing.amounts.js +3 -4
- package/dist/modules/billing/billing.associated-period.js +7 -8
- package/dist/modules/billing/billing.associated-vouchers.js +5 -6
- package/dist/modules/billing/billing.batch.js +7 -6
- package/dist/modules/billing/billing.constants.js +0 -1
- package/dist/modules/billing/billing.currency.js +4 -5
- package/dist/modules/billing/billing.date-range.js +1 -2
- package/dist/modules/billing/billing.display.js +10 -8
- package/dist/modules/billing/billing.errors.js +2 -3
- package/dist/modules/billing/billing.fce.js +3 -4
- package/dist/modules/billing/billing.iva-receptor.js +2 -3
- package/dist/modules/billing/billing.json-format.js +0 -1
- package/dist/modules/billing/billing.json-input.js +5 -6
- package/dist/modules/billing/billing.labels.js +1 -2
- package/dist/modules/billing/billing.mappers.js +0 -1
- package/dist/modules/billing/billing.padron.js +9 -5
- package/dist/modules/billing/billing.presenter.js +0 -1
- package/dist/modules/billing/billing.schemas.js +14 -6
- package/dist/modules/billing/billing.serialize.js +6 -3
- package/dist/modules/billing/billing.service.js +4 -4
- package/dist/modules/billing/billing.text.js +0 -1
- package/dist/modules/billing/billing.types.internal.js +0 -1
- package/dist/modules/billing/billing.types.js +0 -1
- package/dist/modules/billing/billing.validation.js +13 -11
- package/dist/modules/billing/voucher-kind-map.js +15 -16
- package/dist/modules/completion/completion.js +53 -0
- package/dist/modules/completion/completion.presenter.js +35 -0
- package/dist/modules/completion/installer.js +92 -0
- package/dist/modules/completion/shell-scripts.js +46 -0
- package/dist/modules/config/certificate-expiry.js +3 -4
- package/dist/modules/config/config-doctor.js +36 -14
- package/dist/modules/config/config-value-parser.js +29 -16
- package/dist/modules/config/config.export-credentials.js +23 -0
- package/dist/modules/config/config.presenter.js +22 -6
- package/dist/modules/config/config.schemas.js +24 -12
- package/dist/modules/config/config.sections.js +26 -11
- package/dist/modules/config/config.service.js +6 -2
- package/dist/modules/examples/examples.js +44 -10
- package/dist/modules/export/export.items.js +149 -0
- package/dist/modules/export/export.json-input.js +91 -0
- package/dist/modules/export/export.mappers.js +293 -0
- package/dist/modules/export/export.presenter.js +2 -0
- package/dist/modules/export/export.response.js +86 -0
- package/dist/modules/export/export.serialize.js +70 -0
- package/dist/modules/export/export.service.js +146 -0
- package/dist/modules/export/export.text.js +177 -0
- package/dist/modules/export/export.types.js +36 -0
- package/dist/modules/fce/fce-obligation.js +3 -4
- package/dist/modules/fce/fce-obligation.presenter.js +2 -3
- package/dist/modules/interactive/amount-input.js +0 -1
- package/dist/modules/interactive/choices.js +10 -2
- package/dist/modules/interactive/config-fields.js +11 -3
- package/dist/modules/interactive/equivalent-command.js +4 -1
- package/dist/modules/interactive/export-equivalent-command.js +40 -0
- package/dist/modules/interactive/invoice-copy.js +1 -2
- package/dist/modules/interactive/periods.js +0 -1
- package/dist/modules/interactive/wizard.js +0 -1
- package/dist/modules/padron/padron.js +0 -1
- package/dist/modules/padron/padron.presenter.js +6 -7
- package/dist/modules/parameters/health.js +0 -1
- package/dist/modules/parameters/parameters.js +2 -3
- package/dist/modules/parameters/parameters.presenter.js +12 -13
- package/dist/modules/parameters/status.js +0 -1
- package/dist/modules/pdf/pdf-data.mapper.js +94 -3
- package/dist/modules/pdf/pdf-decision.js +0 -1
- package/dist/modules/pdf/pdf-file-name.js +0 -1
- package/dist/modules/pdf/pdf-issuer.js +3 -3
- package/dist/modules/pdf/pdf-legends.js +35 -0
- package/dist/modules/pdf/pdf.errors.js +0 -1
- package/dist/modules/pdf/pdf.types.js +0 -1
- package/dist/modules/storybook/showcase-theme.js +0 -1
- package/dist/modules/storybook/showcase.js +20 -21
- package/dist/modules/update-check/changelog.js +0 -1
- package/dist/modules/update-check/update-check.presenter.js +6 -7
- package/dist/modules/update-check/update-check.service.js +0 -1
- package/dist/modules/vouchers/voucher-history.js +0 -1
- package/dist/modules/vouchers/voucher-history.presenter.js +3 -4
- package/dist/services/arca/arca-billing.gateway.js +4 -5
- package/dist/services/arca/arca-client.factory.js +23 -2
- package/dist/services/arca/arca-context.resolver.js +5 -6
- package/dist/services/arca/arca-export.gateway.js +146 -0
- package/dist/services/arca/arca-fce-obligation.gateway.js +2 -3
- package/dist/services/arca/arca-padron.gateway.js +1 -2
- package/dist/services/arca/arca-parameters.gateway.js +2 -3
- package/dist/services/arca/arca-voucher-history.gateway.js +2 -3
- package/dist/services/arca/last-voucher.js +26 -0
- package/dist/services/clipboard/clipboard.js +0 -1
- package/dist/services/pdf/escape-html.js +0 -1
- package/dist/services/pdf/pdf-browser.js +0 -1
- package/dist/services/pdf/pdf-exporter.js +15 -2
- package/dist/services/pdf/pdf-plugin.js +45 -16
- package/dist/ui/components/certificateBanner.js +0 -1
- package/dist/ui/components/contentPanel.js +0 -1
- package/dist/ui/components/errorPanel.js +0 -1
- package/dist/ui/components/index.js +0 -1
- package/dist/ui/components/keyValuePanel.js +0 -1
- package/dist/ui/components/noticePanel.js +0 -1
- package/dist/ui/components/rawPanel.js +0 -1
- package/dist/ui/components/sectionHeading.js +0 -1
- package/dist/ui/components/statusBar.js +0 -1
- package/dist/ui/components/statusPanel.js +0 -1
- package/dist/ui/components/testingBanner.js +0 -1
- package/dist/ui/index.js +0 -1
- package/dist/ui/presenters/billing.presenter.js +0 -1
- package/dist/ui/presenters/config.presenter.js +0 -1
- package/dist/ui/presenters/errors.presenter.js +10 -11
- package/dist/ui/presenters/errors.zod-presenter.js +8 -9
- package/dist/ui/presenters/export.presenter.js +1 -0
- package/dist/ui/presenters/index.js +1 -1
- package/dist/ui/presenters/pdf.presenter.js +1 -2
- package/dist/ui/presenters/showcase.presenter.js +0 -1
- package/dist/ui/primitives/index.js +0 -1
- package/dist/ui/primitives/renderDivider.js +0 -1
- package/dist/ui/primitives/renderFooter.js +0 -1
- package/dist/ui/primitives/renderJson.js +0 -1
- package/dist/ui/primitives/renderKeyValue.js +0 -1
- package/dist/ui/primitives/renderLogo.js +0 -1
- package/dist/ui/primitives/renderObject.js +0 -1
- package/dist/ui/primitives/renderPanel.js +0 -1
- package/dist/ui/primitives/renderSubtitle.js +0 -1
- package/dist/ui/primitives/renderTable.js +0 -1
- package/dist/ui/primitives/terminalWidth.js +0 -1
- package/dist/ui/primitives/text.js +0 -1
- package/dist/ui/stream/index.js +0 -1
- package/dist/ui/stream/terminal-stream.js +0 -1
- package/dist/ui/theme/index.js +0 -1
- package/dist/ui/theme/theme.js +0 -1
- package/llms.txt +64 -5
- package/package.json +1 -2
- package/dist/cli/arca-runtime.d.ts +0 -20
- package/dist/cli/arca-runtime.js.map +0 -1
- package/dist/cli/commands/billing-family.command.d.ts +0 -2
- package/dist/cli/commands/billing-family.command.js.map +0 -1
- package/dist/cli/commands/billing-shortcuts.command.d.ts +0 -2
- package/dist/cli/commands/billing-shortcuts.command.js.map +0 -1
- package/dist/cli/commands/billing.command.batch.d.ts +0 -32
- package/dist/cli/commands/billing.command.batch.js.map +0 -1
- package/dist/cli/commands/billing.command.interactive-preview.d.ts +0 -18
- package/dist/cli/commands/billing.command.interactive-preview.js.map +0 -1
- package/dist/cli/commands/billing.command.options.d.ts +0 -2
- package/dist/cli/commands/billing.command.options.js.map +0 -1
- package/dist/cli/commands/billing.command.output.d.ts +0 -18
- package/dist/cli/commands/billing.command.output.js.map +0 -1
- package/dist/cli/commands/billing.command.parser.d.ts +0 -35
- package/dist/cli/commands/billing.command.parser.js.map +0 -1
- package/dist/cli/commands/billing.command.pdf.d.ts +0 -24
- package/dist/cli/commands/billing.command.pdf.js.map +0 -1
- package/dist/cli/commands/billing.command.shared.d.ts +0 -26
- package/dist/cli/commands/billing.command.shared.js.map +0 -1
- package/dist/cli/commands/billing.command.shortcuts.d.ts +0 -7
- package/dist/cli/commands/billing.command.shortcuts.js.map +0 -1
- package/dist/cli/commands/config.command.d.ts +0 -6
- package/dist/cli/commands/config.command.js.map +0 -1
- package/dist/cli/commands/cuit-argument.d.ts +0 -2
- package/dist/cli/commands/cuit-argument.js.map +0 -1
- package/dist/cli/commands/examples.command.d.ts +0 -2
- package/dist/cli/commands/examples.command.js.map +0 -1
- package/dist/cli/commands/fce-obligation.command.d.ts +0 -2
- package/dist/cli/commands/fce-obligation.command.js.map +0 -1
- package/dist/cli/commands/interactive.command.d.ts +0 -3
- package/dist/cli/commands/interactive.command.js.map +0 -1
- package/dist/cli/commands/padron.command.d.ts +0 -2
- package/dist/cli/commands/padron.command.js.map +0 -1
- package/dist/cli/commands/parameters.command.d.ts +0 -2
- package/dist/cli/commands/parameters.command.js.map +0 -1
- package/dist/cli/commands/pdf.command.d.ts +0 -2
- package/dist/cli/commands/pdf.command.js.map +0 -1
- package/dist/cli/commands/storybook.command.d.ts +0 -2
- package/dist/cli/commands/storybook.command.js.map +0 -1
- package/dist/cli/commands/vouchers.command.d.ts +0 -2
- package/dist/cli/commands/vouchers.command.js.map +0 -1
- package/dist/cli/error-output.d.ts +0 -25
- package/dist/cli/error-output.js.map +0 -1
- package/dist/cli/global-options.d.ts +0 -26
- package/dist/cli/global-options.js.map +0 -1
- package/dist/cli/help-argv.d.ts +0 -5
- package/dist/cli/help-argv.js.map +0 -1
- package/dist/cli/help.d.ts +0 -14
- package/dist/cli/help.js.map +0 -1
- package/dist/cli/ignored-global-options.d.ts +0 -6
- package/dist/cli/ignored-global-options.js.map +0 -1
- package/dist/cli/index.d.ts +0 -2
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/interactive/advanced-options.d.ts +0 -21
- package/dist/cli/interactive/advanced-options.js.map +0 -1
- package/dist/cli/interactive/config.flow.d.ts +0 -4
- package/dist/cli/interactive/config.flow.js.map +0 -1
- package/dist/cli/interactive/history.flow.d.ts +0 -6
- package/dist/cli/interactive/history.flow.js.map +0 -1
- package/dist/cli/interactive/interactive-mode.d.ts +0 -3
- package/dist/cli/interactive/interactive-mode.js.map +0 -1
- package/dist/cli/interactive/invoice-picker.d.ts +0 -25
- package/dist/cli/interactive/invoice-picker.js.map +0 -1
- package/dist/cli/interactive/invoice.flow.d.ts +0 -22
- package/dist/cli/interactive/invoice.flow.js.map +0 -1
- package/dist/cli/interactive/note.flow.d.ts +0 -34
- package/dist/cli/interactive/note.flow.js.map +0 -1
- package/dist/cli/interactive/pdf.flow.d.ts +0 -5
- package/dist/cli/interactive/pdf.flow.js.map +0 -1
- package/dist/cli/interactive/prompts.d.ts +0 -57
- package/dist/cli/interactive/prompts.js.map +0 -1
- package/dist/cli/interactive/receiver-padron.d.ts +0 -29
- package/dist/cli/interactive/receiver-padron.js.map +0 -1
- package/dist/cli/interactive/repeat.flow.d.ts +0 -13
- package/dist/cli/interactive/repeat.flow.js.map +0 -1
- package/dist/cli/interactive/session.d.ts +0 -22
- package/dist/cli/interactive/session.js.map +0 -1
- package/dist/cli/interactive/status.flow.d.ts +0 -3
- package/dist/cli/interactive/status.flow.js.map +0 -1
- package/dist/cli/interactive/update.flow.d.ts +0 -6
- package/dist/cli/interactive/update.flow.js.map +0 -1
- package/dist/cli/interactive/validators.d.ts +0 -9
- package/dist/cli/interactive/validators.js.map +0 -1
- package/dist/cli/option-parsers.d.ts +0 -6
- package/dist/cli/option-parsers.js.map +0 -1
- package/dist/cli/program.d.ts +0 -6
- package/dist/cli/program.js.map +0 -1
- package/dist/cli/spinner.d.ts +0 -8
- package/dist/cli/spinner.js.map +0 -1
- package/dist/cli/types.d.ts +0 -6
- package/dist/cli/types.js.map +0 -1
- package/dist/cli/version.d.ts +0 -1
- package/dist/cli/version.js.map +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/dates/arca-date.d.ts +0 -19
- package/dist/lib/dates/arca-date.js.map +0 -1
- package/dist/lib/errors/app-error.d.ts +0 -17
- package/dist/lib/errors/app-error.js.map +0 -1
- package/dist/lib/files/read-json-file.d.ts +0 -1
- package/dist/lib/files/read-json-file.js.map +0 -1
- package/dist/lib/files/restrict-to-owner.d.ts +0 -7
- package/dist/lib/files/restrict-to-owner.js.map +0 -1
- package/dist/lib/files/write-new-file.d.ts +0 -5
- package/dist/lib/files/write-new-file.js.map +0 -1
- package/dist/lib/identity/format-cuit.d.ts +0 -2
- package/dist/lib/identity/format-cuit.js.map +0 -1
- package/dist/lib/links.d.ts +0 -4
- package/dist/lib/links.js.map +0 -1
- package/dist/lib/numbers/argentine-amount.d.ts +0 -23
- package/dist/lib/numbers/argentine-amount.js.map +0 -1
- package/dist/lib/numbers/strict-integer.d.ts +0 -4
- package/dist/lib/numbers/strict-integer.js.map +0 -1
- package/dist/lib/paths/mask-path.d.ts +0 -1
- package/dist/lib/paths/mask-path.js.map +0 -1
- package/dist/lib/security/certificate.d.ts +0 -11
- package/dist/lib/security/certificate.js.map +0 -1
- package/dist/lib/security/pem.d.ts +0 -5
- package/dist/lib/security/pem.js.map +0 -1
- package/dist/modules/billing/billing-response.d.ts +0 -4
- package/dist/modules/billing/billing-response.js.map +0 -1
- package/dist/modules/billing/billing.amounts.d.ts +0 -21
- package/dist/modules/billing/billing.amounts.js.map +0 -1
- package/dist/modules/billing/billing.associated-period.d.ts +0 -8
- package/dist/modules/billing/billing.associated-period.js.map +0 -1
- package/dist/modules/billing/billing.associated-vouchers.d.ts +0 -12
- package/dist/modules/billing/billing.associated-vouchers.js.map +0 -1
- package/dist/modules/billing/billing.batch.d.ts +0 -23
- package/dist/modules/billing/billing.batch.js.map +0 -1
- package/dist/modules/billing/billing.constants.d.ts +0 -2
- package/dist/modules/billing/billing.constants.js.map +0 -1
- package/dist/modules/billing/billing.currency.d.ts +0 -18
- package/dist/modules/billing/billing.currency.js.map +0 -1
- package/dist/modules/billing/billing.date-range.d.ts +0 -9
- package/dist/modules/billing/billing.date-range.js.map +0 -1
- package/dist/modules/billing/billing.display.d.ts +0 -13
- package/dist/modules/billing/billing.display.js.map +0 -1
- package/dist/modules/billing/billing.errors.d.ts +0 -12
- package/dist/modules/billing/billing.errors.js.map +0 -1
- package/dist/modules/billing/billing.fce.d.ts +0 -21
- package/dist/modules/billing/billing.fce.js.map +0 -1
- package/dist/modules/billing/billing.iva-receptor.d.ts +0 -8
- package/dist/modules/billing/billing.iva-receptor.js.map +0 -1
- package/dist/modules/billing/billing.json-format.d.ts +0 -6
- package/dist/modules/billing/billing.json-format.js.map +0 -1
- package/dist/modules/billing/billing.json-input.d.ts +0 -58
- package/dist/modules/billing/billing.json-input.js.map +0 -1
- package/dist/modules/billing/billing.labels.d.ts +0 -9
- package/dist/modules/billing/billing.labels.js.map +0 -1
- package/dist/modules/billing/billing.mappers.d.ts +0 -8
- package/dist/modules/billing/billing.mappers.js.map +0 -1
- package/dist/modules/billing/billing.padron.d.ts +0 -14
- package/dist/modules/billing/billing.padron.js.map +0 -1
- package/dist/modules/billing/billing.presenter.d.ts +0 -7
- package/dist/modules/billing/billing.presenter.js.map +0 -1
- package/dist/modules/billing/billing.schemas.d.ts +0 -147
- package/dist/modules/billing/billing.schemas.js.map +0 -1
- package/dist/modules/billing/billing.serialize.d.ts +0 -9
- package/dist/modules/billing/billing.serialize.js.map +0 -1
- package/dist/modules/billing/billing.service.d.ts +0 -30
- package/dist/modules/billing/billing.service.js.map +0 -1
- package/dist/modules/billing/billing.text.d.ts +0 -8
- package/dist/modules/billing/billing.text.js.map +0 -1
- package/dist/modules/billing/billing.types.d.ts +0 -13
- package/dist/modules/billing/billing.types.internal.d.ts +0 -38
- package/dist/modules/billing/billing.types.internal.js.map +0 -1
- package/dist/modules/billing/billing.types.js.map +0 -1
- package/dist/modules/billing/billing.validation.d.ts +0 -7
- package/dist/modules/billing/billing.validation.js.map +0 -1
- package/dist/modules/billing/voucher-kind-map.d.ts +0 -9
- package/dist/modules/billing/voucher-kind-map.js.map +0 -1
- package/dist/modules/config/certificate-expiry.d.ts +0 -42
- package/dist/modules/config/certificate-expiry.js.map +0 -1
- package/dist/modules/config/config-doctor.d.ts +0 -16
- package/dist/modules/config/config-doctor.js.map +0 -1
- package/dist/modules/config/config-value-parser.d.ts +0 -2
- package/dist/modules/config/config-value-parser.js.map +0 -1
- package/dist/modules/config/config.presenter.d.ts +0 -17
- package/dist/modules/config/config.presenter.js.map +0 -1
- package/dist/modules/config/config.schemas.d.ts +0 -156
- package/dist/modules/config/config.schemas.js.map +0 -1
- package/dist/modules/config/config.sections.d.ts +0 -14
- package/dist/modules/config/config.sections.js.map +0 -1
- package/dist/modules/config/config.service.d.ts +0 -35
- package/dist/modules/config/config.service.js.map +0 -1
- package/dist/modules/examples/examples.d.ts +0 -6
- package/dist/modules/examples/examples.js.map +0 -1
- package/dist/modules/fce/fce-obligation.d.ts +0 -20
- package/dist/modules/fce/fce-obligation.js.map +0 -1
- package/dist/modules/fce/fce-obligation.presenter.d.ts +0 -9
- package/dist/modules/fce/fce-obligation.presenter.js.map +0 -1
- package/dist/modules/interactive/amount-input.d.ts +0 -4
- package/dist/modules/interactive/amount-input.js.map +0 -1
- package/dist/modules/interactive/choices.d.ts +0 -13
- package/dist/modules/interactive/choices.js.map +0 -1
- package/dist/modules/interactive/config-fields.d.ts +0 -20
- package/dist/modules/interactive/config-fields.js.map +0 -1
- package/dist/modules/interactive/equivalent-command.d.ts +0 -8
- package/dist/modules/interactive/equivalent-command.js.map +0 -1
- package/dist/modules/interactive/invoice-copy.d.ts +0 -19
- package/dist/modules/interactive/invoice-copy.js.map +0 -1
- package/dist/modules/interactive/periods.d.ts +0 -7
- package/dist/modules/interactive/periods.js.map +0 -1
- package/dist/modules/interactive/wizard.d.ts +0 -16
- package/dist/modules/interactive/wizard.js.map +0 -1
- package/dist/modules/padron/padron.d.ts +0 -46
- package/dist/modules/padron/padron.js.map +0 -1
- package/dist/modules/padron/padron.presenter.d.ts +0 -7
- package/dist/modules/padron/padron.presenter.js.map +0 -1
- package/dist/modules/parameters/health.d.ts +0 -17
- package/dist/modules/parameters/health.js.map +0 -1
- package/dist/modules/parameters/parameters.d.ts +0 -50
- package/dist/modules/parameters/parameters.js.map +0 -1
- package/dist/modules/parameters/parameters.presenter.d.ts +0 -12
- package/dist/modules/parameters/parameters.presenter.js.map +0 -1
- package/dist/modules/parameters/status.d.ts +0 -31
- package/dist/modules/parameters/status.js.map +0 -1
- package/dist/modules/pdf/pdf-data.mapper.d.ts +0 -4
- package/dist/modules/pdf/pdf-data.mapper.js.map +0 -1
- package/dist/modules/pdf/pdf-decision.d.ts +0 -14
- package/dist/modules/pdf/pdf-decision.js.map +0 -1
- package/dist/modules/pdf/pdf-file-name.d.ts +0 -3
- package/dist/modules/pdf/pdf-file-name.js.map +0 -1
- package/dist/modules/pdf/pdf-issuer.d.ts +0 -8
- package/dist/modules/pdf/pdf-issuer.js.map +0 -1
- package/dist/modules/pdf/pdf.errors.d.ts +0 -9
- package/dist/modules/pdf/pdf.errors.js.map +0 -1
- package/dist/modules/pdf/pdf.types.d.ts +0 -91
- package/dist/modules/pdf/pdf.types.js.map +0 -1
- package/dist/modules/storybook/showcase-theme.d.ts +0 -7
- package/dist/modules/storybook/showcase-theme.js.map +0 -1
- package/dist/modules/storybook/showcase.d.ts +0 -2
- package/dist/modules/storybook/showcase.js.map +0 -1
- package/dist/modules/update-check/changelog.d.ts +0 -23
- package/dist/modules/update-check/changelog.js.map +0 -1
- package/dist/modules/update-check/update-check.presenter.d.ts +0 -6
- package/dist/modules/update-check/update-check.presenter.js.map +0 -1
- package/dist/modules/update-check/update-check.service.d.ts +0 -11
- package/dist/modules/update-check/update-check.service.js.map +0 -1
- package/dist/modules/vouchers/voucher-history.d.ts +0 -39
- package/dist/modules/vouchers/voucher-history.js.map +0 -1
- package/dist/modules/vouchers/voucher-history.presenter.d.ts +0 -29
- package/dist/modules/vouchers/voucher-history.presenter.js.map +0 -1
- package/dist/services/arca/arca-billing.gateway.d.ts +0 -16
- package/dist/services/arca/arca-billing.gateway.js.map +0 -1
- package/dist/services/arca/arca-client.factory.d.ts +0 -6
- package/dist/services/arca/arca-client.factory.js.map +0 -1
- package/dist/services/arca/arca-context.resolver.d.ts +0 -55
- package/dist/services/arca/arca-context.resolver.js.map +0 -1
- package/dist/services/arca/arca-fce-obligation.gateway.d.ts +0 -7
- package/dist/services/arca/arca-fce-obligation.gateway.js.map +0 -1
- package/dist/services/arca/arca-padron.gateway.d.ts +0 -9
- package/dist/services/arca/arca-padron.gateway.js.map +0 -1
- package/dist/services/arca/arca-parameters.gateway.d.ts +0 -10
- package/dist/services/arca/arca-parameters.gateway.js.map +0 -1
- package/dist/services/arca/arca-voucher-history.gateway.d.ts +0 -8
- package/dist/services/arca/arca-voucher-history.gateway.js.map +0 -1
- package/dist/services/clipboard/clipboard.d.ts +0 -2
- package/dist/services/clipboard/clipboard.js.map +0 -1
- package/dist/services/pdf/escape-html.d.ts +0 -6
- package/dist/services/pdf/escape-html.js.map +0 -1
- package/dist/services/pdf/pdf-browser.d.ts +0 -5
- package/dist/services/pdf/pdf-browser.js.map +0 -1
- package/dist/services/pdf/pdf-exporter.d.ts +0 -22
- package/dist/services/pdf/pdf-exporter.js.map +0 -1
- package/dist/services/pdf/pdf-plugin.d.ts +0 -50
- package/dist/services/pdf/pdf-plugin.js.map +0 -1
- package/dist/ui/components/certificateBanner.d.ts +0 -11
- package/dist/ui/components/certificateBanner.js.map +0 -1
- package/dist/ui/components/contentPanel.d.ts +0 -5
- package/dist/ui/components/contentPanel.js.map +0 -1
- package/dist/ui/components/errorPanel.d.ts +0 -1
- package/dist/ui/components/errorPanel.js.map +0 -1
- package/dist/ui/components/index.d.ts +0 -10
- package/dist/ui/components/index.js.map +0 -1
- package/dist/ui/components/keyValuePanel.d.ts +0 -3
- package/dist/ui/components/keyValuePanel.js.map +0 -1
- package/dist/ui/components/noticePanel.d.ts +0 -3
- package/dist/ui/components/noticePanel.js.map +0 -1
- package/dist/ui/components/rawPanel.d.ts +0 -1
- package/dist/ui/components/rawPanel.js.map +0 -1
- package/dist/ui/components/sectionHeading.d.ts +0 -3
- package/dist/ui/components/sectionHeading.js.map +0 -1
- package/dist/ui/components/statusBar.d.ts +0 -19
- package/dist/ui/components/statusBar.js.map +0 -1
- package/dist/ui/components/statusPanel.d.ts +0 -3
- package/dist/ui/components/statusPanel.js.map +0 -1
- package/dist/ui/components/testingBanner.d.ts +0 -2
- package/dist/ui/components/testingBanner.js.map +0 -1
- package/dist/ui/index.d.ts +0 -5
- package/dist/ui/index.js.map +0 -1
- package/dist/ui/presenters/billing.presenter.d.ts +0 -2
- package/dist/ui/presenters/billing.presenter.js.map +0 -1
- package/dist/ui/presenters/config.presenter.d.ts +0 -1
- package/dist/ui/presenters/config.presenter.js.map +0 -1
- package/dist/ui/presenters/errors.presenter.d.ts +0 -1
- package/dist/ui/presenters/errors.presenter.js.map +0 -1
- package/dist/ui/presenters/errors.zod-presenter.d.ts +0 -4
- package/dist/ui/presenters/errors.zod-presenter.js.map +0 -1
- package/dist/ui/presenters/index.d.ts +0 -6
- package/dist/ui/presenters/index.js.map +0 -1
- package/dist/ui/presenters/pdf.presenter.d.ts +0 -13
- package/dist/ui/presenters/pdf.presenter.js.map +0 -1
- package/dist/ui/presenters/showcase.presenter.d.ts +0 -1
- package/dist/ui/presenters/showcase.presenter.js.map +0 -1
- package/dist/ui/primitives/index.d.ts +0 -10
- package/dist/ui/primitives/index.js.map +0 -1
- package/dist/ui/primitives/renderDivider.d.ts +0 -5
- package/dist/ui/primitives/renderDivider.js.map +0 -1
- package/dist/ui/primitives/renderFooter.d.ts +0 -7
- package/dist/ui/primitives/renderFooter.js.map +0 -1
- package/dist/ui/primitives/renderJson.d.ts +0 -3
- package/dist/ui/primitives/renderJson.js.map +0 -1
- package/dist/ui/primitives/renderKeyValue.d.ts +0 -14
- package/dist/ui/primitives/renderKeyValue.js.map +0 -1
- package/dist/ui/primitives/renderLogo.d.ts +0 -3
- package/dist/ui/primitives/renderLogo.js.map +0 -1
- package/dist/ui/primitives/renderObject.d.ts +0 -1
- package/dist/ui/primitives/renderObject.js.map +0 -1
- package/dist/ui/primitives/renderPanel.d.ts +0 -27
- package/dist/ui/primitives/renderPanel.js.map +0 -1
- package/dist/ui/primitives/renderSubtitle.d.ts +0 -7
- package/dist/ui/primitives/renderSubtitle.js.map +0 -1
- package/dist/ui/primitives/renderTable.d.ts +0 -6
- package/dist/ui/primitives/renderTable.js.map +0 -1
- package/dist/ui/primitives/terminalWidth.d.ts +0 -4
- package/dist/ui/primitives/terminalWidth.js.map +0 -1
- package/dist/ui/primitives/text.d.ts +0 -28
- package/dist/ui/primitives/text.js.map +0 -1
- package/dist/ui/stream/index.d.ts +0 -1
- package/dist/ui/stream/index.js.map +0 -1
- package/dist/ui/stream/terminal-stream.d.ts +0 -21
- package/dist/ui/stream/terminal-stream.js.map +0 -1
- package/dist/ui/theme/index.d.ts +0 -1
- package/dist/ui/theme/index.js.map +0 -1
- package/dist/ui/theme/theme.d.ts +0 -68
- package/dist/ui/theme/theme.js.map +0 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export const COMPLETION_SHELLS = ['bash', 'zsh', 'fish'];
|
|
2
|
+
/** Comando oculto que el script del shell llama en cada Tab. */
|
|
3
|
+
export const COMPLETE_COMMAND = '__completar';
|
|
4
|
+
/**
|
|
5
|
+
* Scripts minimos: cada Tab le pregunta a `arcli __completar` que sigue, asi la lista sale siempre de la version
|
|
6
|
+
* instalada. Sin candidatos, el shell completa rutas de archivo (para `--cargar` y las rutas de config).
|
|
7
|
+
*/
|
|
8
|
+
const SCRIPTS = {
|
|
9
|
+
bash: `# Autocompletado de arcli para bash. Activalo con: eval "$(arcli completado bash)"
|
|
10
|
+
_arcli_completar() {
|
|
11
|
+
# Copiadas antes de cambiar IFS: bash 3.2 (el de macOS) junta "\${arr[@]:1:n}" en una palabra si IFS cambio.
|
|
12
|
+
local palabras=("\${COMP_WORDS[@]:1:COMP_CWORD}")
|
|
13
|
+
local IFS=$'\\n'
|
|
14
|
+
COMPREPLY=($(arcli ${COMPLETE_COMMAND} -- "\${palabras[@]}" 2>/dev/null))
|
|
15
|
+
}
|
|
16
|
+
complete -o default -F _arcli_completar arcli
|
|
17
|
+
`,
|
|
18
|
+
fish: `# Autocompletado de arcli para fish. Activalo con: arcli completado fish | source
|
|
19
|
+
function __arcli_completar
|
|
20
|
+
set -l palabras (commandline -opc)[2..-1] (commandline -ct)
|
|
21
|
+
set -l candidatos (arcli ${COMPLETE_COMMAND} -- $palabras 2>/dev/null)
|
|
22
|
+
if test (count $candidatos) -gt 0
|
|
23
|
+
printf '%s\\n' $candidatos
|
|
24
|
+
else
|
|
25
|
+
__fish_complete_path (commandline -ct)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
complete -c arcli -f -a '(__arcli_completar)'
|
|
29
|
+
`,
|
|
30
|
+
zsh: `# Autocompletado de arcli para zsh. Activalo con: eval "$(arcli completado zsh)"
|
|
31
|
+
(( $+functions[compdef] )) || { autoload -Uz compinit && compinit; }
|
|
32
|
+
_arcli() {
|
|
33
|
+
local -a candidatos
|
|
34
|
+
candidatos=("\${(@f)$(arcli ${COMPLETE_COMMAND} -- "\${(@)words[2,CURRENT]}" 2>/dev/null)}")
|
|
35
|
+
if (( \${#candidatos} )) && [[ -n "\${candidatos[1]}" ]]; then
|
|
36
|
+
compadd -- "\${candidatos[@]}"
|
|
37
|
+
else
|
|
38
|
+
_files
|
|
39
|
+
fi
|
|
40
|
+
}
|
|
41
|
+
compdef _arcli arcli
|
|
42
|
+
`,
|
|
43
|
+
};
|
|
44
|
+
export function buildCompletionScript(shell) {
|
|
45
|
+
return SCRIPTS[shell];
|
|
46
|
+
}
|
|
@@ -3,7 +3,7 @@ import { formatArcaDateAsArgentineDate, formatDateAsArcaDate } from '../../lib/d
|
|
|
3
3
|
import { AppError } from '../../lib/errors/app-error.js';
|
|
4
4
|
import { CERTIFICATE_GUIDE_URL } from '../../lib/links.js';
|
|
5
5
|
import { isCertificateExpiringSoon, readCertificateExpiry, } from '../../lib/security/certificate.js';
|
|
6
|
-
import { arcliEnvironmentSchema } from './config.schemas.js';
|
|
6
|
+
import { arcliEnvironmentSchema, formatEnvironmentLabel } from './config.schemas.js';
|
|
7
7
|
/** A menos de estos dias de vencer, el certificado se avisa en cada comando y en `config revisar`. */
|
|
8
8
|
export const CERTIFICATE_EXPIRY_WARNING_DAYS = 30;
|
|
9
9
|
/** Fecha de vencimiento como dd/mm/aaaa del dia en Argentina. */
|
|
@@ -24,7 +24,7 @@ export function describeCertificateExpiry(expiry, environment) {
|
|
|
24
24
|
const status = expiry.isExpired
|
|
25
25
|
? `venció el ${expiresOn}`
|
|
26
26
|
: `vence el ${expiresOn} (${formatDaysRemaining(expiry.daysRemaining)})`;
|
|
27
|
-
const summary = `El certificado de ${environment} ${status}.`;
|
|
27
|
+
const summary = `El certificado de ${formatEnvironmentLabel(environment)} ${status}.`;
|
|
28
28
|
return {
|
|
29
29
|
daysRemaining: expiry.daysRemaining,
|
|
30
30
|
environment,
|
|
@@ -79,7 +79,7 @@ function readCertificateQuietly(filePath) {
|
|
|
79
79
|
export class CertificateExpiredError extends AppError {
|
|
80
80
|
notice;
|
|
81
81
|
constructor(notice) {
|
|
82
|
-
super(`El certificado de ${notice.environment} venció el ${notice.expiresOn}: ARCA no lo acepta.`, {
|
|
82
|
+
super(`El certificado de ${formatEnvironmentLabel(notice.environment)} venció el ${notice.expiresOn}: ARCA no lo acepta.`, {
|
|
83
83
|
code: 'CERTIFICATE_EXPIRED',
|
|
84
84
|
details: { entorno: notice.environment, vencimiento: notice.expiresOn },
|
|
85
85
|
suggestion: `Generá uno nuevo siguiendo la guía y cargalo con "arcli config establecer cert.${notice.environment} <ruta>": ${CERTIFICATE_GUIDE_URL}`,
|
|
@@ -88,4 +88,3 @@ export class CertificateExpiredError extends AppError {
|
|
|
88
88
|
this.notice = notice;
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
//# sourceMappingURL=certificate-expiry.js.map
|
|
@@ -3,6 +3,7 @@ import { isCertificateExpiringSoon, readCertificateExpiry } from '../../lib/secu
|
|
|
3
3
|
import { readPemFile } from '../../lib/security/pem.js';
|
|
4
4
|
import { listMissingIssuerKeys } from '../pdf/pdf-issuer.js';
|
|
5
5
|
import { CERTIFICATE_EXPIRY_WARNING_DAYS, formatCertificateExpiryDate } from './certificate-expiry.js';
|
|
6
|
+
import { arcliEnvironmentSchema, formatEnvironmentLabel, } from './config.schemas.js';
|
|
6
7
|
function buildCertificateExpiryCheck(label, certPath) {
|
|
7
8
|
if (!certPath) {
|
|
8
9
|
return null;
|
|
@@ -12,12 +13,12 @@ function buildCertificateExpiryCheck(label, certPath) {
|
|
|
12
13
|
const expiry = readCertificateExpiry(pemContent);
|
|
13
14
|
const formattedDate = formatCertificateExpiryDate(expiry.expiresAt);
|
|
14
15
|
if (expiry.isExpired) {
|
|
15
|
-
return { category: 'error', detail: `El certificado
|
|
16
|
+
return { category: 'error', detail: `El certificado venció el ${formattedDate}.`, label };
|
|
16
17
|
}
|
|
17
18
|
if (isCertificateExpiringSoon(expiry, CERTIFICATE_EXPIRY_WARNING_DAYS)) {
|
|
18
19
|
return {
|
|
19
20
|
category: 'warning',
|
|
20
|
-
detail: `El certificado vence en ${expiry.daysRemaining}
|
|
21
|
+
detail: `El certificado vence en ${expiry.daysRemaining} días (${formattedDate}). Renuevelo pronto.`,
|
|
21
22
|
label,
|
|
22
23
|
};
|
|
23
24
|
}
|
|
@@ -38,13 +39,13 @@ export function buildConfigDoctorReport(config, runtimeChecks = []) {
|
|
|
38
39
|
label: 'CUIT',
|
|
39
40
|
ok: config.cuit,
|
|
40
41
|
okDetail: 'CUIT listo para emitir comprobantes.',
|
|
41
|
-
warningDetail: '
|
|
42
|
+
warningDetail: 'Configurá su CUIT con "arcli config establecer cuit <valor>".',
|
|
42
43
|
},
|
|
43
44
|
{
|
|
44
45
|
label: 'Punto de venta',
|
|
45
46
|
ok: config.puntoVentaPorDefecto,
|
|
46
47
|
okDetail: `Punto de venta por defecto: ${config.puntoVentaPorDefecto}.`,
|
|
47
|
-
warningDetail: '
|
|
48
|
+
warningDetail: 'Configurá un punto de venta por defecto con "arcli config establecer puntoVenta <valor>".',
|
|
48
49
|
},
|
|
49
50
|
{
|
|
50
51
|
label: 'Concepto',
|
|
@@ -62,13 +63,13 @@ export function buildConfigDoctorReport(config, runtimeChecks = []) {
|
|
|
62
63
|
label: 'Credenciales testing',
|
|
63
64
|
ok: config.cert.testing && config.key.testing,
|
|
64
65
|
okDetail: 'Certificado y clave de testing configurados.',
|
|
65
|
-
warningDetail: `Faltan credenciales de testing.
|
|
66
|
+
warningDetail: `Faltan credenciales de testing. Configurá "cert.testing" y "key.testing" con "arcli config establecer". Si todavia no tiene certificado: ${CERTIFICATE_GUIDE_URL}`,
|
|
66
67
|
},
|
|
67
68
|
{
|
|
68
|
-
label: 'Credenciales
|
|
69
|
+
label: 'Credenciales producción',
|
|
69
70
|
ok: config.cert.produccion && config.key.produccion,
|
|
70
|
-
okDetail: 'Certificado y clave de
|
|
71
|
-
warningDetail: '
|
|
71
|
+
okDetail: 'Certificado y clave de producción configurados.',
|
|
72
|
+
warningDetail: 'Todavía no hay credenciales de producción configuradas. Puede cargarlas con "cert.produccion" y "key.produccion".',
|
|
72
73
|
},
|
|
73
74
|
];
|
|
74
75
|
for (const check of conditionalChecks) {
|
|
@@ -78,13 +79,34 @@ export function buildConfigDoctorReport(config, runtimeChecks = []) {
|
|
|
78
79
|
}
|
|
79
80
|
for (const [label, certPath] of [
|
|
80
81
|
['Vencimiento cert. testing', config.cert.testing],
|
|
81
|
-
['Vencimiento cert.
|
|
82
|
+
['Vencimiento cert. producción', config.cert.produccion],
|
|
83
|
+
['Vencimiento cert. exportación testing', config.exportacion?.cert.testing],
|
|
84
|
+
['Vencimiento cert. exportación producción', config.exportacion?.cert.produccion],
|
|
82
85
|
]) {
|
|
83
86
|
const certificateCheck = buildCertificateExpiryCheck(label, certPath);
|
|
84
87
|
if (certificateCheck) {
|
|
85
88
|
checks.push(certificateCheck);
|
|
86
89
|
}
|
|
87
90
|
}
|
|
91
|
+
// WSFEX es opcional: solo se avisa si hay algo configurado a medias.
|
|
92
|
+
for (const environment of arcliEnvironmentSchema.options) {
|
|
93
|
+
const cert = config.exportacion?.cert[environment];
|
|
94
|
+
const key = config.exportacion?.key[environment];
|
|
95
|
+
if (!cert && !key) {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
checks.push(cert && key
|
|
99
|
+
? {
|
|
100
|
+
category: 'ok',
|
|
101
|
+
detail: `Certificado y clave de exportación (${environment}) configurados.`,
|
|
102
|
+
label: 'Credenciales WSFEX',
|
|
103
|
+
}
|
|
104
|
+
: {
|
|
105
|
+
category: 'warning',
|
|
106
|
+
detail: `Para WSFEX en ${environment} configurá "exportacion.cert.${environment}" y "exportacion.key.${environment}" juntos.`,
|
|
107
|
+
label: 'Credenciales WSFEX',
|
|
108
|
+
});
|
|
109
|
+
}
|
|
88
110
|
checks.push({
|
|
89
111
|
category: 'ok',
|
|
90
112
|
detail: `Entorno por defecto: ${config.entornoPorDefecto}.`,
|
|
@@ -93,7 +115,7 @@ export function buildConfigDoctorReport(config, runtimeChecks = []) {
|
|
|
93
115
|
checks.push({
|
|
94
116
|
category: 'ok',
|
|
95
117
|
detail: `Emitir por defecto: ${config.output.emitirPorDefecto ? 'si' : 'no'}.`,
|
|
96
|
-
label: '
|
|
118
|
+
label: 'Emisión',
|
|
97
119
|
});
|
|
98
120
|
checks.push({
|
|
99
121
|
category: 'ok',
|
|
@@ -113,19 +135,19 @@ export function buildConfigDoctorReport(config, runtimeChecks = []) {
|
|
|
113
135
|
else if (config.pdf === 'siempre') {
|
|
114
136
|
checks.push({
|
|
115
137
|
category: 'warning',
|
|
116
|
-
detail: `Con pdf=siempre faltan datos del emisor: ${missingIssuerKeys.join(', ')}.
|
|
138
|
+
detail: `Con pdf=siempre faltan datos del emisor: ${missingIssuerKeys.join(', ')}. Configuralos con "arcli config establecer".`,
|
|
117
139
|
label: 'PDF',
|
|
118
140
|
});
|
|
119
141
|
}
|
|
120
142
|
for (const runtimeCheck of runtimeChecks) {
|
|
121
|
-
const
|
|
143
|
+
const environment = formatEnvironmentLabel(runtimeCheck.environment);
|
|
144
|
+
const label = `Validación ${environment}`;
|
|
122
145
|
checks.push(runtimeCheck.error
|
|
123
146
|
? { category: 'error', detail: runtimeCheck.error, label }
|
|
124
|
-
: { category: 'ok', detail: `
|
|
147
|
+
: { category: 'ok', detail: `Configuración válida para ${environment}.`, label });
|
|
125
148
|
}
|
|
126
149
|
return {
|
|
127
150
|
checks,
|
|
128
151
|
ok: checks.every((check) => check.category === 'ok'),
|
|
129
152
|
};
|
|
130
153
|
}
|
|
131
|
-
//# sourceMappingURL=config-doctor.js.map
|
|
@@ -2,7 +2,9 @@ import { existsSync } from 'node:fs';
|
|
|
2
2
|
import { resolve } from 'node:path';
|
|
3
3
|
import { parseArgentineDateInputAsArcaDate } from '../../lib/dates/arca-date.js';
|
|
4
4
|
import { InputValidationError } from '../../lib/errors/app-error.js';
|
|
5
|
+
import { parseCuit } from '../../lib/identity/cuit.js';
|
|
5
6
|
import { EXCHANGE_RATE_DECIMALS, parseArgentineAmount } from '../../lib/numbers/argentine-amount.js';
|
|
7
|
+
import { parseStrictInteger } from '../../lib/numbers/strict-integer.js';
|
|
6
8
|
import { readPemFile } from '../../lib/security/pem.js';
|
|
7
9
|
import { IVA_RATE_HINT } from '../billing/billing.schemas.js';
|
|
8
10
|
import { MAX_RECENT_VOUCHERS } from '../vouchers/voucher-history.js';
|
|
@@ -15,54 +17,61 @@ function parseBoolean(value) {
|
|
|
15
17
|
if (normalizedValue === 'false' || normalizedValue === '0' || normalizedValue === 'no') {
|
|
16
18
|
return false;
|
|
17
19
|
}
|
|
18
|
-
throw new InputValidationError(`El valor "${value}" no es un booleano
|
|
20
|
+
throw new InputValidationError(`El valor "${value}" no es un booleano válido. Usá true/false, si/no o 1/0.`);
|
|
19
21
|
}
|
|
20
22
|
function parseNonEmptyString(value) {
|
|
21
23
|
const normalizedValue = value.trim();
|
|
22
24
|
if (!normalizedValue) {
|
|
23
|
-
throw new InputValidationError('El valor no puede estar
|
|
25
|
+
throw new InputValidationError('El valor no puede estar vacío.');
|
|
24
26
|
}
|
|
25
27
|
return normalizedValue;
|
|
26
28
|
}
|
|
27
29
|
function parseIvaRate(value) {
|
|
28
30
|
const result = arcliDefaultIvaRateSchema.safeParse(value);
|
|
29
31
|
if (!result.success) {
|
|
30
|
-
throw new InputValidationError(`La
|
|
32
|
+
throw new InputValidationError(`La alícuota "${value}" no es válida. Usá ${IVA_RATE_HINT}.`);
|
|
31
33
|
}
|
|
32
34
|
return result.data;
|
|
33
35
|
}
|
|
36
|
+
function parseConfigCuit(value) {
|
|
37
|
+
const result = parseCuit(value);
|
|
38
|
+
if (!result.ok) {
|
|
39
|
+
throw new InputValidationError(`El CUIT "${value}" no es válido: ${result.reason}.`);
|
|
40
|
+
}
|
|
41
|
+
return result.value;
|
|
42
|
+
}
|
|
34
43
|
function parseCbu(value) {
|
|
35
44
|
const normalizedValue = value.trim();
|
|
36
45
|
if (!/^\d{22}$/.test(normalizedValue)) {
|
|
37
|
-
throw new InputValidationError(`El CBU "${value}" no es
|
|
46
|
+
throw new InputValidationError(`El CBU "${value}" no es válido: debe tener 22 digitos.`);
|
|
38
47
|
}
|
|
39
48
|
return normalizedValue;
|
|
40
49
|
}
|
|
41
50
|
function parseCbuAlias(value) {
|
|
42
51
|
const normalizedValue = value.trim();
|
|
43
52
|
if (!/^[A-Za-z0-9.-]{6,20}$/.test(normalizedValue)) {
|
|
44
|
-
throw new InputValidationError(`El alias "${value}" no es
|
|
53
|
+
throw new InputValidationError(`El alias "${value}" no es válido: debe tener entre 6 y 20 letras, números, puntos o guiones.`);
|
|
45
54
|
}
|
|
46
55
|
return normalizedValue;
|
|
47
56
|
}
|
|
48
57
|
function parsePositiveInteger(value) {
|
|
49
|
-
const parsedValue =
|
|
50
|
-
if (
|
|
51
|
-
throw new InputValidationError(`El valor "${value}" no es un entero positivo
|
|
58
|
+
const parsedValue = parseStrictInteger(value);
|
|
59
|
+
if (parsedValue === undefined || parsedValue <= 0) {
|
|
60
|
+
throw new InputValidationError(`El valor "${value}" no es un entero positivo válido.`);
|
|
52
61
|
}
|
|
53
62
|
return parsedValue;
|
|
54
63
|
}
|
|
55
64
|
function parseRecentCount(value) {
|
|
56
|
-
const parsedValue =
|
|
57
|
-
if (
|
|
58
|
-
throw new InputValidationError(`La cantidad "${value}" no es
|
|
65
|
+
const parsedValue = parseStrictInteger(value);
|
|
66
|
+
if (parsedValue === undefined || parsedValue < 1 || parsedValue > MAX_RECENT_VOUCHERS) {
|
|
67
|
+
throw new InputValidationError(`La cantidad "${value}" no es válida: tiene que ser un número entre 1 y ${MAX_RECENT_VOUCHERS}.`);
|
|
59
68
|
}
|
|
60
69
|
return parsedValue;
|
|
61
70
|
}
|
|
62
71
|
function parseExchangeRate(value) {
|
|
63
72
|
const result = parseArgentineAmount(value, { maxDecimals: EXCHANGE_RATE_DECIMALS });
|
|
64
73
|
if (!result.ok) {
|
|
65
|
-
throw new InputValidationError(`La
|
|
74
|
+
throw new InputValidationError(`La cotización "${value}" no es válida: ${result.reason}.`);
|
|
66
75
|
}
|
|
67
76
|
return result.value;
|
|
68
77
|
}
|
|
@@ -75,14 +84,14 @@ function parsePemPath(value, label) {
|
|
|
75
84
|
// La fecha de inicio de actividades es vieja: se pide con anio para no completarla con el actual.
|
|
76
85
|
function parseFullDate(value) {
|
|
77
86
|
if (!/^\d{1,2}([-/])\d{1,2}\1(\d{2}|\d{4})$/.test(value.trim())) {
|
|
78
|
-
throw new InputValidationError(`La fecha "${value}" no es
|
|
87
|
+
throw new InputValidationError(`La fecha "${value}" no es válida. Usá D/MM/YYYY, por ejemplo 1/03/2020.`);
|
|
79
88
|
}
|
|
80
89
|
return parseArgentineDateInputAsArcaDate(value);
|
|
81
90
|
}
|
|
82
91
|
function parseExistingFile(value, label) {
|
|
83
92
|
const path = resolve(parseNonEmptyString(value));
|
|
84
93
|
if (!existsSync(path)) {
|
|
85
|
-
throw new InputValidationError(`No se
|
|
94
|
+
throw new InputValidationError(`No se encontró ${label} en "${path}".`);
|
|
86
95
|
}
|
|
87
96
|
return path;
|
|
88
97
|
}
|
|
@@ -108,7 +117,7 @@ export function parseConfigValue(key, value) {
|
|
|
108
117
|
case 'cotizacionPorDefecto':
|
|
109
118
|
return parseExchangeRate(value);
|
|
110
119
|
case 'cuit':
|
|
111
|
-
return value
|
|
120
|
+
return parseConfigCuit(value);
|
|
112
121
|
case 'emisor.condicionIva':
|
|
113
122
|
return arcliDefaultIvaConditionSchema.parse(value.trim().toLowerCase());
|
|
114
123
|
case 'emisor.domicilio':
|
|
@@ -138,17 +147,21 @@ export function parseConfigValue(key, value) {
|
|
|
138
147
|
case 'pdfNavegador':
|
|
139
148
|
return parseExistingFile(value, 'el navegador');
|
|
140
149
|
case 'puntoVentaPorDefecto':
|
|
150
|
+
case 'exportacion.actividad':
|
|
141
151
|
return parsePositiveInteger(value);
|
|
142
152
|
case 'ticketPath':
|
|
143
153
|
return resolve(parseNonEmptyString(value));
|
|
144
154
|
case 'cert.produccion':
|
|
145
155
|
case 'cert.testing':
|
|
156
|
+
case 'exportacion.cert.produccion':
|
|
157
|
+
case 'exportacion.cert.testing':
|
|
146
158
|
return parsePemPath(value, 'certificado');
|
|
147
159
|
case 'key.produccion':
|
|
148
160
|
case 'key.testing':
|
|
161
|
+
case 'exportacion.key.produccion':
|
|
162
|
+
case 'exportacion.key.testing':
|
|
149
163
|
return parsePemPath(value, 'clave privada');
|
|
150
164
|
default:
|
|
151
165
|
return parseNonEmptyString(value);
|
|
152
166
|
}
|
|
153
167
|
}
|
|
154
|
-
//# sourceMappingURL=config-value-parser.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ConfigurationError } from '../../lib/errors/app-error.js';
|
|
2
|
+
/**
|
|
3
|
+
* WSFEX exige un certificado autorizado al servicio `wsfex`, que en general no es el mismo que el de wsfe.
|
|
4
|
+
* `exportacion.cert`/`exportacion.key` son opcionales: sin ellos se usan los certificados generales.
|
|
5
|
+
*/
|
|
6
|
+
export function resolveExportCredentials(config, environment) {
|
|
7
|
+
const dedicatedCert = config.exportacion?.cert[environment];
|
|
8
|
+
const dedicatedKey = config.exportacion?.key[environment];
|
|
9
|
+
if (Boolean(dedicatedCert) !== Boolean(dedicatedKey)) {
|
|
10
|
+
throw new ConfigurationError(`Para WSFEX en ${environment} configurá el certificado y la clave juntos.`, { faltan: dedicatedCert ? [`exportacion.key.${environment}`] : [`exportacion.cert.${environment}`] }, `Cargalos con "arcli config establecer exportacion.cert.${environment} <ruta>" y "arcli config establecer exportacion.key.${environment} <ruta>".`);
|
|
11
|
+
}
|
|
12
|
+
const cert = dedicatedCert ?? config.cert[environment];
|
|
13
|
+
const key = dedicatedKey ?? config.key[environment];
|
|
14
|
+
if (!cert || !key) {
|
|
15
|
+
throw new ConfigurationError(`Falta el certificado de WSFEX para ${environment}.`, {
|
|
16
|
+
faltan: [
|
|
17
|
+
...(cert ? [] : [`exportacion.cert.${environment}`]),
|
|
18
|
+
...(key ? [] : [`exportacion.key.${environment}`]),
|
|
19
|
+
],
|
|
20
|
+
}, `Autorizá un certificado al servicio wsfex y cargalo con "arcli config establecer exportacion.cert.${environment} <ruta>" y "arcli config establecer exportacion.key.${environment} <ruta>".`);
|
|
21
|
+
}
|
|
22
|
+
return { cert, dedicated: Boolean(dedicatedCert), key };
|
|
23
|
+
}
|
|
@@ -4,6 +4,7 @@ import { colorize, keyValuePanel, resolveKeyValueLabelWidth, statusPanel, toneTe
|
|
|
4
4
|
import { RECENT_VOUCHERS_LIMIT } from '../vouchers/voucher-history.js';
|
|
5
5
|
import { CONFIG_LABELS, CONFIG_SECTIONS } from './config.sections.js';
|
|
6
6
|
function toPublicSnapshot(config, paths) {
|
|
7
|
+
const dedicated = config.exportacion;
|
|
7
8
|
return {
|
|
8
9
|
alicuota: config.alicuotaPorDefecto,
|
|
9
10
|
aliasCbu: config.aliasCbu,
|
|
@@ -19,6 +20,17 @@ function toPublicSnapshot(config, paths) {
|
|
|
19
20
|
emisor: { ...config.emisor, logo: config.emisor.logo ? maskPath(config.emisor.logo) : undefined },
|
|
20
21
|
emitir: config.output.emitirPorDefecto,
|
|
21
22
|
entorno: config.entornoPorDefecto,
|
|
23
|
+
exportacion: {
|
|
24
|
+
actividad: dedicated?.actividad,
|
|
25
|
+
cert: {
|
|
26
|
+
produccion: dedicated?.cert.produccion ? maskPath(dedicated.cert.produccion) : undefined,
|
|
27
|
+
testing: dedicated?.cert.testing ? maskPath(dedicated.cert.testing) : undefined,
|
|
28
|
+
},
|
|
29
|
+
key: {
|
|
30
|
+
produccion: dedicated?.key.produccion ? maskPath(dedicated.key.produccion) : undefined,
|
|
31
|
+
testing: dedicated?.key.testing ? maskPath(dedicated.key.testing) : undefined,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
22
34
|
ivaReceptor: config.ivaReceptorPorDefecto,
|
|
23
35
|
json: config.output.jsonPorDefecto,
|
|
24
36
|
key: {
|
|
@@ -61,7 +73,7 @@ const CONFIG_TEXT_VALUES = {
|
|
|
61
73
|
concepto: (c) => notSet(c.concepto),
|
|
62
74
|
cotizacion: (c) => c.cotizacion ?? 1,
|
|
63
75
|
cuit: (c) => notSet(c.cuit),
|
|
64
|
-
'emisor.condicionIva': (c) => c.emisor.condicionIva ?? '
|
|
76
|
+
'emisor.condicionIva': (c) => c.emisor.condicionIva ?? 'según la letra',
|
|
65
77
|
'emisor.domicilio': (c) => notSet(c.emisor.domicilio),
|
|
66
78
|
'emisor.iibb': (c) => notSet(c.emisor.iibb),
|
|
67
79
|
'emisor.inicioActividades': (c) => c.emisor.inicioActividades ? formatArcaDateAsArgentineDate(c.emisor.inicioActividades) : NOT_SET,
|
|
@@ -69,6 +81,11 @@ const CONFIG_TEXT_VALUES = {
|
|
|
69
81
|
'emisor.razonSocial': (c) => notSet(c.emisor.razonSocial),
|
|
70
82
|
emitir: (c) => yesNo(c.emitir),
|
|
71
83
|
entorno: (c) => c.entorno,
|
|
84
|
+
'exportacion.actividad': (c) => notSet(c.exportacion.actividad),
|
|
85
|
+
'exportacion.cert.produccion': (c) => notSet(c.exportacion.cert.produccion),
|
|
86
|
+
'exportacion.cert.testing': (c) => notSet(c.exportacion.cert.testing),
|
|
87
|
+
'exportacion.key.produccion': (c) => notSet(c.exportacion.key.produccion),
|
|
88
|
+
'exportacion.key.testing': (c) => notSet(c.exportacion.key.testing),
|
|
72
89
|
ivaReceptor: (c) => notSet(c.ivaReceptor),
|
|
73
90
|
json: (c) => yesNo(c.json),
|
|
74
91
|
'key.produccion': (c) => notSet(c.key.produccion),
|
|
@@ -101,7 +118,7 @@ export function formatConfigAsText(config, paths) {
|
|
|
101
118
|
// Los datos van corridos bajo el titulo, asi la seccion se lee aun sin color (NO_COLOR, pipes).
|
|
102
119
|
...section.rows.map(([label, value]) => ` ${colorize(label.padEnd(labelWidth), 'muted')}${gap}${value === NOT_SET ? colorize(value, 'muted') : value}`),
|
|
103
120
|
]);
|
|
104
|
-
return keyValuePanel('
|
|
121
|
+
return keyValuePanel('Configuración', lines, undefined, 'standard', undefined, 'sheet');
|
|
105
122
|
}
|
|
106
123
|
export function formatConfigDoctor(report) {
|
|
107
124
|
return JSON.stringify({
|
|
@@ -124,10 +141,9 @@ export function formatConfigDoctorAsText(report) {
|
|
|
124
141
|
});
|
|
125
142
|
const tone = report.ok ? 'success' : report.checks.some((check) => check.category === 'error') ? 'danger' : 'warning';
|
|
126
143
|
const footer = report.ok
|
|
127
|
-
? '
|
|
144
|
+
? 'Configuración lista para usar ARCLI'
|
|
128
145
|
: report.checks.some((check) => check.category === 'error')
|
|
129
146
|
? 'Hay puntos criticos por corregir antes de emitir'
|
|
130
|
-
: '
|
|
131
|
-
return statusPanel('
|
|
147
|
+
: 'Revisá las recomendaciones antes de emitir en serio';
|
|
148
|
+
return statusPanel('Revisión de configuración', lines, footer, 'wide', tone, 'checklist');
|
|
132
149
|
}
|
|
133
|
-
//# sourceMappingURL=config.presenter.js.map
|
|
@@ -22,16 +22,16 @@ export const arcliDefaultCurrencySchema = z
|
|
|
22
22
|
.length(3)
|
|
23
23
|
.transform((value) => value.toUpperCase());
|
|
24
24
|
export const arcliPdfModeSchema = z.enum(['siempre', 'preguntar', 'nunca']);
|
|
25
|
+
/** Rutas de certificado o clave por entorno; no se leen al parsear la config. */
|
|
26
|
+
const certificatePathsSchema = z.object({
|
|
27
|
+
produccion: z.string().trim().min(1).optional(),
|
|
28
|
+
testing: z.string().trim().min(1).optional(),
|
|
29
|
+
});
|
|
25
30
|
// Misma normalizacion que --alicuota ("10,5", "10.5%").
|
|
26
31
|
export const arcliDefaultIvaRateSchema = billingIvaRateSchema;
|
|
27
32
|
export const arcliConfigSchema = z.object({
|
|
28
33
|
alicuotaPorDefecto: arcliDefaultIvaRateSchema.optional(),
|
|
29
|
-
cert:
|
|
30
|
-
.object({
|
|
31
|
-
produccion: z.string().trim().min(1).optional(),
|
|
32
|
-
testing: z.string().trim().min(1).optional(),
|
|
33
|
-
})
|
|
34
|
-
.default({}),
|
|
34
|
+
cert: certificatePathsSchema.default({}),
|
|
35
35
|
cuit: z
|
|
36
36
|
.string()
|
|
37
37
|
.trim()
|
|
@@ -45,7 +45,7 @@ export const arcliConfigSchema = z.object({
|
|
|
45
45
|
aliasCbu: z
|
|
46
46
|
.string()
|
|
47
47
|
.trim()
|
|
48
|
-
.regex(/^[A-Za-z0-9.-]{6,20}$/, 'El alias debe tener entre 6 y 20 caracteres (letras,
|
|
48
|
+
.regex(/^[A-Za-z0-9.-]{6,20}$/, 'El alias debe tener entre 6 y 20 caracteres (letras, números, punto o guion)')
|
|
49
49
|
.optional(),
|
|
50
50
|
conceptoPorDefecto: arcliDefaultConceptSchema.optional(),
|
|
51
51
|
ivaReceptorPorDefecto: arcliDefaultIvaConditionSchema.optional(),
|
|
@@ -67,12 +67,16 @@ export const arcliConfigSchema = z.object({
|
|
|
67
67
|
})
|
|
68
68
|
.default({}),
|
|
69
69
|
entornoPorDefecto: arcliEnvironmentSchema.default('testing'),
|
|
70
|
-
|
|
70
|
+
/** WSFEX (factura de exportacion) usa su propio certificado, autorizado al servicio wsfex. */
|
|
71
|
+
exportacion: z
|
|
71
72
|
.object({
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
/** Codigo de la tabla de actividades de WSFEX que va en `Actividades` de la factura E. */
|
|
74
|
+
actividad: z.number().int().positive().optional(),
|
|
75
|
+
cert: certificatePathsSchema.default({}),
|
|
76
|
+
key: certificatePathsSchema.default({}),
|
|
74
77
|
})
|
|
75
|
-
.
|
|
78
|
+
.optional(),
|
|
79
|
+
key: certificatePathsSchema.default({}),
|
|
76
80
|
output: z
|
|
77
81
|
.object({
|
|
78
82
|
emitirPorDefecto: z.boolean().default(false),
|
|
@@ -91,6 +95,10 @@ export const arcliConfigSchema = z.object({
|
|
|
91
95
|
consultarPadron: z.boolean().optional(),
|
|
92
96
|
verificarFce: z.boolean().optional(),
|
|
93
97
|
});
|
|
98
|
+
/** El entorno como se lee en un texto; el valor (`produccion`) sigue igual en flags, claves y JSON. */
|
|
99
|
+
export function formatEnvironmentLabel(environment) {
|
|
100
|
+
return environment === 'produccion' ? 'producción' : environment;
|
|
101
|
+
}
|
|
94
102
|
export const CONFIG_DEFAULTS = {
|
|
95
103
|
cert: {},
|
|
96
104
|
emisor: {},
|
|
@@ -122,6 +130,11 @@ export const configPublicKeySchema = z.enum([
|
|
|
122
130
|
'emisor.razonSocial',
|
|
123
131
|
'entorno',
|
|
124
132
|
'emitir',
|
|
133
|
+
'exportacion.actividad',
|
|
134
|
+
'exportacion.cert.produccion',
|
|
135
|
+
'exportacion.cert.testing',
|
|
136
|
+
'exportacion.key.produccion',
|
|
137
|
+
'exportacion.key.testing',
|
|
125
138
|
'ivaReceptor',
|
|
126
139
|
'json',
|
|
127
140
|
'key.produccion',
|
|
@@ -136,4 +149,3 @@ export const configPublicKeySchema = z.enum([
|
|
|
136
149
|
'verificarFce',
|
|
137
150
|
'consultarPadron',
|
|
138
151
|
]);
|
|
139
|
-
//# sourceMappingURL=config.schemas.js.map
|
|
@@ -6,7 +6,17 @@ export const CONFIG_SECTIONS = [
|
|
|
6
6
|
{ id: 'cuenta', keys: ['cuit', 'puntoVenta', 'entorno'], label: 'Cuenta' },
|
|
7
7
|
{
|
|
8
8
|
id: 'certificados',
|
|
9
|
-
keys: [
|
|
9
|
+
keys: [
|
|
10
|
+
'cert.testing',
|
|
11
|
+
'key.testing',
|
|
12
|
+
'cert.produccion',
|
|
13
|
+
'key.produccion',
|
|
14
|
+
'exportacion.cert.testing',
|
|
15
|
+
'exportacion.key.testing',
|
|
16
|
+
'exportacion.cert.produccion',
|
|
17
|
+
'exportacion.key.produccion',
|
|
18
|
+
'ticketPath',
|
|
19
|
+
],
|
|
10
20
|
label: 'Certificados',
|
|
11
21
|
},
|
|
12
22
|
{
|
|
@@ -14,7 +24,8 @@ export const CONFIG_SECTIONS = [
|
|
|
14
24
|
keys: ['concepto', 'ivaReceptor', 'consultarPadron', 'alicuota', 'moneda', 'cotizacion'],
|
|
15
25
|
label: 'Al facturar',
|
|
16
26
|
},
|
|
17
|
-
{ id: 'fce', keys: ['cbu', 'aliasCbu', 'verificarFce'], label: 'Factura de
|
|
27
|
+
{ id: 'fce', keys: ['cbu', 'aliasCbu', 'verificarFce'], label: 'Factura de crédito electrónica (FCE)' },
|
|
28
|
+
{ id: 'exportacion', keys: ['exportacion.actividad'], label: 'Factura de exportación (E)' },
|
|
18
29
|
{
|
|
19
30
|
id: 'emisor',
|
|
20
31
|
keys: [
|
|
@@ -32,27 +43,32 @@ export const CONFIG_SECTIONS = [
|
|
|
32
43
|
];
|
|
33
44
|
/** Nombre de cada dato, igual en `arcli config` y en el modo interactivo. */
|
|
34
45
|
export const CONFIG_LABELS = {
|
|
35
|
-
alicuota: '
|
|
46
|
+
alicuota: 'Alícuota de IVA (A y B)',
|
|
36
47
|
aliasCbu: 'Alias del CBU',
|
|
37
48
|
bruto: 'Salida bruta',
|
|
38
49
|
cbu: 'CBU',
|
|
39
|
-
'cert.produccion': 'Certificado de
|
|
50
|
+
'cert.produccion': 'Certificado de producción',
|
|
40
51
|
'cert.testing': 'Certificado de testing',
|
|
41
52
|
comprobantesPorLista: 'Comprobantes por lista',
|
|
42
53
|
concepto: 'Concepto',
|
|
43
|
-
cotizacion: '
|
|
54
|
+
cotizacion: 'Cotización',
|
|
44
55
|
cuit: 'CUIT del emisor',
|
|
45
|
-
'emisor.condicionIva': '
|
|
56
|
+
'emisor.condicionIva': 'Condición de IVA',
|
|
46
57
|
'emisor.domicilio': 'Domicilio comercial',
|
|
47
58
|
'emisor.iibb': 'Ingresos Brutos',
|
|
48
59
|
'emisor.inicioActividades': 'Inicio de actividades',
|
|
49
60
|
'emisor.logo': 'Logo (PNG o JPG)',
|
|
50
|
-
'emisor.razonSocial': '
|
|
61
|
+
'emisor.razonSocial': 'Razón social',
|
|
51
62
|
emitir: 'Emitir sin --emitir',
|
|
52
63
|
entorno: 'Entorno',
|
|
64
|
+
'exportacion.actividad': 'Actividad de exportación (WSFEX)',
|
|
65
|
+
'exportacion.cert.produccion': 'Certificado de exportación (producción)',
|
|
66
|
+
'exportacion.cert.testing': 'Certificado de exportación (testing)',
|
|
67
|
+
'exportacion.key.produccion': 'Clave de exportación (producción)',
|
|
68
|
+
'exportacion.key.testing': 'Clave de exportación (testing)',
|
|
53
69
|
ivaReceptor: 'IVA del receptor',
|
|
54
70
|
json: 'Salida JSON',
|
|
55
|
-
'key.produccion': 'Clave privada de
|
|
71
|
+
'key.produccion': 'Clave privada de producción',
|
|
56
72
|
'key.testing': 'Clave privada de testing',
|
|
57
73
|
moneda: 'Moneda',
|
|
58
74
|
pdf: 'Cuando generar el PDF',
|
|
@@ -60,7 +76,6 @@ export const CONFIG_LABELS = {
|
|
|
60
76
|
pdfNavegador: 'Navegador para PDFs',
|
|
61
77
|
puntoVenta: 'Punto de venta',
|
|
62
78
|
ticketPath: 'Carpeta de tickets WSAA',
|
|
63
|
-
verificarFce: 'Verificar
|
|
64
|
-
consultarPadron: 'IVA del receptor desde el
|
|
79
|
+
verificarFce: 'Verificar régimen FCE del receptor',
|
|
80
|
+
consultarPadron: 'IVA del receptor desde el padrón',
|
|
65
81
|
};
|
|
66
|
-
//# sourceMappingURL=config.sections.js.map
|
|
@@ -22,6 +22,11 @@ const CONFIG_KEY_ALIASES = {
|
|
|
22
22
|
'emisor.razonSocial': 'emisor.razonSocial',
|
|
23
23
|
entorno: 'entornoPorDefecto',
|
|
24
24
|
emitir: 'output.emitirPorDefecto',
|
|
25
|
+
'exportacion.actividad': 'exportacion.actividad',
|
|
26
|
+
'exportacion.cert.produccion': 'exportacion.cert.produccion',
|
|
27
|
+
'exportacion.cert.testing': 'exportacion.cert.testing',
|
|
28
|
+
'exportacion.key.produccion': 'exportacion.key.produccion',
|
|
29
|
+
'exportacion.key.testing': 'exportacion.key.testing',
|
|
25
30
|
ivaReceptor: 'ivaReceptorPorDefecto',
|
|
26
31
|
json: 'output.jsonPorDefecto',
|
|
27
32
|
'key.produccion': 'key.produccion',
|
|
@@ -56,7 +61,7 @@ function resolveStorePath(options) {
|
|
|
56
61
|
return new Conf({ ...storeLocation(options), deserialize: () => ({}) }).path;
|
|
57
62
|
}
|
|
58
63
|
function invalidConfigFileError(path) {
|
|
59
|
-
return new ConfigurationError('El archivo de
|
|
64
|
+
return new ConfigurationError('El archivo de configuración tiene JSON inválido y no se puede leer.', { path }, 'Corregilo a mano, o renombralo (por ejemplo, a config.json.bak) y volve a cargar los datos con `arcli config establecer` o desde "Configuracion" en `arcli`. ARCLI no lo borra ni lo pisa.');
|
|
60
65
|
}
|
|
61
66
|
export class ConfigService {
|
|
62
67
|
store;
|
|
@@ -153,4 +158,3 @@ function deleteAtPath(target, path) {
|
|
|
153
158
|
delete parent[last];
|
|
154
159
|
}
|
|
155
160
|
}
|
|
156
|
-
//# sourceMappingURL=config.service.js.map
|