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
|
@@ -35,7 +35,7 @@ function resolveSession(options) {
|
|
|
35
35
|
}
|
|
36
36
|
catch (error) {
|
|
37
37
|
writeTerminalError(formatCliError(error, false));
|
|
38
|
-
writeTerminalOutput(noticePanel('Revisala desde "
|
|
38
|
+
writeTerminalOutput(noticePanel('Revisala desde "Configuración" en el menú.', 'warning'));
|
|
39
39
|
return undefined;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -71,7 +71,7 @@ const HEALTH_LABELS = {
|
|
|
71
71
|
const MAX_ISSUER_NAME_LENGTH = 32;
|
|
72
72
|
function environmentSegment(environment) {
|
|
73
73
|
return environment === 'produccion'
|
|
74
|
-
? { color: 'production', text: '
|
|
74
|
+
? { color: 'production', text: 'PRODUCCIÓN' }
|
|
75
75
|
: { color: 'testing', text: 'TESTING' };
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
@@ -117,7 +117,7 @@ async function buildHeader(options) {
|
|
|
117
117
|
const bar = statusBar([{ text: 'certificado vencido' }], [{ color: 'danger', text: 'ARCA SIN VERIFICAR' }, environmentSegment(error.notice.environment)], { rightSeparator: 'rule' });
|
|
118
118
|
return withCertificateBox(bar, noticesWithExpired(error.notice));
|
|
119
119
|
}
|
|
120
|
-
return statusBar([{ text: 'falta completar la
|
|
120
|
+
return statusBar([{ text: 'falta completar la configuración' }], [{ color: 'muted', text: 'ARCA SIN VERIFICAR' }]);
|
|
121
121
|
}
|
|
122
122
|
const spinner = startSpinner('Consultando el estado de ARCA...');
|
|
123
123
|
const health = await checkArcaHealth({ gateway: new ArcaParametersGateway(session.arca) });
|
|
@@ -139,7 +139,7 @@ function formatIssuer(businessName, cuit) {
|
|
|
139
139
|
: businessName;
|
|
140
140
|
}
|
|
141
141
|
function updateChoice(update) {
|
|
142
|
-
const name = `Actualizar a la
|
|
142
|
+
const name = `Actualizar a la versión ${update.latestVersion}`;
|
|
143
143
|
return { name: colorize(name, 'highlight'), short: name, value: 'actualizar' };
|
|
144
144
|
}
|
|
145
145
|
/** Asistente paso a paso encima del CLI. Ctrl+C cancela el flujo actual; en el menu, sale. */
|
|
@@ -158,7 +158,7 @@ export async function runInteractiveMode(options = {}) {
|
|
|
158
158
|
if (listMissingSetup().length > 0) {
|
|
159
159
|
menuUnderHeader = false;
|
|
160
160
|
try {
|
|
161
|
-
if (await confirm('Falta completar la
|
|
161
|
+
if (await confirm('Falta completar la configuración. ¿La hacemos ahora, paso a paso?', 'Sí, configurar', 'Después')) {
|
|
162
162
|
await runGuidedSetup();
|
|
163
163
|
writeTerminalOutput(await buildHeader(options));
|
|
164
164
|
menuUnderHeader = true;
|
|
@@ -173,29 +173,29 @@ export async function runInteractiveMode(options = {}) {
|
|
|
173
173
|
for (;;) {
|
|
174
174
|
let option;
|
|
175
175
|
try {
|
|
176
|
-
option = await chooseOne('¿
|
|
176
|
+
option = await chooseOne('¿Qué querés hacer?', [
|
|
177
177
|
...(update ? [updateChoice(update), new Separator(' ')] : []),
|
|
178
178
|
{ name: 'Emitir factura', value: 'factura' },
|
|
179
179
|
{
|
|
180
|
-
description: 'Copia una de las
|
|
180
|
+
description: 'Copia una de las últimas, con fechas nuevas',
|
|
181
181
|
name: 'Repetir una factura anterior',
|
|
182
182
|
value: 'repetir',
|
|
183
183
|
},
|
|
184
184
|
{
|
|
185
|
-
description: 'Descuento,
|
|
186
|
-
name: 'Emitir nota de
|
|
185
|
+
description: 'Descuento, devolución o anulación de una factura',
|
|
186
|
+
name: 'Emitir nota de crédito',
|
|
187
187
|
value: 'nota-credito',
|
|
188
188
|
},
|
|
189
|
-
{ description: 'Cargo adicional sobre una factura', name: 'Emitir nota de
|
|
189
|
+
{ description: 'Cargo adicional sobre una factura', name: 'Emitir nota de débito', value: 'nota-debito' },
|
|
190
190
|
{
|
|
191
|
-
description: 'Los
|
|
191
|
+
description: 'Los últimos de cada tipo, o buscar uno por número',
|
|
192
192
|
name: 'Consultar comprobantes',
|
|
193
193
|
value: 'historial',
|
|
194
194
|
},
|
|
195
|
-
{ description: 'Servidores, punto de venta y
|
|
195
|
+
{ description: 'Servidores, punto de venta y cotización del dólar', name: 'Estado de ARCA', value: 'estado' },
|
|
196
196
|
{
|
|
197
|
-
description: 'Revisar,
|
|
198
|
-
name: '
|
|
197
|
+
description: 'Revisar, configuración guiada, cambiar un dato y PDF',
|
|
198
|
+
name: 'Configuración',
|
|
199
199
|
value: 'config',
|
|
200
200
|
},
|
|
201
201
|
new Separator(' '),
|
|
@@ -223,13 +223,12 @@ export async function runInteractiveMode(options = {}) {
|
|
|
223
223
|
}
|
|
224
224
|
catch (error) {
|
|
225
225
|
if (isPromptCancellation(error)) {
|
|
226
|
-
writeTerminalOutput(colorize('Cancelado. No se
|
|
226
|
+
writeTerminalOutput(colorize('Cancelado. No se emitió nada.', 'muted'));
|
|
227
227
|
}
|
|
228
228
|
else {
|
|
229
229
|
writeTerminalError(formatCliError(error, false));
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
writeTerminalOutput(colorize('¡Hasta la
|
|
233
|
+
writeTerminalOutput(colorize('¡Hasta la próxima!', 'muted'));
|
|
234
234
|
}
|
|
235
|
-
//# sourceMappingURL=interactive-mode.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Separator } from '@inquirer/select';
|
|
2
|
+
import { parseStrictInteger } from '../../lib/numbers/strict-integer.js';
|
|
2
3
|
import { BACK } from '../../modules/interactive/wizard.js';
|
|
3
4
|
import { listVouchersFrom, RECENT_VOUCHERS_LIMIT } from '../../modules/vouchers/voucher-history.js';
|
|
4
5
|
import { formatVoucherNumber, formatVoucherPickerRows } from '../../modules/vouchers/voucher-history.presenter.js';
|
|
@@ -27,8 +28,8 @@ async function withSpinner(text, run) {
|
|
|
27
28
|
}
|
|
28
29
|
function validatePositiveInteger(label) {
|
|
29
30
|
return (value) => {
|
|
30
|
-
const number =
|
|
31
|
-
return
|
|
31
|
+
const number = parseStrictInteger(value);
|
|
32
|
+
return number !== undefined && number > 0 ? true : `${label} tiene que ser un número entero mayor a 0.`;
|
|
32
33
|
};
|
|
33
34
|
}
|
|
34
35
|
/** Pide punto de venta y numero, y lo busca en ARCA. Volver o un comprobante inexistente vuelven a la lista. */
|
|
@@ -40,7 +41,7 @@ async function askVoucherByNumber(session, voucherKind, defaultPointOfSale) {
|
|
|
40
41
|
if (pointOfSaleAnswer === BACK) {
|
|
41
42
|
return BACK;
|
|
42
43
|
}
|
|
43
|
-
const numberAnswer = await askTextStep('
|
|
44
|
+
const numberAnswer = await askTextStep('Número:', { validate: validatePositiveInteger('El número') });
|
|
44
45
|
if (numberAnswer === BACK) {
|
|
45
46
|
return BACK;
|
|
46
47
|
}
|
|
@@ -93,13 +94,13 @@ export async function pickInvoice(session, options) {
|
|
|
93
94
|
choices.push(new Separator(' '), new Separator(colorize(' Cargando…', 'muted')));
|
|
94
95
|
}
|
|
95
96
|
else if (nextNumber > 0) {
|
|
96
|
-
choices.push(new Separator(' '), { name: '+ Cargar
|
|
97
|
+
choices.push(new Separator(' '), { name: '+ Cargar más…', value: LOAD_MORE });
|
|
97
98
|
}
|
|
98
99
|
choices.push(listRule(), new Separator(' '));
|
|
99
100
|
}
|
|
100
101
|
choices.push({
|
|
101
|
-
description: 'Uno
|
|
102
|
-
name: '# Ingresar el
|
|
102
|
+
description: 'Uno más viejo o de otro punto de venta',
|
|
103
|
+
name: '# Ingresar el número a mano…',
|
|
103
104
|
value: BY_NUMBER,
|
|
104
105
|
});
|
|
105
106
|
// +2: el separador y "Volver" que agrega chooseStep.
|
|
@@ -150,4 +151,3 @@ export async function pickInvoice(session, options) {
|
|
|
150
151
|
defaultChoice = answer;
|
|
151
152
|
}
|
|
152
153
|
}
|
|
153
|
-
//# sourceMappingURL=invoice-picker.js.map
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { billingCommandSchema } from '../../modules/billing/billing.schemas.js';
|
|
2
|
+
import { EXPORT_VOUCHER_KIND } from '../../modules/export/export.types.js';
|
|
2
3
|
import { parseAmountInput } from '../../modules/interactive/amount-input.js';
|
|
3
|
-
import { conceptChoices, invoiceKindChoices, receiverChoices } from '../../modules/interactive/choices.js';
|
|
4
|
+
import { conceptChoices, exportInvoiceChoice, invoiceKindChoices, receiverChoices, } from '../../modules/interactive/choices.js';
|
|
4
5
|
import { BACK, runWizard } from '../../modules/interactive/wizard.js';
|
|
5
6
|
import { askAdvancedOptions } from './advanced-options.js';
|
|
7
|
+
import { runExportFlow } from './export.flow.js';
|
|
6
8
|
import { askTextStep, chooseStep } from './prompts.js';
|
|
7
9
|
import { askReceiverIvaCondition, receiverInputFields } from './receiver-padron.js';
|
|
8
10
|
import { previewAndEmit } from './session.js';
|
|
@@ -11,14 +13,25 @@ const isFceInvoice = (state) => state.voucherKind?.family === 'factura-credito-e
|
|
|
11
13
|
/** Pasos del flujo de factura; cada uno se puede deshacer con "Volver". */
|
|
12
14
|
export function invoiceSteps(session) {
|
|
13
15
|
const { config } = session.runtime;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
const pickVoucherKind = {
|
|
17
|
+
name: 'comprobante',
|
|
18
|
+
run: async () => {
|
|
19
|
+
// Volver desde el primer paso de la E vuelve a este selector.
|
|
20
|
+
for (;;) {
|
|
21
|
+
const voucherKind = await chooseStep('¿Qué comprobante querés emitir?', [...invoiceKindChoices(), exportInvoiceChoice()]);
|
|
22
|
+
if (voucherKind === BACK) {
|
|
23
|
+
return BACK;
|
|
24
|
+
}
|
|
25
|
+
if (voucherKind !== EXPORT_VOUCHER_KIND) {
|
|
26
|
+
return { voucherKind: voucherKind };
|
|
27
|
+
}
|
|
28
|
+
if ((await runExportFlow(session)) !== BACK) {
|
|
29
|
+
return { exported: true };
|
|
30
|
+
}
|
|
31
|
+
}
|
|
21
32
|
},
|
|
33
|
+
};
|
|
34
|
+
const billingSteps = [
|
|
22
35
|
{
|
|
23
36
|
name: 'receptor',
|
|
24
37
|
run: async (state) => {
|
|
@@ -53,7 +66,7 @@ export function invoiceSteps(session) {
|
|
|
53
66
|
{
|
|
54
67
|
name: 'concepto',
|
|
55
68
|
run: async () => {
|
|
56
|
-
const concept = await chooseStep('¿
|
|
69
|
+
const concept = await chooseStep('¿Qué estás facturando?', conceptChoices(), config.conceptoPorDefecto);
|
|
57
70
|
return concept === BACK ? BACK : { concept };
|
|
58
71
|
},
|
|
59
72
|
},
|
|
@@ -84,6 +97,13 @@ export function invoiceSteps(session) {
|
|
|
84
97
|
},
|
|
85
98
|
},
|
|
86
99
|
];
|
|
100
|
+
return [
|
|
101
|
+
pickVoucherKind,
|
|
102
|
+
...billingSteps.map((step) => ({
|
|
103
|
+
...step,
|
|
104
|
+
skip: (state) => Boolean(state.exported) || Boolean(step.skip?.(state)),
|
|
105
|
+
})),
|
|
106
|
+
];
|
|
87
107
|
}
|
|
88
108
|
/** Arma la entrada del CLI con lo que respondio el usuario. */
|
|
89
109
|
export function buildInvoiceInput(state, session) {
|
|
@@ -93,6 +113,8 @@ export function buildInvoiceInput(state, session) {
|
|
|
93
113
|
return billingCommandSchema.parse({
|
|
94
114
|
...state.advanced,
|
|
95
115
|
cbu: isFceInvoice(state) ? (state.cbu ?? config.cbu) : undefined,
|
|
116
|
+
// Como en el CLI: en una FCE el alias de la config se informa junto con el CBU.
|
|
117
|
+
cbuAlias: isFceInvoice(state) ? config.aliasCbu : undefined,
|
|
96
118
|
concept: state.concept,
|
|
97
119
|
documentNumber: state.documentNumber,
|
|
98
120
|
documentType: state.documentType,
|
|
@@ -108,9 +130,8 @@ export function buildInvoiceInput(state, session) {
|
|
|
108
130
|
}
|
|
109
131
|
export async function runInvoiceFlow(session) {
|
|
110
132
|
const state = await runWizard(invoiceSteps(session), { advanced: { currencyCode: 'ARS', sameCurrency: false } });
|
|
111
|
-
if (!state) {
|
|
133
|
+
if (!state || state.exported) {
|
|
112
134
|
return;
|
|
113
135
|
}
|
|
114
136
|
await previewAndEmit(session, buildInvoiceInput(state, session));
|
|
115
137
|
}
|
|
116
|
-
//# sourceMappingURL=invoice.flow.js.map
|
|
@@ -20,7 +20,7 @@ const CONCEPTS_BY_CODE = {
|
|
|
20
20
|
const isPeriod = (state) => state.target === 'periodo';
|
|
21
21
|
async function askNoteAmount(state) {
|
|
22
22
|
const invoice = state.invoice;
|
|
23
|
-
const label = state.kind === 'debito' ? 'Monto de la nota de
|
|
23
|
+
const label = state.kind === 'debito' ? 'Monto de la nota de débito:' : 'Monto de la nota de crédito:';
|
|
24
24
|
// Con varias alicuotas o tributos no se puede armar una nota igual a la factura: solo parcial.
|
|
25
25
|
const canAnnulTotal = Boolean(invoice && !copyInvoiceAmounts(invoice, state.invoiceKind?.letter ?? 'c').limitation);
|
|
26
26
|
if (state.kind === 'credito' && invoice && canAnnulTotal) {
|
|
@@ -51,22 +51,22 @@ export function noteSteps(session, pointOfSale) {
|
|
|
51
51
|
{
|
|
52
52
|
name: 'tipo-factura',
|
|
53
53
|
run: async () => {
|
|
54
|
-
const invoiceKind = await chooseStep('¿Sobre
|
|
54
|
+
const invoiceKind = await chooseStep('¿Sobre qué tipo de factura?', invoiceKindChoices());
|
|
55
55
|
return invoiceKind === BACK ? BACK : { invoiceKind, target: 'factura' };
|
|
56
56
|
},
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
name: 'asociacion',
|
|
60
60
|
run: async () => {
|
|
61
|
-
const target = await chooseStep('¿A
|
|
61
|
+
const target = await chooseStep('¿A qué la asociamos?', [
|
|
62
62
|
{
|
|
63
|
-
description: 'Elegis una de las
|
|
63
|
+
description: 'Elegis una de las últimas emitidas o la ingresas a mano',
|
|
64
64
|
name: 'A una factura',
|
|
65
65
|
value: 'factura',
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
description: 'Por ejemplo, un descuento sobre todo el mes',
|
|
69
|
-
name: 'A un
|
|
69
|
+
name: 'A un período',
|
|
70
70
|
value: 'periodo',
|
|
71
71
|
},
|
|
72
72
|
]);
|
|
@@ -80,7 +80,7 @@ export function noteSteps(session, pointOfSale) {
|
|
|
80
80
|
run: async (state) => {
|
|
81
81
|
const invoiceKind = state.invoiceKind;
|
|
82
82
|
const picked = await pickInvoice(session, {
|
|
83
|
-
message: `¿Sobre
|
|
83
|
+
message: `¿Sobre qué ${invoiceKind.displayName}?`,
|
|
84
84
|
pointOfSale,
|
|
85
85
|
voucherKind: invoiceKind,
|
|
86
86
|
});
|
|
@@ -95,7 +95,7 @@ export function noteSteps(session, pointOfSale) {
|
|
|
95
95
|
}
|
|
96
96
|
const copy = copyInvoiceAmounts(invoice, invoiceKind.letter);
|
|
97
97
|
if (copy.limitation) {
|
|
98
|
-
writeTerminalOutput(noticePanel(`${copy.limitation} La nota solo puede ser parcial; revisa la
|
|
98
|
+
writeTerminalOutput(noticePanel(`${copy.limitation} La nota solo puede ser parcial; revisa la alícuota.`, 'warning'));
|
|
99
99
|
}
|
|
100
100
|
// La nota hereda de la factura el receptor, el concepto, la moneda y la alicuota (si se puede deducir).
|
|
101
101
|
return {
|
|
@@ -113,11 +113,11 @@ export function noteSteps(session, pointOfSale) {
|
|
|
113
113
|
{
|
|
114
114
|
name: 'periodo',
|
|
115
115
|
run: async () => {
|
|
116
|
-
const periodFrom = await askTextStep('
|
|
116
|
+
const periodFrom = await askTextStep('Período desde:', { validate: validateDate });
|
|
117
117
|
if (periodFrom === BACK) {
|
|
118
118
|
return BACK;
|
|
119
119
|
}
|
|
120
|
-
const periodTo = await askTextStep('
|
|
120
|
+
const periodTo = await askTextStep('Período hasta:', { validate: validateDate });
|
|
121
121
|
return periodTo === BACK ? BACK : { invoice: undefined, invoicePointOfSale: undefined, periodFrom, periodTo };
|
|
122
122
|
},
|
|
123
123
|
skip: (state) => !isPeriod(state),
|
|
@@ -150,7 +150,7 @@ export function noteSteps(session, pointOfSale) {
|
|
|
150
150
|
{
|
|
151
151
|
name: 'concepto',
|
|
152
152
|
run: async () => {
|
|
153
|
-
const concept = await chooseStep('¿
|
|
153
|
+
const concept = await chooseStep('¿Qué concepto ajusta la nota?', conceptChoices());
|
|
154
154
|
return concept === BACK ? BACK : { concept };
|
|
155
155
|
},
|
|
156
156
|
skip: (state) => !isPeriod(state),
|
|
@@ -173,7 +173,7 @@ export function noteSteps(session, pointOfSale) {
|
|
|
173
173
|
{
|
|
174
174
|
name: 'alicuota',
|
|
175
175
|
run: async (state) => {
|
|
176
|
-
const ivaRate = await chooseStep(isPeriod(state) ? '
|
|
176
|
+
const ivaRate = await chooseStep(isPeriod(state) ? 'Alícuota de IVA:' : 'Alícuota de IVA de la factura:', ivaRateChoices());
|
|
177
177
|
return ivaRate === BACK ? BACK : { ivaRate };
|
|
178
178
|
},
|
|
179
179
|
// En la C no hay IVA; si la factura deja deducir la alicuota, no se pregunta.
|
|
@@ -183,7 +183,7 @@ export function noteSteps(session, pointOfSale) {
|
|
|
183
183
|
name: 'anulacion',
|
|
184
184
|
run: async () => {
|
|
185
185
|
const cancellation = await chooseStep('¿El comprador rechazo la factura?', [
|
|
186
|
-
{ name: '
|
|
186
|
+
{ name: 'Sí, es una nota de anulación', value: true },
|
|
187
187
|
{ name: 'No', value: false },
|
|
188
188
|
]);
|
|
189
189
|
return cancellation === BACK ? BACK : { cancellation };
|
|
@@ -236,4 +236,3 @@ export async function runNoteFlow(session, kind) {
|
|
|
236
236
|
}
|
|
237
237
|
await previewAndEmit(session, buildNoteInput(state, session, pointOfSale));
|
|
238
238
|
}
|
|
239
|
-
//# sourceMappingURL=note.flow.js.map
|
|
@@ -10,7 +10,7 @@ const ISSUER_QUESTIONS = {
|
|
|
10
10
|
cuit: 'CUIT del emisor',
|
|
11
11
|
'emisor.domicilio': 'Domicilio comercial del emisor',
|
|
12
12
|
'emisor.inicioActividades': 'Fecha de inicio de actividades (D/MM/YYYY)',
|
|
13
|
-
'emisor.razonSocial': '
|
|
13
|
+
'emisor.razonSocial': 'Razón social o nombre del emisor',
|
|
14
14
|
};
|
|
15
15
|
function validateConfigValue(key, value) {
|
|
16
16
|
try {
|
|
@@ -42,7 +42,7 @@ async function completeIssuer(config) {
|
|
|
42
42
|
answers.push([key, value]);
|
|
43
43
|
completed = applyIssuerValue(completed, key, value);
|
|
44
44
|
}
|
|
45
|
-
if (await confirm('¿Guardamos estos datos en la config para la
|
|
45
|
+
if (await confirm('¿Guardamos estos datos en la config para la próxima?', 'Sí, guardar', 'No, solo esta vez')) {
|
|
46
46
|
const service = new ConfigService();
|
|
47
47
|
try {
|
|
48
48
|
for (const [key, value] of answers) {
|
|
@@ -67,12 +67,15 @@ export async function offerPdf(config, input, result) {
|
|
|
67
67
|
// Ya se emitio: un Ctrl+C aca no puede terminar en "No se emitio nada".
|
|
68
68
|
try {
|
|
69
69
|
if (decision === 'preguntar' &&
|
|
70
|
-
!(await confirm('¿Generamos el PDF del comprobante?', '
|
|
70
|
+
!(await confirm('¿Generamos el PDF del comprobante?', 'Sí, generar el PDF', 'No'))) {
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
-
const description = await askText('
|
|
74
|
-
|
|
75
|
-
const
|
|
73
|
+
const description = await askText('Descripción del comprobante (Enter para "Según detalle")');
|
|
74
|
+
// Lo que trajo el padron se propone: Enter lo deja, en lugar de borrarlo.
|
|
75
|
+
const receiverName = await askText(input.receiverName
|
|
76
|
+
? 'Nombre o razón social del receptor:'
|
|
77
|
+
: 'Nombre o razón social del receptor (Enter para omitir)', { defaultValue: input.receiverName });
|
|
78
|
+
const receiverAddress = await askText(input.receiverAddress ? 'Domicilio del receptor:' : 'Domicilio del receptor (Enter para omitir)', { defaultValue: input.receiverAddress });
|
|
76
79
|
const completedConfig = await completeIssuer(config);
|
|
77
80
|
const withPdf = await attachPdfs({
|
|
78
81
|
config: completedConfig,
|
|
@@ -97,4 +100,3 @@ export async function offerPdf(config, input, result) {
|
|
|
97
100
|
writeTerminalOutput(noticePanel('El comprobante ya quedo emitido; no se genero el PDF.', 'muted'));
|
|
98
101
|
}
|
|
99
102
|
}
|
|
100
|
-
//# sourceMappingURL=pdf.flow.js.map
|
|
@@ -13,7 +13,7 @@ async function lookupReceiver(session, state) {
|
|
|
13
13
|
if (state.receiver?.cuit === cuit) {
|
|
14
14
|
return state.receiver;
|
|
15
15
|
}
|
|
16
|
-
const spinner = startSpinner('Consultando el
|
|
16
|
+
const spinner = startSpinner('Consultando el padrón...');
|
|
17
17
|
try {
|
|
18
18
|
const taxpayer = await new ArcaPadronGateway(session.arca).getTaxpayer(cuit);
|
|
19
19
|
return {
|
|
@@ -37,8 +37,8 @@ async function lookupReceiver(session, state) {
|
|
|
37
37
|
export async function askReceiverIvaCondition(session, state, letter, configDefault) {
|
|
38
38
|
const receiver = await lookupReceiver(session, state);
|
|
39
39
|
const fromPadron = receiver?.ivaCondition && isIvaConditionAllowed(letter, receiver.ivaCondition) ? receiver.ivaCondition : undefined;
|
|
40
|
-
const choices = ivaConditionChoices(letter).map((choice) => choice.value === fromPadron ? { ...choice, name: `${choice.name} (
|
|
41
|
-
const ivaCondition = await chooseStep(receiver?.name ? `
|
|
40
|
+
const choices = ivaConditionChoices(letter).map((choice) => choice.value === fromPadron ? { ...choice, name: `${choice.name} (según el padrón)` } : choice);
|
|
41
|
+
const ivaCondition = await chooseStep(receiver?.name ? `Condición frente al IVA de ${receiver.name}:` : 'Condición frente al IVA del receptor:', choices, fromPadron ?? configDefault);
|
|
42
42
|
return ivaCondition === BACK ? BACK : { ivaCondition, receiver };
|
|
43
43
|
}
|
|
44
44
|
/** Nombre, domicilio y origen del IVA para la entrada del CLI: el PDF y la vista previa los muestran. */
|
|
@@ -50,4 +50,3 @@ export function receiverInputFields(state) {
|
|
|
50
50
|
receiverName: receiver?.name,
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
//# sourceMappingURL=receiver-padron.js.map
|
|
@@ -32,7 +32,7 @@ export function repeatSteps(session, pointOfSale, today = new Date()) {
|
|
|
32
32
|
{
|
|
33
33
|
name: 'tipo',
|
|
34
34
|
run: async () => {
|
|
35
|
-
const voucherKind = await chooseStep('¿
|
|
35
|
+
const voucherKind = await chooseStep('¿Qué tipo de factura querés repetir?', invoiceKindChoices());
|
|
36
36
|
return voucherKind === BACK ? BACK : { voucherKind };
|
|
37
37
|
},
|
|
38
38
|
},
|
|
@@ -40,7 +40,7 @@ export function repeatSteps(session, pointOfSale, today = new Date()) {
|
|
|
40
40
|
name: 'factura',
|
|
41
41
|
run: async (state) => {
|
|
42
42
|
const voucherKind = state.voucherKind;
|
|
43
|
-
const picked = await pickInvoice(session, { message: '¿
|
|
43
|
+
const picked = await pickInvoice(session, { message: '¿Cuál repetimos?', pointOfSale, voucherKind });
|
|
44
44
|
if (picked === BACK) {
|
|
45
45
|
return BACK;
|
|
46
46
|
}
|
|
@@ -52,7 +52,7 @@ export function repeatSteps(session, pointOfSale, today = new Date()) {
|
|
|
52
52
|
}
|
|
53
53
|
const copy = copyInvoiceAmounts(original, voucherKind.letter);
|
|
54
54
|
if (copy.limitation) {
|
|
55
|
-
writeTerminalOutput(noticePanel(`${copy.limitation} Revisa la
|
|
55
|
+
writeTerminalOutput(noticePanel(`${copy.limitation} Revisa la alícuota y el monto antes de emitir.`, 'warning'));
|
|
56
56
|
}
|
|
57
57
|
return {
|
|
58
58
|
advanced: {
|
|
@@ -87,7 +87,7 @@ export function repeatSteps(session, pointOfSale, today = new Date()) {
|
|
|
87
87
|
const reproducible = !copyInvoiceAmounts(original, state.voucherKind?.letter ?? 'c').limitation;
|
|
88
88
|
const scope = reproducible
|
|
89
89
|
? await chooseStep('¿Mismo monto?', [
|
|
90
|
-
{ name: `
|
|
90
|
+
{ name: `Sí, ${formatMoneyLabel(original.total)}`, value: 'mismo' },
|
|
91
91
|
{ name: 'No, ingresar otro monto', value: 'otro' },
|
|
92
92
|
])
|
|
93
93
|
: 'otro';
|
|
@@ -103,11 +103,11 @@ export function repeatSteps(session, pointOfSale, today = new Date()) {
|
|
|
103
103
|
run: async (state) => {
|
|
104
104
|
const current = currentMonthPeriod(today);
|
|
105
105
|
const previous = previousMonthPeriod(today);
|
|
106
|
-
const choice = await chooseStep('
|
|
106
|
+
const choice = await chooseStep('Período del servicio:', [
|
|
107
107
|
{ description: describePeriod(current), name: 'Este mes', value: current },
|
|
108
108
|
{ description: describePeriod(previous), name: 'El mes pasado', value: previous },
|
|
109
109
|
{ description: 'Desde y hasta hoy', name: 'Solo hoy', value: 'hoy' },
|
|
110
|
-
{ name: 'Otro
|
|
110
|
+
{ name: 'Otro período', value: 'otro' },
|
|
111
111
|
]);
|
|
112
112
|
if (choice === BACK) {
|
|
113
113
|
return BACK;
|
|
@@ -142,7 +142,7 @@ export function repeatSteps(session, pointOfSale, today = new Date()) {
|
|
|
142
142
|
// La cotizacion de la factura original ya no sirve: si era en moneda extranjera, arranca marcada.
|
|
143
143
|
const foreign = !LOCAL_CURRENCIES.has(state.original?.currency);
|
|
144
144
|
if (foreign) {
|
|
145
|
-
writeTerminalOutput(noticePanel('La factura original era en moneda extranjera: completa la moneda y la
|
|
145
|
+
writeTerminalOutput(noticePanel('La factura original era en moneda extranjera: completa la moneda y la cotización.', 'info'));
|
|
146
146
|
}
|
|
147
147
|
const advanced = await askAdvancedOptions(state.advanced, {
|
|
148
148
|
concept: state.concept ?? 'servicios',
|
|
@@ -172,4 +172,3 @@ export async function runRepeatFlow(session) {
|
|
|
172
172
|
}
|
|
173
173
|
await previewAndEmit(session, buildInvoiceInput(state, session));
|
|
174
174
|
}
|
|
175
|
-
//# sourceMappingURL=repeat.flow.js.map
|
|
@@ -39,7 +39,7 @@ export function requirePointOfSale(session) {
|
|
|
39
39
|
}
|
|
40
40
|
return session.runtime.pointOfSale;
|
|
41
41
|
}
|
|
42
|
-
function formatEquivalentCommand(command) {
|
|
42
|
+
export function formatEquivalentCommand(command) {
|
|
43
43
|
return renderPanel({
|
|
44
44
|
borderType: 'command',
|
|
45
45
|
content: [colorize('Esto equivale a:', 'muted'), '', colorize(command, 'info')],
|
|
@@ -61,16 +61,19 @@ export async function previewAndEmit(session, rawInput) {
|
|
|
61
61
|
: [];
|
|
62
62
|
const preview = await service.execute({ gateway: PREVIEW_GATEWAY, input, runtime, warnings });
|
|
63
63
|
writeTerminalOutput(formatBillingOutputs([preview], { environment: runtime.environment, raw: false }));
|
|
64
|
-
writeTerminalOutput(formatEquivalentCommand(buildEquivalentCommand(input, {
|
|
64
|
+
writeTerminalOutput(formatEquivalentCommand(buildEquivalentCommand(input, {
|
|
65
|
+
defaultCurrency: runtime.config.monedaPorDefecto,
|
|
66
|
+
environment: runtime.environment,
|
|
67
|
+
})));
|
|
65
68
|
const label = preview.voucherKind.displayName;
|
|
66
|
-
const environmentLabel = runtime.environment === 'produccion' ? '
|
|
69
|
+
const environmentLabel = runtime.environment === 'produccion' ? 'PRODUCCIÓN' : 'testing';
|
|
67
70
|
if (!(await confirm(`¿Emitimos la ${label} en ${environmentLabel}?`, 'Emitir ahora'))) {
|
|
68
|
-
writeTerminalOutput(noticePanel('No se
|
|
71
|
+
writeTerminalOutput(noticePanel('No se emitió nada.', 'muted'));
|
|
69
72
|
return;
|
|
70
73
|
}
|
|
71
74
|
if (runtime.environment === 'produccion' &&
|
|
72
|
-
!(await confirm('Vas a emitir un comprobante real en
|
|
73
|
-
writeTerminalOutput(noticePanel('No se
|
|
75
|
+
!(await confirm('Vas a emitir un comprobante real en PRODUCCIÓN. ¿Confirmás?', 'Sí, emitir en producción'))) {
|
|
76
|
+
writeTerminalOutput(noticePanel('No se emitió nada.', 'muted'));
|
|
74
77
|
return;
|
|
75
78
|
}
|
|
76
79
|
const spinner = startSpinner(`Emitiendo ${label} en ARCA...`);
|
|
@@ -90,4 +93,3 @@ export async function previewAndEmit(session, rawInput) {
|
|
|
90
93
|
throw error;
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
|
-
//# sourceMappingURL=session.js.map
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { parseArgentineDateInputAsArcaDate } from '../../lib/dates/arca-date.js';
|
|
2
|
+
import { parseCuit } from '../../lib/identity/cuit.js';
|
|
2
3
|
import { EXCHANGE_RATE_DECIMALS, parseArgentineAmount } from '../../lib/numbers/argentine-amount.js';
|
|
3
4
|
export function validateAmount(value) {
|
|
4
5
|
const result = parseArgentineAmount(value);
|
|
5
|
-
return result.ok ? true : `Monto
|
|
6
|
+
return result.ok ? true : `Monto inválido: ${result.reason}. Por ejemplo 150000, 150.000 o 1.500,50.`;
|
|
6
7
|
}
|
|
7
8
|
export function validateCuit(value) {
|
|
8
|
-
|
|
9
|
+
const result = parseCuit(value);
|
|
10
|
+
return result.ok ? true : `El CUIT ${result.reason}.`;
|
|
9
11
|
}
|
|
10
12
|
export function validateDni(value) {
|
|
11
13
|
return /^\d{7,8}$/.test(value.replace(/\./g, '')) ? true : 'El DNI tiene 7 u 8 digitos.';
|
|
@@ -22,7 +24,7 @@ export function validateDate(value) {
|
|
|
22
24
|
return true;
|
|
23
25
|
}
|
|
24
26
|
catch {
|
|
25
|
-
return 'Fecha
|
|
27
|
+
return 'Fecha inválida. Usa D/M/AAAA, D/M o solo el día (por ejemplo 15/10).';
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
/** Monto opcional: vacio es "no", si no tiene que ser un monto valido. */
|
|
@@ -32,8 +34,7 @@ export function validateOptionalAmount(value) {
|
|
|
32
34
|
export function validateExchangeRate(value) {
|
|
33
35
|
const result = parseArgentineAmount(value, { maxDecimals: EXCHANGE_RATE_DECIMALS });
|
|
34
36
|
if (!result.ok) {
|
|
35
|
-
return `
|
|
37
|
+
return `Cotización inválida: ${result.reason}. Por ejemplo 1200 o 1.185,50.`;
|
|
36
38
|
}
|
|
37
|
-
return result.value !== 1 ? true : 'Ingresa la
|
|
39
|
+
return result.value !== 1 ? true : 'Ingresa la cotización acordada, por ejemplo 1200 o 1.185,50.';
|
|
38
40
|
}
|
|
39
|
-
//# sourceMappingURL=validators.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { InputValidationError } from '../lib/errors/app-error.js';
|
|
2
|
+
import { parseCuit } from '../lib/identity/cuit.js';
|
|
2
3
|
import { parseArgentineAmount } from '../lib/numbers/argentine-amount.js';
|
|
3
4
|
import { parseDocumentNumber, parseStrictInteger } from '../lib/numbers/strict-integer.js';
|
|
4
5
|
/** Montos como en Argentina: punto para miles y coma para decimales. */
|
|
@@ -6,7 +7,7 @@ export function amountOption(flag, maxDecimals) {
|
|
|
6
7
|
return (value) => {
|
|
7
8
|
const result = parseArgentineAmount(value, { maxDecimals });
|
|
8
9
|
if (!result.ok) {
|
|
9
|
-
throw new InputValidationError(`${flag} "${value}" no es
|
|
10
|
+
throw new InputValidationError(`${flag} "${value}" no es válido: ${result.reason}.`);
|
|
10
11
|
}
|
|
11
12
|
return result.value;
|
|
12
13
|
};
|
|
@@ -16,19 +17,28 @@ export function integerOption(flag) {
|
|
|
16
17
|
return (value) => {
|
|
17
18
|
const parsed = parseStrictInteger(value);
|
|
18
19
|
if (parsed === undefined) {
|
|
19
|
-
throw new InputValidationError(`${flag} "${value}" no es
|
|
20
|
+
throw new InputValidationError(`${flag} "${value}" no es válido: tiene que ser un número entero.`);
|
|
20
21
|
}
|
|
21
22
|
return parsed;
|
|
22
23
|
};
|
|
23
24
|
}
|
|
25
|
+
/** CUIT o CUIL: acepta guiones y puntos (`20-33333333-4`) y chequea el digito verificador. */
|
|
26
|
+
export function cuitOption(flag) {
|
|
27
|
+
return (value) => {
|
|
28
|
+
const result = parseCuit(value);
|
|
29
|
+
if (!result.ok) {
|
|
30
|
+
throw new InputValidationError(`${flag} "${value}" no es válido: ${result.reason}.`);
|
|
31
|
+
}
|
|
32
|
+
return result.value;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
24
35
|
/** CUIT, CUIL o DNI: acepta guiones y puntos (`20-11111111-2`). */
|
|
25
36
|
export function documentNumberOption(flag) {
|
|
26
37
|
return (value) => {
|
|
27
38
|
const parsed = parseDocumentNumber(value);
|
|
28
39
|
if (parsed === undefined) {
|
|
29
|
-
throw new InputValidationError(`${flag} "${value}" no es
|
|
40
|
+
throw new InputValidationError(`${flag} "${value}" no es válido: usá solo números, con o sin guiones.`);
|
|
30
41
|
}
|
|
31
42
|
return parsed;
|
|
32
43
|
};
|
|
33
44
|
}
|
|
34
|
-
//# sourceMappingURL=option-parsers.js.map
|
package/dist/cli/program.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import { registerBillingFamilyCommands } from './commands/billing-family.command.js';
|
|
3
3
|
import { registerBillingShortcutCommands } from './commands/billing-shortcuts.command.js';
|
|
4
|
+
import { registerCompletionCommands } from './commands/completion.command.js';
|
|
4
5
|
import { registerConfigCommand } from './commands/config.command.js';
|
|
5
6
|
import { registerExamplesCommand } from './commands/examples.command.js';
|
|
7
|
+
import { registerExportShortcutCommand } from './commands/export-shortcut.command.js';
|
|
6
8
|
import { registerFceObligationCommand } from './commands/fce-obligation.command.js';
|
|
7
9
|
import { registerInteractiveCommand } from './commands/interactive.command.js';
|
|
8
10
|
import { registerPadronCommand } from './commands/padron.command.js';
|
|
@@ -20,16 +22,18 @@ export function createProgram(options = {}) {
|
|
|
20
22
|
configureUsageErrors(program, options.errorsAsJson ?? (() => false));
|
|
21
23
|
program
|
|
22
24
|
.name('arcli')
|
|
23
|
-
.description('Emití y revisá comprobantes ARCA desde terminal con una UX
|
|
24
|
-
.version(CLI_VERSION)
|
|
25
|
+
.description('Emití y revisá comprobantes ARCA desde terminal con una UX más simple, validaciones claras y salida lista para automatizar.')
|
|
26
|
+
.version(CLI_VERSION, '-V, --version', 'mostrar la versión instalada')
|
|
25
27
|
.showHelpAfterError('(usa "ayuda" para ver comandos y ejemplos)');
|
|
26
28
|
configureSpanishHelp(program);
|
|
27
29
|
registerGlobalOptions(program);
|
|
28
30
|
warnAboutIgnoredGlobalOptions(program);
|
|
29
31
|
registerBillingShortcutCommands(program);
|
|
30
32
|
registerBillingFamilyCommands(program);
|
|
33
|
+
registerCompletionCommands(program);
|
|
31
34
|
registerConfigCommand(program);
|
|
32
35
|
registerExamplesCommand(program);
|
|
36
|
+
registerExportShortcutCommand(program);
|
|
33
37
|
registerFceObligationCommand(program);
|
|
34
38
|
registerInteractiveCommand(program);
|
|
35
39
|
registerPadronCommand(program);
|
|
@@ -41,4 +45,3 @@ export function createProgram(options = {}) {
|
|
|
41
45
|
program.addHelpText('afterAll', ({ command }) => (command === program ? createProgramHelp() : ''));
|
|
42
46
|
return program;
|
|
43
47
|
}
|
|
44
|
-
//# sourceMappingURL=program.js.map
|