arcli 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -1
- package/README.md +6 -0
- 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 +41 -14
- 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,40 @@
|
|
|
1
|
+
import { formatArgentineAmountInput } from '../../lib/numbers/argentine-amount.js';
|
|
2
|
+
import { DEFAULT_EXPORT_PAYMENT_TERMS } from '../export/export.mappers.js';
|
|
3
|
+
import { DEFAULT_EXPORT_TYPE, EXPORT_VOUCHER_KIND } from '../export/export.types.js';
|
|
4
|
+
/** Comillas solo cuando hacen falta, para que se pueda pegar en bash, zsh o fish. */
|
|
5
|
+
function quote(value) {
|
|
6
|
+
return /^[\w./:,-]+$/.test(value) ? value : `"${value.replace(/(["\\$`])/g, '\\$1')}"`;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* `arcli fe` que reproduce la factura E armada por el asistente. La actividad va siempre explicita: si la config
|
|
10
|
+
* cambia, el comando pegado sigue informando la misma.
|
|
11
|
+
*/
|
|
12
|
+
export function buildExportEquivalentCommand(input, options) {
|
|
13
|
+
const parts = ['arcli', EXPORT_VOUCHER_KIND.shortcut, '-m', formatArgentineAmountInput(input.amount ?? 0)];
|
|
14
|
+
const text = (flag, value) => {
|
|
15
|
+
if (value?.trim())
|
|
16
|
+
parts.push(flag, quote(value.trim()));
|
|
17
|
+
};
|
|
18
|
+
text('--cliente', input.clientName);
|
|
19
|
+
text('--domicilio-cliente', input.clientAddress);
|
|
20
|
+
text('--pais-destino', input.destinationCountry);
|
|
21
|
+
text('--id-impositivo', input.clientTaxId);
|
|
22
|
+
if (input.exportType !== undefined && input.exportType !== DEFAULT_EXPORT_TYPE) {
|
|
23
|
+
parts.push('--tipo-expo', String(input.exportType));
|
|
24
|
+
}
|
|
25
|
+
parts.push('--actividad', String(options.activity));
|
|
26
|
+
if (input.voucherNumber !== undefined)
|
|
27
|
+
parts.push('--numero', String(input.voucherNumber));
|
|
28
|
+
text('--descripcion', input.description);
|
|
29
|
+
text('--moneda', input.currencyCode);
|
|
30
|
+
if (input.sameCurrency)
|
|
31
|
+
parts.push('--misma-moneda');
|
|
32
|
+
text('--incoterm', input.incoterm);
|
|
33
|
+
if (input.paymentTerms?.trim() && input.paymentTerms.trim() !== DEFAULT_EXPORT_PAYMENT_TERMS) {
|
|
34
|
+
text('--forma-pago', input.paymentTerms);
|
|
35
|
+
}
|
|
36
|
+
text('--fecha-pago', input.paymentDate);
|
|
37
|
+
// Siempre explicito: si la config cambia de entorno, el comando pegado sigue emitiendo donde se armo.
|
|
38
|
+
parts.push(`--${options.environment}`, '--emitir');
|
|
39
|
+
return parts.join(' ');
|
|
40
|
+
}
|
|
@@ -12,7 +12,7 @@ export function copyInvoiceAmounts(invoice, letter) {
|
|
|
12
12
|
const limitation = (invoice.taxesAmount ?? 0) > 0
|
|
13
13
|
? 'La factura tiene tributos o percepciones, que ARCLI no maneja.'
|
|
14
14
|
: discriminatesIva && invoice.netAmount > 0 && !ivaRate
|
|
15
|
-
? 'No se pudo deducir la
|
|
15
|
+
? 'No se pudo deducir la alícuota de la factura: tiene varias o una que no es estandar.'
|
|
16
16
|
: undefined;
|
|
17
17
|
return {
|
|
18
18
|
currencyCode,
|
|
@@ -23,4 +23,3 @@ export function copyInvoiceAmounts(invoice, letter) {
|
|
|
23
23
|
untaxedAmount: discriminatesIva ? invoice.untaxedAmount || undefined : undefined,
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
//# sourceMappingURL=invoice-copy.js.map
|
|
@@ -2,12 +2,12 @@ import { keyValuePanel, renderKeyValueRows, resolveKeyValueLabelWidth } from '..
|
|
|
2
2
|
import { formatIvaConditionName } from '../pdf/pdf-issuer.js';
|
|
3
3
|
const PERSON_TYPE_LABELS = {
|
|
4
4
|
fisica: 'Persona fisica',
|
|
5
|
-
juridica: 'Persona
|
|
5
|
+
juridica: 'Persona jurídica',
|
|
6
6
|
};
|
|
7
7
|
/** La primera es la principal (`orden` 1 en ARCA); el resto va en el JSON. */
|
|
8
8
|
function formatMainActivity(taxpayer) {
|
|
9
9
|
const [main, ...others] = taxpayer.activities;
|
|
10
|
-
const more = others.length === 0 ? '' : ` (y ${others.length}
|
|
10
|
+
const more = others.length === 0 ? '' : ` (y ${others.length} más)`;
|
|
11
11
|
return `${main?.description ?? '-'}${more}`;
|
|
12
12
|
}
|
|
13
13
|
export function formatPadronAsJson(report) {
|
|
@@ -35,15 +35,14 @@ export function formatPadronAsText(report) {
|
|
|
35
35
|
['Tipo', taxpayer.personType ? PERSON_TYPE_LABELS[taxpayer.personType] : '-'],
|
|
36
36
|
['Estado', taxpayer.keyStatus ?? '-'],
|
|
37
37
|
['Domicilio fiscal', taxpayer.address ?? '-'],
|
|
38
|
-
['
|
|
39
|
-
...(taxpayer.monotributoCategory ? [['
|
|
38
|
+
['Condición IVA', taxpayer.ivaCondition ? formatIvaConditionName(taxpayer.ivaCondition) : 'sin informar'],
|
|
39
|
+
...(taxpayer.monotributoCategory ? [['Categoría monotributo', taxpayer.monotributoCategory]] : []),
|
|
40
40
|
...(activeTaxes.length > 0 ? [['Impuestos', activeTaxes.join(', ')]] : []),
|
|
41
41
|
...(taxpayer.activities.length > 0 ? [['Actividad principal', formatMainActivity(taxpayer)]] : []),
|
|
42
42
|
...taxpayer.notices.map((notice) => ['Aviso de ARCA', notice]),
|
|
43
43
|
];
|
|
44
44
|
const footer = taxpayer.ivaCondition
|
|
45
45
|
? `Con --cuit ${taxpayer.cuit}, arcli completa solo el IVA receptor.`
|
|
46
|
-
: 'El
|
|
47
|
-
return keyValuePanel('
|
|
46
|
+
: 'El padrón no informa la condición IVA: indicala con --ir al facturar.';
|
|
47
|
+
return keyValuePanel('Padrón de ARCA', renderKeyValueRows(rows, { labelWidth: resolveKeyValueLabelWidth('standard', rows, [25, 75]) }), footer, 'standard', undefined, 'sheet');
|
|
48
48
|
}
|
|
49
|
-
//# sourceMappingURL=padron.presenter.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InputValidationError } from '../../lib/errors/app-error.js';
|
|
2
2
|
/** Tablas de referencia de ARCA (wsfe) que se pueden consultar con `arcli parametros <tabla>`. */
|
|
3
3
|
export const PARAMETER_TABLES = {
|
|
4
|
-
alicuotas: '
|
|
4
|
+
alicuotas: 'Alícuotas de IVA',
|
|
5
5
|
comprobantes: 'Tipos de comprobante',
|
|
6
6
|
conceptos: 'Conceptos',
|
|
7
7
|
documentos: 'Tipos de documento',
|
|
@@ -17,7 +17,7 @@ export function resolveParameterTable(value) {
|
|
|
17
17
|
if (normalized in PARAMETER_TABLES) {
|
|
18
18
|
return normalized;
|
|
19
19
|
}
|
|
20
|
-
throw new InputValidationError(`La tabla "${value}" no existe.
|
|
20
|
+
throw new InputValidationError(`La tabla "${value}" no existe. Usá una de estas: ${PARAMETER_TABLE_NAMES.join(', ')}, o "cotizacion <moneda>".`);
|
|
21
21
|
}
|
|
22
22
|
/** ARCA devuelve tambien valores dados de baja: solo quedan los vigentes a `today` (yyyymmdd). */
|
|
23
23
|
export function filterCurrentEntries(entries, today) {
|
|
@@ -31,4 +31,3 @@ export function salesPointToEntry(point) {
|
|
|
31
31
|
validTo: point.closedOn,
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
//# sourceMappingURL=parameters.js.map
|
|
@@ -4,22 +4,22 @@ import { keyValuePanel, noticePanel, renderKeyValueRows, resolveKeyValueLabelWid
|
|
|
4
4
|
import { PARAMETER_TABLE_NAMES, PARAMETER_TABLES, } from './parameters.js';
|
|
5
5
|
export function formatParameterTablesAsText() {
|
|
6
6
|
const rows = PARAMETER_TABLE_NAMES.map((name) => [name, PARAMETER_TABLES[name]]);
|
|
7
|
-
const allRows = [...rows, ['
|
|
7
|
+
const allRows = [...rows, ['cotización <moneda>', 'Cotización oficial de ARCA, por ejemplo USD']];
|
|
8
8
|
return keyValuePanel('Tablas de ARCA', renderKeyValueRows(allRows, { labelWidth: resolveKeyValueLabelWidth('standard', allRows, [30, 70]) }), 'Uso: arcli parametros <tabla>', 'standard', undefined, 'sheet');
|
|
9
9
|
}
|
|
10
10
|
export function formatParameterTablesAsJson() {
|
|
11
11
|
return JSON.stringify({
|
|
12
12
|
tablas: [
|
|
13
13
|
...PARAMETER_TABLE_NAMES.map((name) => ({ descripcion: PARAMETER_TABLES[name], tabla: name })),
|
|
14
|
-
{ descripcion: '
|
|
14
|
+
{ descripcion: 'Cotización oficial de ARCA', tabla: 'cotizacion' },
|
|
15
15
|
],
|
|
16
16
|
}, null, 2);
|
|
17
17
|
}
|
|
18
18
|
export function formatParameterEntriesAsText(table, entries, environment) {
|
|
19
19
|
if (entries.length === 0) {
|
|
20
20
|
const reason = table === 'puntos-venta' && environment === 'testing'
|
|
21
|
-
? 'En testing ARCA no informa puntos de venta: cualquier
|
|
22
|
-
: `ARCA no
|
|
21
|
+
? 'En testing ARCA no informa puntos de venta: cualquier número sirve para probar.'
|
|
22
|
+
: `ARCA no devolvió valores para ${PARAMETER_TABLES[table].toLowerCase()}.`;
|
|
23
23
|
return noticePanel(reason, 'muted');
|
|
24
24
|
}
|
|
25
25
|
const idWidth = Math.max(...entries.map((entry) => entry.id.length));
|
|
@@ -41,10 +41,10 @@ export function formatParameterEntriesAsJson(table, entries, environment) {
|
|
|
41
41
|
export function formatQuotationAsText(quotation, environment) {
|
|
42
42
|
const rows = [
|
|
43
43
|
['Moneda', quotation.currency],
|
|
44
|
-
['
|
|
44
|
+
['Cotización', new Intl.NumberFormat('es-AR', { maximumFractionDigits: 6 }).format(quotation.rate)],
|
|
45
45
|
['Fecha', quotation.date ? formatArcaDateAsArgentineDate(quotation.date) : 'N/D'],
|
|
46
46
|
];
|
|
47
|
-
return keyValuePanel(`
|
|
47
|
+
return keyValuePanel(`Cotización oficial · ${environment}`, renderKeyValueRows(rows, { labelWidth: resolveKeyValueLabelWidth('standard', rows, [30, 70]) }), undefined, 'standard', undefined, 'sheet');
|
|
48
48
|
}
|
|
49
49
|
export function formatQuotationAsJson(quotation, environment) {
|
|
50
50
|
return JSON.stringify({ cotizacion: quotation.rate, entorno: environment, fecha: quotation.date ?? null, moneda: quotation.currency }, null, 2);
|
|
@@ -58,7 +58,7 @@ function describePointOfSale(check, number) {
|
|
|
58
58
|
case 'de-baja':
|
|
59
59
|
return `${number} dado de baja`;
|
|
60
60
|
case 'no-encontrado':
|
|
61
|
-
return `${number} no
|
|
61
|
+
return `${number} no está habilitado para web service en este CUIT`;
|
|
62
62
|
case 'sin-datos':
|
|
63
63
|
return `${number} (en testing ARCA no informa puntos de venta)`;
|
|
64
64
|
case 'sin-configurar':
|
|
@@ -68,7 +68,7 @@ function describePointOfSale(check, number) {
|
|
|
68
68
|
export function formatStatusAsText(report) {
|
|
69
69
|
const rows = [
|
|
70
70
|
['Entorno', report.environment],
|
|
71
|
-
['Servidor de
|
|
71
|
+
['Servidor de aplicación', report.servers.app],
|
|
72
72
|
['Base de datos', report.servers.db],
|
|
73
73
|
['Autenticacion', report.servers.auth],
|
|
74
74
|
['Tiempo de respuesta', `${report.latencyMs} ms`],
|
|
@@ -77,12 +77,12 @@ export function formatStatusAsText(report) {
|
|
|
77
77
|
const footer = report.ready
|
|
78
78
|
? 'ARCA responde: se puede emitir'
|
|
79
79
|
: report.pointOfSale.kind === 'sin-configurar'
|
|
80
|
-
? '
|
|
80
|
+
? 'Configurá el punto de venta: arcli config establecer puntoVenta <numero>'
|
|
81
81
|
: report.pointOfSale.kind === 'habilitado' || report.pointOfSale.kind === 'sin-datos'
|
|
82
|
-
? 'ARCA tiene problemas:
|
|
82
|
+
? 'ARCA tiene problemas: esperá unos minutos y reintentá'
|
|
83
83
|
: report.pointOfSale.kind === 'no-encontrado'
|
|
84
|
-
? `
|
|
85
|
-
: '
|
|
84
|
+
? `Revisá el punto de venta: arcli parametros puntos-venta. Los de "Factura en línea" no sirven; para crear uno para web service: ${POINT_OF_SALE_GUIDE_URL}`
|
|
85
|
+
: 'Revisá el punto de venta: arcli parametros puntos-venta';
|
|
86
86
|
return keyValuePanel('Estado de ARCA', renderKeyValueRows(rows, { labelWidth: resolveKeyValueLabelWidth('standard', rows, [30, 70]) }), footer, 'standard', report.ready ? 'success' : 'warning', 'sheet');
|
|
87
87
|
}
|
|
88
88
|
export function formatStatusAsJson(report) {
|
|
@@ -103,4 +103,3 @@ export function formatStatusAsJson(report) {
|
|
|
103
103
|
},
|
|
104
104
|
}, null, 2);
|
|
105
105
|
}
|
|
106
|
-
//# sourceMappingURL=parameters.presenter.js.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { resolveIvaRateLabel } from '../billing/billing.amounts.js';
|
|
2
2
|
import { formatIvaConditionLabel } from '../billing/billing.labels.js';
|
|
3
3
|
import { PdfError } from './pdf.errors.js';
|
|
4
|
-
|
|
4
|
+
import { buildPdfLegends, EXPORT_IVA_LEGEND } from './pdf-legends.js';
|
|
5
|
+
export const DEFAULT_ITEM_DESCRIPTION = 'Según detalle';
|
|
5
6
|
// Mismos nombres que usa la plantilla del SDK para calcular el tipo de documento del QR.
|
|
6
7
|
const DOCUMENT_TYPE_NAMES = {
|
|
7
8
|
80: 'CUIT',
|
|
@@ -62,7 +63,7 @@ function buildItems(result, description) {
|
|
|
62
63
|
function resolveVoucherNumber(result) {
|
|
63
64
|
const number = result.response.raw?.response?.FeDetResp?.FECAEDetResponse?.[0]?.CbteDesde ?? result.payload.CbteDesde;
|
|
64
65
|
if (!number) {
|
|
65
|
-
throw new PdfError('PDF_GENERATION_ERROR', 'La respuesta de ARCA no trae el
|
|
66
|
+
throw new PdfError('PDF_GENERATION_ERROR', 'La respuesta de ARCA no trae el número del comprobante.');
|
|
66
67
|
}
|
|
67
68
|
return number;
|
|
68
69
|
}
|
|
@@ -110,6 +111,7 @@ export function mapBillingResultToPdfData(result, issuer, extras = {}) {
|
|
|
110
111
|
iva: iva.length > 0 ? iva : undefined,
|
|
111
112
|
// La plantilla del SDK solo conoce pesos y dolares; el resto se muestra con su codigo ARCA.
|
|
112
113
|
moneda: CURRENCY_CODES[payload.MonId] ?? payload.MonId,
|
|
114
|
+
observaciones: buildPdfLegends(result),
|
|
113
115
|
puntoVenta: payload.PtoVta,
|
|
114
116
|
receptor: {
|
|
115
117
|
condicionIva: capitalizeWords(formatIvaConditionLabel(payload.CondicionIVAReceptorId)),
|
|
@@ -121,4 +123,93 @@ export function mapBillingResultToPdfData(result, issuer, extras = {}) {
|
|
|
121
123
|
},
|
|
122
124
|
};
|
|
123
125
|
}
|
|
124
|
-
|
|
126
|
+
/** En WSFEX el numero tambien lo asigna ARCA al autorizar. */
|
|
127
|
+
function resolveExportVoucherNumber(result) {
|
|
128
|
+
const number = result.response.raw?.FEXAuthorizeResult?.FEXResultAuth?.Cbte_nro || result.payload.Cbte_nro;
|
|
129
|
+
if (!number) {
|
|
130
|
+
throw new PdfError('PDF_GENERATION_ERROR', 'La respuesta de ARCA no trae el número del comprobante.');
|
|
131
|
+
}
|
|
132
|
+
return number;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* WSFEX usa sus propios codigos de moneda (`DOL`, `060`), pero la E de Comprobantes en linea muestra la divisa con
|
|
136
|
+
* el codigo ISO: "USD - Dólar Estadounidense". Las que no estan aca salen con el codigo de WSFEX.
|
|
137
|
+
*/
|
|
138
|
+
/** El titulo que lleva la E de Comprobantes en linea, en lugar del "FACTURA" de la plantilla. */
|
|
139
|
+
const EXPORT_VOUCHER_TITLE = 'FACTURA DE EXPORTACIÓN';
|
|
140
|
+
const ISO_CURRENCY_CODES = { '012': 'BRL', '060': 'EUR', DOL: 'USD', PES: 'ARS' };
|
|
141
|
+
function formatExportDivisa(result) {
|
|
142
|
+
const { Moneda_Id: code } = result.payload;
|
|
143
|
+
const isoCode = ISO_CURRENCY_CODES[code.trim().toUpperCase()] ?? code;
|
|
144
|
+
return result.display.currencyName ? `${isoCode} - ${result.display.currencyName}` : isoCode;
|
|
145
|
+
}
|
|
146
|
+
/** Como en ARCA: "55000004242 (POLONIA - Persona Jurídica)", con el tipo de entidad de la tabla DST_CUIT. */
|
|
147
|
+
function formatExportCountryCuit(result) {
|
|
148
|
+
const { Cuit_pais_cliente: cuit } = result.payload;
|
|
149
|
+
const name = result.display.countryCuitName ?? result.display.countryName;
|
|
150
|
+
return name ? `${cuit} (${name})` : String(cuit);
|
|
151
|
+
}
|
|
152
|
+
function formatExportIncoterm(payload) {
|
|
153
|
+
const code = payload.Incoterms.trim();
|
|
154
|
+
const description = payload.Incoterms_Ds.trim();
|
|
155
|
+
if (!code) {
|
|
156
|
+
return undefined;
|
|
157
|
+
}
|
|
158
|
+
return description && description.toUpperCase() !== code.toUpperCase() ? `${code} - ${description}` : code;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* La letra E tiene su propio diseno en `@arcasdk/pdf`: destino, divisa, forma y fecha de pago, incoterm y la leyenda
|
|
162
|
+
* de IVA exento, con los items reales de WSFEX. `concepto` e `importeNetoGravado` los pide el tipo del plugin, pero la
|
|
163
|
+
* plantilla de la E no los muestra.
|
|
164
|
+
*/
|
|
165
|
+
export function mapExportResultToPdfData(result, issuer, extras = {}) {
|
|
166
|
+
const { display, payload, response } = result;
|
|
167
|
+
if (!response.cae || !response.caeVencimiento) {
|
|
168
|
+
throw new PdfError('PDF_GENERATION_ERROR', 'El comprobante no tiene CAE: no se puede generar el PDF.');
|
|
169
|
+
}
|
|
170
|
+
const number = resolveExportVoucherNumber(result);
|
|
171
|
+
const items = payload.Items.Item.map((item) => ({
|
|
172
|
+
cantidad: item.Pro_qty,
|
|
173
|
+
codigo: item.Pro_codigo || undefined,
|
|
174
|
+
descripcion: item.Pro_ds,
|
|
175
|
+
precioUnitario: item.Pro_precio_uni,
|
|
176
|
+
subtotal: item.Pro_total_item,
|
|
177
|
+
unidadMedida: display.unitNames[item.Pro_umed] ?? 'unidad',
|
|
178
|
+
}));
|
|
179
|
+
const observaciones = [payload.Obs_comerciales, payload.Obs].map((value) => value.trim()).filter(Boolean);
|
|
180
|
+
return {
|
|
181
|
+
cae: response.cae,
|
|
182
|
+
caeFechaVencimiento: response.caeVencimiento,
|
|
183
|
+
cbteDesde: number,
|
|
184
|
+
cbteFecha: payload.Fecha_cbte,
|
|
185
|
+
cbteDescripcion: EXPORT_VOUCHER_TITLE,
|
|
186
|
+
cbteHasta: number,
|
|
187
|
+
cbteLetra: result.voucherKind.letter.toUpperCase(),
|
|
188
|
+
cbteTipo: payload.Cbte_Tipo,
|
|
189
|
+
concepto: payload.Tipo_expo === 2 ? 2 : 1,
|
|
190
|
+
condicionIvaExportacion: EXPORT_IVA_LEGEND,
|
|
191
|
+
cotizacion: payload.Moneda_ctz,
|
|
192
|
+
destinoComprobante: display.countryName ?? String(payload.Dst_cmp),
|
|
193
|
+
divisa: formatExportDivisa(result),
|
|
194
|
+
emisor: issuer,
|
|
195
|
+
fechaPago: payload.Fecha_pago,
|
|
196
|
+
formaPago: payload.Forma_pago,
|
|
197
|
+
importeIva: 0,
|
|
198
|
+
importeNetoGravado: payload.Imp_total,
|
|
199
|
+
importeTotal: round(payload.Imp_total),
|
|
200
|
+
incoterms: formatExportIncoterm(payload),
|
|
201
|
+
items,
|
|
202
|
+
moneda: payload.Moneda_Id,
|
|
203
|
+
observaciones: observaciones.length > 0 ? observaciones.join(' · ') : undefined,
|
|
204
|
+
puntoVenta: payload.Punto_vta,
|
|
205
|
+
receptor: {
|
|
206
|
+
condicionIva: 'Cliente del exterior',
|
|
207
|
+
cuitPais: formatExportCountryCuit(result),
|
|
208
|
+
documentoNro: String(payload.Cuit_pais_cliente),
|
|
209
|
+
documentoTipo: 'CUIT',
|
|
210
|
+
domicilio: extras.receptorDomicilio?.trim() || payload.Domicilio_cliente,
|
|
211
|
+
idImpositivo: payload.Id_impositivo || undefined,
|
|
212
|
+
razonSocial: extras.receptorNombre?.trim() || payload.Cliente,
|
|
213
|
+
},
|
|
214
|
+
};
|
|
215
|
+
}
|
|
@@ -26,7 +26,7 @@ export function resolvePdfIssuer(config, letter) {
|
|
|
26
26
|
});
|
|
27
27
|
throw new PdfError('PDF_ISSUER_INCOMPLETE', `Faltan datos del emisor para el PDF: ${missing.join(', ')}.`, {
|
|
28
28
|
details: { faltan: missing },
|
|
29
|
-
suggestion: `
|
|
29
|
+
suggestion: `Configuralos una vez con:\n${commands.join('\n')}`,
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
// La letra alcanza para la condicion habitual: A y B las emite un responsable inscripto, C un monotributista.
|
|
@@ -36,8 +36,8 @@ export function resolvePdfIssuer(config, letter) {
|
|
|
36
36
|
cuit: config.cuit,
|
|
37
37
|
domicilioComercial: emisor.domicilio,
|
|
38
38
|
fechaInicioActividades: emisor.inicioActividades,
|
|
39
|
-
|
|
39
|
+
// Sin el dato no se afirma nada: "Exento" seria declarar una exencion que nadie informo.
|
|
40
|
+
iibb: emisor.iibb ?? '-',
|
|
40
41
|
razonSocial: emisor.razonSocial,
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
|
-
//# sourceMappingURL=pdf-issuer.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { resolveBillingIvaConditionCode } from '../billing/billing.mappers.js';
|
|
2
|
+
/** RG 5614 (Ley 27.743): titulo y datos del regimen de transparencia fiscal, en comprobantes a consumidor final. */
|
|
3
|
+
export const TRANSPARENCY_TITLE = 'Régimen de Transparencia Fiscal al Consumidor (Ley 27.743)';
|
|
4
|
+
/** RG 5003 (RG 1415, art. 15, inc. a): comprobante A a un sujeto adherido al monotributo. */
|
|
5
|
+
export const MONOTRIBUTO_CREDIT_LEGEND = 'El crédito fiscal discriminado en el presente comprobante, sólo podrá ser computado a efectos del Régimen de Sostenimiento e Inclusión Fiscal para Pequeños Contribuyentes de la Ley Nº 27.618';
|
|
6
|
+
/** Leyenda de IVA de la factura de exportacion E, con el mismo texto que la E de Comprobantes en linea. */
|
|
7
|
+
export const EXPORT_IVA_LEGEND = 'IVA EXENTO OPERACIÓN DE EXPORTACIÓN';
|
|
8
|
+
const MONOTRIBUTO_CONDITION_CODES = new Set([
|
|
9
|
+
resolveBillingIvaConditionCode('responsable-monotributo'),
|
|
10
|
+
resolveBillingIvaConditionCode('monotributista-social'),
|
|
11
|
+
resolveBillingIvaConditionCode('monotributo-trabajador-independiente-promovido'),
|
|
12
|
+
]);
|
|
13
|
+
function formatAmount(value, currency) {
|
|
14
|
+
const amount = new Intl.NumberFormat('es-AR', { maximumFractionDigits: 2, minimumFractionDigits: 2 }).format(value);
|
|
15
|
+
return `${currency === 'PES' ? '$' : currency} ${amount}`;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Leyendas que la normativa exige en el comprobante y la plantilla de `@arcasdk/pdf` 0.2.x no trae.
|
|
19
|
+
* Van en texto plano: la plantilla las muestra como observaciones, debajo del CAE.
|
|
20
|
+
*/
|
|
21
|
+
export function buildPdfLegends(result) {
|
|
22
|
+
const { payload, voucherKind } = result;
|
|
23
|
+
if (voucherKind.letter === 'b') {
|
|
24
|
+
// arcli no informa tributos: no hay impuestos internos ni otros nacionales indirectos que mostrar.
|
|
25
|
+
return [
|
|
26
|
+
TRANSPARENCY_TITLE,
|
|
27
|
+
`IVA Contenido: ${formatAmount(payload.ImpIVA, payload.MonId)}`,
|
|
28
|
+
`Otros Impuestos Nacionales Indirectos: ${formatAmount(0, payload.MonId)}`,
|
|
29
|
+
].join(' · ');
|
|
30
|
+
}
|
|
31
|
+
if (voucherKind.letter === 'a' && MONOTRIBUTO_CONDITION_CODES.has(payload.CondicionIVAReceptorId)) {
|
|
32
|
+
return MONOTRIBUTO_CREDIT_LEGEND;
|
|
33
|
+
}
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
@@ -73,7 +73,7 @@ function createSampleConfig() {
|
|
|
73
73
|
produccion: '/Users/demo/.arcli/produccion/certificado.crt',
|
|
74
74
|
testing: '/Users/demo/.arcli/testing/certificado.crt',
|
|
75
75
|
},
|
|
76
|
-
cuit: '
|
|
76
|
+
cuit: '20333333334',
|
|
77
77
|
conceptoPorDefecto: 'servicios',
|
|
78
78
|
cotizacionPorDefecto: 1,
|
|
79
79
|
emisor: {},
|
|
@@ -101,7 +101,7 @@ function createSampleUpdateCheckResult() {
|
|
|
101
101
|
function createSampleValidation() {
|
|
102
102
|
return {
|
|
103
103
|
certPath: '/Users/demo/.arcli/testing/certificado.crt',
|
|
104
|
-
cuit:
|
|
104
|
+
cuit: 20333333334,
|
|
105
105
|
environment: 'testing',
|
|
106
106
|
keyPath: '/Users/demo/.arcli/testing/clave.key',
|
|
107
107
|
outputJson: false,
|
|
@@ -146,14 +146,14 @@ function buildColorsScene() {
|
|
|
146
146
|
const BORDER_SAMPLES = [
|
|
147
147
|
['ticket', 'Factura', 'Comprobantes: vista previa y resultado', 'success', 'RESULTADO'],
|
|
148
148
|
['error', 'Error', 'Errores del CLI o de ARCA', 'danger'],
|
|
149
|
-
['attention', 'Observaciones', 'Observaciones de ARCA y avisos del
|
|
149
|
+
['attention', 'Observaciones', 'Observaciones de ARCA y avisos del régimen FCE', 'warning'],
|
|
150
150
|
['tip', 'Sugerencias', 'Sugerencias para resolver un problema', 'warning'],
|
|
151
|
-
['sheet', '
|
|
152
|
-
['checklist', 'Revision', '
|
|
153
|
-
['listing', '
|
|
154
|
-
['note', 'Aviso', 'Avisos simples, por ejemplo "No se
|
|
151
|
+
['sheet', 'Configuración', 'Fichas de consulta: configuración y régimen FCE', 'info'],
|
|
152
|
+
['checklist', 'Revision', 'Revisión de configuración', 'success', 'VEREDICTO'],
|
|
153
|
+
['listing', 'Últimos comprobantes', 'Listados en tabla, como los últimos comprobantes', 'info'],
|
|
154
|
+
['note', 'Aviso', 'Avisos simples, por ejemplo "No se emitió nada"', undefined],
|
|
155
155
|
['warning', 'Testing', 'Banners del entorno de testing y del certificado por vencer', 'warning'],
|
|
156
|
-
['info', 'Nueva
|
|
156
|
+
['info', 'Nueva versión', 'Aviso de nueva versión disponible', 'info'],
|
|
157
157
|
['data', 'Billing json', 'JSON y respuestas crudas', 'subtle'],
|
|
158
158
|
['common', 'Contenido', 'Base para paneles sin estilo propio', undefined],
|
|
159
159
|
['debug', 'Storybook', 'Storybook y debug visual', 'debug'],
|
|
@@ -179,7 +179,7 @@ function buildBordersScene() {
|
|
|
179
179
|
return [
|
|
180
180
|
sceneTitle('Bordes', 'Un estilo por tipo de panel; ARCLI_ASCII=1 los cambia por ASCII'),
|
|
181
181
|
...boxes,
|
|
182
|
-
`${colorize('Barra de estado (modo interactivo):', 'muted')}\n${statusBar([{ text: '20-
|
|
182
|
+
`${colorize('Barra de estado (modo interactivo):', 'muted')}\n${statusBar([{ text: '20-33333333-4' }, { text: 'PV 3' }], [
|
|
183
183
|
{ color: 'success', text: 'ARCA FUNCIONANDO' },
|
|
184
184
|
{ color: 'testing', text: 'TESTING' },
|
|
185
185
|
], { rightSeparator: 'rule' })}`,
|
|
@@ -201,8 +201,8 @@ function buildBillingScene() {
|
|
|
201
201
|
const observed = formatBillingResultAsText(createBillingResult({
|
|
202
202
|
response: {
|
|
203
203
|
...createBillingResult().response,
|
|
204
|
-
observaciones: ['La CUIT receptora no existe en
|
|
205
|
-
observacion: 'La CUIT receptora no existe en
|
|
204
|
+
observaciones: ['La CUIT receptora no existe en padrón.'],
|
|
205
|
+
observacion: 'La CUIT receptora no existe en padrón.',
|
|
206
206
|
raw: {
|
|
207
207
|
response: {
|
|
208
208
|
FeDetResp: {
|
|
@@ -211,14 +211,14 @@ function buildBillingScene() {
|
|
|
211
211
|
},
|
|
212
212
|
},
|
|
213
213
|
status: 'observado',
|
|
214
|
-
suggestions: ['
|
|
214
|
+
suggestions: ['Revisá el CUIT del receptor o usá uno válido de testing.'],
|
|
215
215
|
},
|
|
216
216
|
voucherKind: createVoucherKind({ displayName: 'Factura A', shortcut: 'fa', letter: 'a', arcaType: 1 }),
|
|
217
217
|
payload: {
|
|
218
218
|
...createBillingResult().payload,
|
|
219
219
|
CbteTipo: 1,
|
|
220
220
|
DocTipo: 80,
|
|
221
|
-
DocNro:
|
|
221
|
+
DocNro: 20123456786,
|
|
222
222
|
CondicionIVAReceptorId: 1,
|
|
223
223
|
ImpNeto: 0.83,
|
|
224
224
|
ImpIVA: 0.17,
|
|
@@ -239,7 +239,7 @@ function buildBillingScene() {
|
|
|
239
239
|
},
|
|
240
240
|
resultado: 'R',
|
|
241
241
|
status: 'rechazado',
|
|
242
|
-
suggestions: ['ARCA
|
|
242
|
+
suggestions: ['ARCA devolvió un error transitorio. Esperá unos segundos y volvé a intentar la emisión.'],
|
|
243
243
|
},
|
|
244
244
|
}));
|
|
245
245
|
const bruto = formatBillingResultAsText(createBillingResult(), { raw: true });
|
|
@@ -256,14 +256,14 @@ function buildConfigScene() {
|
|
|
256
256
|
const config = createSampleConfig();
|
|
257
257
|
const doctor = buildConfigDoctorReport(config, [{ environment: 'testing' }]);
|
|
258
258
|
return [
|
|
259
|
-
sceneTitle('
|
|
259
|
+
sceneTitle('Configuración', 'Vista actual y revisión'),
|
|
260
260
|
formatConfigAsText(config, { pdfFolder: '~/arcli/comprobantes', ticketPath: createSampleValidation().ticketPath }),
|
|
261
261
|
formatConfigDoctorAsText(doctor),
|
|
262
262
|
].join('\n\n');
|
|
263
263
|
}
|
|
264
264
|
function buildErrorScene() {
|
|
265
265
|
return [
|
|
266
|
-
sceneTitle('Errores', '
|
|
266
|
+
sceneTitle('Errores', 'Configuración, entrada y error inesperado'),
|
|
267
267
|
formatCliError(new ConfigurationError('Falta la ruta de la clave privada para testing.', {
|
|
268
268
|
path: '/Users/demo/.arcli/testing/clave.key',
|
|
269
269
|
}), false),
|
|
@@ -279,7 +279,7 @@ function buildJsonScene() {
|
|
|
279
279
|
}));
|
|
280
280
|
const doctorJson = highlightJsonValues(formatConfigDoctor(buildConfigDoctorReport(createSampleConfig(), [{ environment: 'testing' }])));
|
|
281
281
|
return [
|
|
282
|
-
sceneTitle('Json', 'Contratos estructurados para
|
|
282
|
+
sceneTitle('Json', 'Contratos estructurados para automatización y respuesta bruta'),
|
|
283
283
|
contentPanel('Billing json', billingJson, 'wide', 'subtle', 'left', 'data'),
|
|
284
284
|
contentPanel('Config json', configJson, 'wide', 'subtle', 'left', 'data'),
|
|
285
285
|
contentPanel('Doctor json', doctorJson, 'wide', 'subtle', 'left', 'data'),
|
|
@@ -290,16 +290,16 @@ function buildComponentsScene() {
|
|
|
290
290
|
const certificateNotice = certificateBanner({
|
|
291
291
|
expired: false,
|
|
292
292
|
guideUrl: CERTIFICATE_GUIDE_URL,
|
|
293
|
-
summary: 'El certificado de
|
|
293
|
+
summary: 'El certificado de producción vence el 20/11/2026 (en 10 días).',
|
|
294
294
|
});
|
|
295
295
|
const expiredCertificateNotice = certificateBanner({
|
|
296
296
|
expired: true,
|
|
297
297
|
guideUrl: CERTIFICATE_GUIDE_URL,
|
|
298
|
-
summary: 'El certificado de
|
|
298
|
+
summary: 'El certificado de producción venció el 20/11/2026.',
|
|
299
299
|
});
|
|
300
300
|
const updateNotice = renderUpdateNoticePanel(createSampleUpdateCheckResult());
|
|
301
301
|
const keyValueRows = [
|
|
302
|
-
['CUIT', '20-
|
|
302
|
+
['CUIT', '20-33333333-4'],
|
|
303
303
|
['Punto de venta', 3],
|
|
304
304
|
['Entorno', 'testing'],
|
|
305
305
|
];
|
|
@@ -371,4 +371,3 @@ export function renderStorybookShowcase(scene) {
|
|
|
371
371
|
}
|
|
372
372
|
return scenes[scene];
|
|
373
373
|
}
|
|
374
|
-
//# sourceMappingURL=showcase.js.map
|
|
@@ -5,7 +5,7 @@ export const UPDATE_COMMAND = 'npm install -g arcli@latest';
|
|
|
5
5
|
const MAX_CHANGELOG_ENTRIES = 3;
|
|
6
6
|
const MAX_CHANGES_PER_ENTRY = 6;
|
|
7
7
|
export function renderUpdateNoticePanel(result) {
|
|
8
|
-
return noticePanel(`Nueva
|
|
8
|
+
return noticePanel(`Nueva versión disponible: ${result.latestVersion} (actual: ${result.currentVersion})\n` +
|
|
9
9
|
`Actualiza con: ${UPDATE_COMMAND}`, 'info', 'info');
|
|
10
10
|
}
|
|
11
11
|
const KIND_LABELS = {
|
|
@@ -34,7 +34,7 @@ function formatChange(change) {
|
|
|
34
34
|
function formatChanges(changes) {
|
|
35
35
|
const lines = changes.slice(0, MAX_CHANGES_PER_ENTRY).map(formatChange);
|
|
36
36
|
const hidden = changes.length - MAX_CHANGES_PER_ENTRY;
|
|
37
|
-
return hidden > 0 ? [...lines, colorize(`${CHANGE_INDENT}y ${hidden} cambio(s)
|
|
37
|
+
return hidden > 0 ? [...lines, colorize(`${CHANGE_INDENT}y ${hidden} cambio(s) más`, 'muted')] : lines;
|
|
38
38
|
}
|
|
39
39
|
function formatChangelog(entries) {
|
|
40
40
|
if (!entries || entries.length === 0) {
|
|
@@ -51,7 +51,7 @@ function formatChangelog(entries) {
|
|
|
51
51
|
]);
|
|
52
52
|
const hidden = entries.length - MAX_CHANGELOG_ENTRIES;
|
|
53
53
|
if (hidden > 0) {
|
|
54
|
-
lines.push('', colorize(`Y ${hidden}
|
|
54
|
+
lines.push('', colorize(`Y ${hidden} versión(es) más en ${CHANGELOG_PAGE_URL}`, 'muted'));
|
|
55
55
|
}
|
|
56
56
|
return lines;
|
|
57
57
|
}
|
|
@@ -60,13 +60,13 @@ export function renderUpdateDetails(result, entries) {
|
|
|
60
60
|
const versions = renderPanel({
|
|
61
61
|
borderType: 'sheet',
|
|
62
62
|
content: [
|
|
63
|
-
`Tu
|
|
64
|
-
`Nueva
|
|
63
|
+
`Tu versión ${result.currentVersion}`,
|
|
64
|
+
`Nueva versión ${colorize(bold(result.latestVersion), 'highlight')}`,
|
|
65
65
|
'',
|
|
66
66
|
bold('NOVEDADES'),
|
|
67
67
|
...formatChangelog(entries),
|
|
68
68
|
],
|
|
69
|
-
title: '
|
|
69
|
+
title: 'Actualización disponible',
|
|
70
70
|
width: 'wide',
|
|
71
71
|
});
|
|
72
72
|
const howTo = renderPanel({
|
|
@@ -81,4 +81,3 @@ export function renderUpdateDetails(result, entries) {
|
|
|
81
81
|
});
|
|
82
82
|
return `${versions}\n\n${howTo}`;
|
|
83
83
|
}
|
|
84
|
-
//# sourceMappingURL=update-check.presenter.js.map
|