arcli 0.1.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/LICENSE +21 -0
  3. package/README.md +169 -4
  4. package/dist/cli/commands/billing-family.command.d.ts +2 -0
  5. package/dist/cli/commands/billing-family.command.js +30 -0
  6. package/dist/cli/commands/billing-family.command.js.map +1 -0
  7. package/dist/cli/commands/billing-shortcuts.command.d.ts +2 -0
  8. package/dist/cli/commands/billing-shortcuts.command.js +18 -0
  9. package/dist/cli/commands/billing-shortcuts.command.js.map +1 -0
  10. package/dist/cli/commands/billing.command.interactive-preview.d.ts +18 -0
  11. package/dist/cli/commands/billing.command.interactive-preview.js +69 -0
  12. package/dist/cli/commands/billing.command.interactive-preview.js.map +1 -0
  13. package/dist/cli/commands/billing.command.options.d.ts +2 -0
  14. package/dist/cli/commands/billing.command.options.js +65 -0
  15. package/dist/cli/commands/billing.command.options.js.map +1 -0
  16. package/dist/cli/commands/billing.command.output.d.ts +12 -0
  17. package/dist/cli/commands/billing.command.output.js +33 -0
  18. package/dist/cli/commands/billing.command.output.js.map +1 -0
  19. package/dist/cli/commands/billing.command.parser.d.ts +21 -0
  20. package/dist/cli/commands/billing.command.parser.js +170 -0
  21. package/dist/cli/commands/billing.command.parser.js.map +1 -0
  22. package/dist/cli/commands/billing.command.shared.d.ts +7 -0
  23. package/dist/cli/commands/billing.command.shared.js +99 -0
  24. package/dist/cli/commands/billing.command.shared.js.map +1 -0
  25. package/dist/cli/commands/billing.command.shortcuts.d.ts +7 -0
  26. package/dist/cli/commands/billing.command.shortcuts.js +52 -0
  27. package/dist/cli/commands/billing.command.shortcuts.js.map +1 -0
  28. package/dist/cli/commands/config.command.d.ts +2 -0
  29. package/dist/cli/commands/config.command.js +125 -0
  30. package/dist/cli/commands/config.command.js.map +1 -0
  31. package/dist/cli/commands/examples.command.d.ts +2 -0
  32. package/dist/cli/commands/examples.command.js +14 -0
  33. package/dist/cli/commands/examples.command.js.map +1 -0
  34. package/dist/cli/commands/fce-obligation.command.d.ts +2 -0
  35. package/dist/cli/commands/fce-obligation.command.js +51 -0
  36. package/dist/cli/commands/fce-obligation.command.js.map +1 -0
  37. package/dist/cli/commands/storybook.command.d.ts +2 -0
  38. package/dist/cli/commands/storybook.command.js +26 -0
  39. package/dist/cli/commands/storybook.command.js.map +1 -0
  40. package/dist/cli/help.d.ts +11 -0
  41. package/dist/cli/help.js +534 -0
  42. package/dist/cli/help.js.map +1 -0
  43. package/dist/cli/index.d.ts +2 -0
  44. package/dist/cli/index.js +41 -0
  45. package/dist/cli/index.js.map +1 -0
  46. package/dist/cli/program.d.ts +2 -0
  47. package/dist/cli/program.js +30 -0
  48. package/dist/cli/program.js.map +1 -0
  49. package/dist/cli/types.d.ts +6 -0
  50. package/dist/cli/types.js +2 -0
  51. package/dist/cli/types.js.map +1 -0
  52. package/dist/cli/version.d.ts +1 -0
  53. package/dist/cli/version.js +2 -0
  54. package/dist/cli/version.js.map +1 -0
  55. package/dist/index.d.ts +1 -0
  56. package/dist/index.js +2 -0
  57. package/dist/index.js.map +1 -0
  58. package/dist/lib/dates/arca-date.d.ts +6 -0
  59. package/dist/lib/dates/arca-date.js +45 -0
  60. package/dist/lib/dates/arca-date.js.map +1 -0
  61. package/dist/lib/errors/app-error.d.ts +14 -0
  62. package/dist/lib/errors/app-error.js +29 -0
  63. package/dist/lib/errors/app-error.js.map +1 -0
  64. package/dist/lib/files/read-json-file.d.ts +1 -0
  65. package/dist/lib/files/read-json-file.js +21 -0
  66. package/dist/lib/files/read-json-file.js.map +1 -0
  67. package/dist/lib/paths/mask-path.d.ts +1 -0
  68. package/dist/lib/paths/mask-path.js +17 -0
  69. package/dist/lib/paths/mask-path.js.map +1 -0
  70. package/dist/lib/security/certificate.d.ts +7 -0
  71. package/dist/lib/security/certificate.js +16 -0
  72. package/dist/lib/security/certificate.js.map +1 -0
  73. package/dist/lib/security/pem.d.ts +5 -0
  74. package/dist/lib/security/pem.js +36 -0
  75. package/dist/lib/security/pem.js.map +1 -0
  76. package/dist/modules/billing/billing-response.d.ts +4 -0
  77. package/dist/modules/billing/billing-response.js +74 -0
  78. package/dist/modules/billing/billing-response.js.map +1 -0
  79. package/dist/modules/billing/billing.amounts.d.ts +19 -0
  80. package/dist/modules/billing/billing.amounts.js +72 -0
  81. package/dist/modules/billing/billing.amounts.js.map +1 -0
  82. package/dist/modules/billing/billing.associated-period.d.ts +8 -0
  83. package/dist/modules/billing/billing.associated-period.js +40 -0
  84. package/dist/modules/billing/billing.associated-period.js.map +1 -0
  85. package/dist/modules/billing/billing.associated-vouchers.d.ts +12 -0
  86. package/dist/modules/billing/billing.associated-vouchers.js +73 -0
  87. package/dist/modules/billing/billing.associated-vouchers.js.map +1 -0
  88. package/dist/modules/billing/billing.constants.d.ts +2 -0
  89. package/dist/modules/billing/billing.constants.js +3 -0
  90. package/dist/modules/billing/billing.constants.js.map +1 -0
  91. package/dist/modules/billing/billing.currency.d.ts +18 -0
  92. package/dist/modules/billing/billing.currency.js +53 -0
  93. package/dist/modules/billing/billing.currency.js.map +1 -0
  94. package/dist/modules/billing/billing.date-range.d.ts +9 -0
  95. package/dist/modules/billing/billing.date-range.js +52 -0
  96. package/dist/modules/billing/billing.date-range.js.map +1 -0
  97. package/dist/modules/billing/billing.display.d.ts +13 -0
  98. package/dist/modules/billing/billing.display.js +137 -0
  99. package/dist/modules/billing/billing.display.js.map +1 -0
  100. package/dist/modules/billing/billing.fce.d.ts +21 -0
  101. package/dist/modules/billing/billing.fce.js +59 -0
  102. package/dist/modules/billing/billing.fce.js.map +1 -0
  103. package/dist/modules/billing/billing.iva-receptor.d.ts +7 -0
  104. package/dist/modules/billing/billing.iva-receptor.js +58 -0
  105. package/dist/modules/billing/billing.iva-receptor.js.map +1 -0
  106. package/dist/modules/billing/billing.json-format.d.ts +6 -0
  107. package/dist/modules/billing/billing.json-format.js +5 -0
  108. package/dist/modules/billing/billing.json-format.js.map +1 -0
  109. package/dist/modules/billing/billing.labels.d.ts +9 -0
  110. package/dist/modules/billing/billing.labels.js +108 -0
  111. package/dist/modules/billing/billing.labels.js.map +1 -0
  112. package/dist/modules/billing/billing.mappers.d.ts +8 -0
  113. package/dist/modules/billing/billing.mappers.js +60 -0
  114. package/dist/modules/billing/billing.mappers.js.map +1 -0
  115. package/dist/modules/billing/billing.presenter.d.ts +7 -0
  116. package/dist/modules/billing/billing.presenter.js +3 -0
  117. package/dist/modules/billing/billing.presenter.js.map +1 -0
  118. package/dist/modules/billing/billing.schemas.d.ts +107 -0
  119. package/dist/modules/billing/billing.schemas.js +106 -0
  120. package/dist/modules/billing/billing.schemas.js.map +1 -0
  121. package/dist/modules/billing/billing.serialize.d.ts +8 -0
  122. package/dist/modules/billing/billing.serialize.js +53 -0
  123. package/dist/modules/billing/billing.serialize.js.map +1 -0
  124. package/dist/modules/billing/billing.service.d.ts +27 -0
  125. package/dist/modules/billing/billing.service.js +146 -0
  126. package/dist/modules/billing/billing.service.js.map +1 -0
  127. package/dist/modules/billing/billing.text.d.ts +8 -0
  128. package/dist/modules/billing/billing.text.js +52 -0
  129. package/dist/modules/billing/billing.text.js.map +1 -0
  130. package/dist/modules/billing/billing.types.d.ts +13 -0
  131. package/dist/modules/billing/billing.types.internal.d.ts +27 -0
  132. package/dist/modules/billing/billing.types.internal.js +2 -0
  133. package/dist/modules/billing/billing.types.internal.js.map +1 -0
  134. package/dist/modules/billing/billing.types.js +2 -0
  135. package/dist/modules/billing/billing.types.js.map +1 -0
  136. package/dist/modules/billing/billing.validation.d.ts +7 -0
  137. package/dist/modules/billing/billing.validation.js +80 -0
  138. package/dist/modules/billing/billing.validation.js.map +1 -0
  139. package/dist/modules/billing/voucher-kind-map.d.ts +9 -0
  140. package/dist/modules/billing/voucher-kind-map.js +180 -0
  141. package/dist/modules/billing/voucher-kind-map.js.map +1 -0
  142. package/dist/modules/config/config-doctor.d.ts +15 -0
  143. package/dist/modules/config/config-doctor.js +125 -0
  144. package/dist/modules/config/config-doctor.js.map +1 -0
  145. package/dist/modules/config/config-value-parser.d.ts +2 -0
  146. package/dist/modules/config/config-value-parser.js +99 -0
  147. package/dist/modules/config/config-value-parser.js.map +1 -0
  148. package/dist/modules/config/config.presenter.d.ts +7 -0
  149. package/dist/modules/config/config.presenter.js +88 -0
  150. package/dist/modules/config/config.presenter.js.map +1 -0
  151. package/dist/modules/config/config.schemas.d.ts +110 -0
  152. package/dist/modules/config/config.schemas.js +103 -0
  153. package/dist/modules/config/config.schemas.js.map +1 -0
  154. package/dist/modules/config/config.service.d.ts +20 -0
  155. package/dist/modules/config/config.service.js +82 -0
  156. package/dist/modules/config/config.service.js.map +1 -0
  157. package/dist/modules/examples/examples.d.ts +1 -0
  158. package/dist/modules/examples/examples.js +191 -0
  159. package/dist/modules/examples/examples.js.map +1 -0
  160. package/dist/modules/fce/fce-obligation.d.ts +20 -0
  161. package/dist/modules/fce/fce-obligation.js +33 -0
  162. package/dist/modules/fce/fce-obligation.js.map +1 -0
  163. package/dist/modules/fce/fce-obligation.presenter.d.ts +9 -0
  164. package/dist/modules/fce/fce-obligation.presenter.js +32 -0
  165. package/dist/modules/fce/fce-obligation.presenter.js.map +1 -0
  166. package/dist/modules/storybook/showcase-theme.d.ts +7 -0
  167. package/dist/modules/storybook/showcase-theme.js +6 -0
  168. package/dist/modules/storybook/showcase-theme.js.map +1 -0
  169. package/dist/modules/storybook/showcase.d.ts +2 -0
  170. package/dist/modules/storybook/showcase.js +310 -0
  171. package/dist/modules/storybook/showcase.js.map +1 -0
  172. package/dist/modules/update-check/update-check.presenter.d.ts +2 -0
  173. package/dist/modules/update-check/update-check.presenter.js +6 -0
  174. package/dist/modules/update-check/update-check.presenter.js.map +1 -0
  175. package/dist/modules/update-check/update-check.service.d.ts +8 -0
  176. package/dist/modules/update-check/update-check.service.js +72 -0
  177. package/dist/modules/update-check/update-check.service.js.map +1 -0
  178. package/dist/services/arca/arca-billing.gateway.d.ts +10 -0
  179. package/dist/services/arca/arca-billing.gateway.js +22 -0
  180. package/dist/services/arca/arca-billing.gateway.js.map +1 -0
  181. package/dist/services/arca/arca-client.factory.d.ts +5 -0
  182. package/dist/services/arca/arca-client.factory.js +7 -0
  183. package/dist/services/arca/arca-client.factory.js.map +1 -0
  184. package/dist/services/arca/arca-context.resolver.d.ts +44 -0
  185. package/dist/services/arca/arca-context.resolver.js +120 -0
  186. package/dist/services/arca/arca-context.resolver.js.map +1 -0
  187. package/dist/services/arca/arca-fce-obligation.gateway.d.ts +7 -0
  188. package/dist/services/arca/arca-fce-obligation.gateway.js +36 -0
  189. package/dist/services/arca/arca-fce-obligation.gateway.js.map +1 -0
  190. package/dist/ui/components/contentPanel.d.ts +5 -0
  191. package/dist/ui/components/contentPanel.js +11 -0
  192. package/dist/ui/components/contentPanel.js.map +1 -0
  193. package/dist/ui/components/errorPanel.d.ts +1 -0
  194. package/dist/ui/components/errorPanel.js +13 -0
  195. package/dist/ui/components/errorPanel.js.map +1 -0
  196. package/dist/ui/components/index.d.ts +6 -0
  197. package/dist/ui/components/index.js +7 -0
  198. package/dist/ui/components/index.js.map +1 -0
  199. package/dist/ui/components/keyValuePanel.d.ts +3 -0
  200. package/dist/ui/components/keyValuePanel.js +14 -0
  201. package/dist/ui/components/keyValuePanel.js.map +1 -0
  202. package/dist/ui/components/noticePanel.d.ts +3 -0
  203. package/dist/ui/components/noticePanel.js +11 -0
  204. package/dist/ui/components/noticePanel.js.map +1 -0
  205. package/dist/ui/components/rawPanel.d.ts +1 -0
  206. package/dist/ui/components/rawPanel.js +5 -0
  207. package/dist/ui/components/rawPanel.js.map +1 -0
  208. package/dist/ui/components/statusPanel.d.ts +3 -0
  209. package/dist/ui/components/statusPanel.js +20 -0
  210. package/dist/ui/components/statusPanel.js.map +1 -0
  211. package/dist/ui/index.d.ts +5 -0
  212. package/dist/ui/index.js +6 -0
  213. package/dist/ui/index.js.map +1 -0
  214. package/dist/ui/presenters/billing.presenter.d.ts +2 -0
  215. package/dist/ui/presenters/billing.presenter.js +2 -0
  216. package/dist/ui/presenters/billing.presenter.js.map +1 -0
  217. package/dist/ui/presenters/config.presenter.d.ts +1 -0
  218. package/dist/ui/presenters/config.presenter.js +2 -0
  219. package/dist/ui/presenters/config.presenter.js.map +1 -0
  220. package/dist/ui/presenters/errors.presenter.d.ts +1 -0
  221. package/dist/ui/presenters/errors.presenter.js +89 -0
  222. package/dist/ui/presenters/errors.presenter.js.map +1 -0
  223. package/dist/ui/presenters/errors.zod-presenter.d.ts +2 -0
  224. package/dist/ui/presenters/errors.zod-presenter.js +103 -0
  225. package/dist/ui/presenters/errors.zod-presenter.js.map +1 -0
  226. package/dist/ui/presenters/index.d.ts +4 -0
  227. package/dist/ui/presenters/index.js +5 -0
  228. package/dist/ui/presenters/index.js.map +1 -0
  229. package/dist/ui/presenters/showcase.presenter.d.ts +1 -0
  230. package/dist/ui/presenters/showcase.presenter.js +2 -0
  231. package/dist/ui/presenters/showcase.presenter.js.map +1 -0
  232. package/dist/ui/primitives/index.d.ts +10 -0
  233. package/dist/ui/primitives/index.js +11 -0
  234. package/dist/ui/primitives/index.js.map +1 -0
  235. package/dist/ui/primitives/renderDivider.d.ts +5 -0
  236. package/dist/ui/primitives/renderDivider.js +5 -0
  237. package/dist/ui/primitives/renderDivider.js.map +1 -0
  238. package/dist/ui/primitives/renderFooter.d.ts +7 -0
  239. package/dist/ui/primitives/renderFooter.js +6 -0
  240. package/dist/ui/primitives/renderFooter.js.map +1 -0
  241. package/dist/ui/primitives/renderJson.d.ts +3 -0
  242. package/dist/ui/primitives/renderJson.js +19 -0
  243. package/dist/ui/primitives/renderJson.js.map +1 -0
  244. package/dist/ui/primitives/renderKeyValue.d.ts +14 -0
  245. package/dist/ui/primitives/renderKeyValue.js +34 -0
  246. package/dist/ui/primitives/renderKeyValue.js.map +1 -0
  247. package/dist/ui/primitives/renderLogo.d.ts +2 -0
  248. package/dist/ui/primitives/renderLogo.js +28 -0
  249. package/dist/ui/primitives/renderLogo.js.map +1 -0
  250. package/dist/ui/primitives/renderObject.d.ts +1 -0
  251. package/dist/ui/primitives/renderObject.js +19 -0
  252. package/dist/ui/primitives/renderObject.js.map +1 -0
  253. package/dist/ui/primitives/renderPanel.d.ts +23 -0
  254. package/dist/ui/primitives/renderPanel.js +114 -0
  255. package/dist/ui/primitives/renderPanel.js.map +1 -0
  256. package/dist/ui/primitives/renderSubtitle.d.ts +7 -0
  257. package/dist/ui/primitives/renderSubtitle.js +6 -0
  258. package/dist/ui/primitives/renderSubtitle.js.map +1 -0
  259. package/dist/ui/primitives/renderTable.d.ts +6 -0
  260. package/dist/ui/primitives/renderTable.js +14 -0
  261. package/dist/ui/primitives/renderTable.js.map +1 -0
  262. package/dist/ui/primitives/text.d.ts +18 -0
  263. package/dist/ui/primitives/text.js +154 -0
  264. package/dist/ui/primitives/text.js.map +1 -0
  265. package/dist/ui/stream/index.d.ts +1 -0
  266. package/dist/ui/stream/index.js +2 -0
  267. package/dist/ui/stream/index.js.map +1 -0
  268. package/dist/ui/stream/terminal-stream.d.ts +10 -0
  269. package/dist/ui/stream/terminal-stream.js +20 -0
  270. package/dist/ui/stream/terminal-stream.js.map +1 -0
  271. package/dist/ui/theme/index.d.ts +1 -0
  272. package/dist/ui/theme/index.js +2 -0
  273. package/dist/ui/theme/index.js.map +1 -0
  274. package/dist/ui/theme/theme.d.ts +27 -0
  275. package/dist/ui/theme/theme.js +41 -0
  276. package/dist/ui/theme/theme.js.map +1 -0
  277. package/llms.txt +161 -0
  278. package/package.json +99 -35
  279. package/.babelrc +0 -4
  280. package/.eslintignore +0 -1
  281. package/.eslintrc.js +0 -17
  282. package/.npmignore +0 -1
  283. package/lib/arcli.js +0 -275
  284. package/lib/arcli.min.js +0 -1
  285. package/src/config.js +0 -22
  286. package/src/consoler.js +0 -10
  287. package/src/index.js +0 -21
  288. package/src/init.js +0 -13
  289. package/src/run.js +0 -4
  290. package/src/spinner.js +0 -39
  291. package/tst/index.js +0 -26
  292. package/webpack.config.js +0 -47
@@ -0,0 +1,11 @@
1
+ import type { Command } from 'commander';
2
+ import type { VoucherFamily, VoucherShortcut } from '../modules/billing/billing.types';
3
+ export declare function createConfigHelp(): string;
4
+ export declare function createStorybookHelp(): string;
5
+ export declare function createExamplesHelp(): string;
6
+ export declare function createFceObligationHelp(): string;
7
+ export declare function createShortcutHelp(shortcut: VoucherShortcut): string;
8
+ export declare function createFamilyHelp(family: VoucherFamily): string;
9
+ export declare function createProgramHelp(): string;
10
+ export declare function configureSpanishHelp(command: Command): void;
11
+ export declare function createProgramHeader(): string;
@@ -0,0 +1,534 @@
1
+ import { getVoucherKindByShortcut } from '../modules/billing/voucher-kind-map.js';
2
+ import { renderLogo } from '../ui/index.js';
3
+ const FAMILY_LABELS = {
4
+ factura: 'Factura',
5
+ 'factura-credito-electronica': 'Factura de credito electronica',
6
+ 'nota-credito': 'Nota de credito',
7
+ 'nota-credito-electronica': 'Nota de credito electronica',
8
+ 'nota-debito': 'Nota de debito',
9
+ 'nota-debito-electronica': 'Nota de debito electronica',
10
+ };
11
+ const FAMILY_SHORTCUTS = {
12
+ factura: ['fa', 'fb', 'fc'],
13
+ 'factura-credito-electronica': ['fcea', 'fceb', 'fcec'],
14
+ 'nota-credito': ['nca', 'ncb', 'ncc'],
15
+ 'nota-credito-electronica': ['ncea', 'nceb', 'ncec'],
16
+ 'nota-debito': ['nda', 'ndb', 'ndc'],
17
+ 'nota-debito-electronica': ['ndea', 'ndeb', 'ndec'],
18
+ };
19
+ const AVAILABLE_GENERAL_OPTIONS = [
20
+ ' - --monto <number> | todas | importe total del comprobante',
21
+ ' - --punto-venta <number> | --pv <number> | todas | punto de venta emisor',
22
+ ' - --fecha <fecha> | todas | fecha del comprobante; si falta usa hoy',
23
+ ' - --concepto <tipo> | -c | todas | productos, servicios o productos-servicios',
24
+ ' - --cs | --cp | --csp | todas | atajos para concepto',
25
+ ' - --moneda <codigo> | --mda <codigo> | todas | codigo de moneda, por ejemplo ARS o USD',
26
+ ' - --cotizacion-moneda <number> | --cm <number> | todas | cotizacion de la moneda elegida; obligatoria en moneda extranjera',
27
+ ' - --misma-moneda | todas | el pago se cancela en la moneda extranjera; usa la cotizacion oficial de ARCA',
28
+ ' - --cargar <path> | todas | cargar un comprobante o lote desde JSON',
29
+ ' - --alicuota <tasa> | letras A y B | alicuota de IVA: 0, 2.5, 5, 10.5, 21 o 27; por defecto config alicuota o 21',
30
+ ' - --exento <number> | letras A y B | parte exenta del monto total',
31
+ ' - --nogravado <number> | letras A y B | parte no gravada del monto total',
32
+ ].join('\n');
33
+ const AVAILABLE_IDENTITY_OPTIONS = [
34
+ ' - --cuit <number> | todas | CUIT del receptor',
35
+ ' - --cuil <number> | todas | CUIL del receptor',
36
+ ' - --dni <number> | todas | DNI del receptor',
37
+ ' - --consumidor-final | --cfinal | todas | consumidor final con documento 0',
38
+ ' - --iva-receptor <tipo> | --ir <tipo> | todas | condicion IVA del receptor',
39
+ ' - --ir-* | todas | atajos para IVA receptor, por ejemplo --ir-cf o --ir-ri',
40
+ ].join('\n');
41
+ const AVAILABLE_SERVICE_OPTIONS = [
42
+ ' - -d, --dia <1-31> | servicios o productos-servicios | dia de vencimiento o referencia de servicio',
43
+ ' - --servicio-desde <fecha> | --sd <fecha> | servicios o productos-servicios | inicio del servicio',
44
+ ' - --servicio-hasta <fecha> | --sh <fecha> | servicios o productos-servicios | fin del servicio',
45
+ ' - --vencimiento <fecha> | --vto <fecha> | servicios, productos-servicios y facturas FCE | vencimiento del pago; por defecto el fin del servicio',
46
+ ].join('\n');
47
+ const AVAILABLE_ASSOCIATED_OPTIONS = [
48
+ ' - --ac <shortcut> | notas | shortcut del comprobante asociado',
49
+ ' - --at <number> | notas | tipo ARCA del comprobante asociado',
50
+ ' - --asociado-punto-venta <number> | --apv <number> | notas | punto de venta del asociado',
51
+ ' - --ar <number> | notas | numero del comprobante asociado',
52
+ ' - --acuit <number> | notas | CUIT del comprobante asociado; en NC/ND FCE por defecto el CUIT emisor',
53
+ ' - --afecha <fecha> | notas | fecha del comprobante asociado; obligatoria en NC/ND FCE',
54
+ ' - --periodo-desde <fecha> | --pd <fecha> | notas comunes | inicio del periodo asociado; alternativa a --ac',
55
+ ' - --periodo-hasta <fecha> | --ph <fecha> | notas comunes | fin del periodo asociado',
56
+ ].join('\n');
57
+ const AVAILABLE_FCE_INVOICE_OPTIONS = [
58
+ ' - --cbu <22 digitos> | facturas FCE | CBU del emisor; obligatorio (o config cbu)',
59
+ ' - --alias <alias> | facturas FCE | alias del CBU (o config aliasCbu)',
60
+ ' - --transferencia <sca|adc> | facturas FCE | modalidad de transferencia; por defecto sca',
61
+ ].join('\n');
62
+ const AVAILABLE_FCE_NOTE_OPTIONS = [
63
+ ' - --anulacion | NC/ND FCE | la nota anula una factura rechazada por el comprador',
64
+ ].join('\n');
65
+ function resolveFceOptions(isElectronicCredit, isNote) {
66
+ if (!isElectronicCredit) {
67
+ return ' - No aplica para este comprobante.';
68
+ }
69
+ return isNote ? AVAILABLE_FCE_NOTE_OPTIONS : AVAILABLE_FCE_INVOICE_OPTIONS;
70
+ }
71
+ const AVAILABLE_EXECUTION_OPTIONS = [
72
+ ' - --previsualizar | todas | muestra el payload antes de hablar con ARCA',
73
+ ' - --emitir | todas | emite realmente el comprobante',
74
+ ' - --testing | todas | fuerza entorno testing en esta corrida',
75
+ ' - --produccion | todas | fuerza entorno produccion en esta corrida',
76
+ ' - --json | todas | salida estructurada para scripts',
77
+ ' - --bruto | todas | agrega respuesta cruda de ARCA cuando exista',
78
+ ].join('\n');
79
+ const CORE_RULES = [
80
+ ' - ARCLI arma datos desde flags, JSON cargado, config y defaults internos.',
81
+ ' - Si no pasa fecha, usa hoy.',
82
+ ' - Use --emitir o --previsualizar, pero no ambos.',
83
+ ' - Use una sola identidad de receptor: --consumidor-final o --cfinal, o bien --cuit, --cuil o --dni.',
84
+ ' - Use --iva-receptor, --ir o un solo flag --ir-*, pero no varios a la vez.',
85
+ ' - Use --concepto o un solo flag entre --cs, --cp y --csp, pero no ambos.',
86
+ ].join('\n');
87
+ function section(title, body) {
88
+ return [title, body].join('\n');
89
+ }
90
+ function compactList(values) {
91
+ return values.map((value) => ` - ${value}`).join('\n');
92
+ }
93
+ function formatFamilyShortcuts(family) {
94
+ const [a, b, c] = FAMILY_SHORTCUTS[family];
95
+ return compactList([`A -> ${a}`, `B -> ${b}`, `C -> ${c}`]);
96
+ }
97
+ function createProgramQuickStart() {
98
+ return [
99
+ 'Uso minimo',
100
+ ' - TL;DR: arcli fc -m 300000 --cs --consumidor-final --ir-cf',
101
+ ' - Ese ejemplo asume que ya resolviste CUIT emisor, credenciales y punto de venta.',
102
+ ' - Si todavía no lo hiciste, empezá por: arcli config revisar',
103
+ ' - Emitir de verdad: arcli fa -m 1 --cs --cuit 20168598204 --ir-ri --emitir --bruto',
104
+ ].join('\n');
105
+ }
106
+ function createProgramMentalModel() {
107
+ return [
108
+ 'Como pensar rapido un comando',
109
+ ' - 1. Elegí el comprobante: fc, fa, nca, ndeb, fcec.',
110
+ ' - 2. Definí el monto: --monto.',
111
+ ' - 3. Elegí el concepto: --cs, --cp, --csp o --concepto.',
112
+ ' - 4. Definí la identidad: --cuit, --cuil, --dni o --consumidor-final.',
113
+ ' - 5. Definí el IVA receptor: --ir-*, --ir o --iva-receptor.',
114
+ ].join('\n');
115
+ }
116
+ function createProgramFamilies() {
117
+ return section('Familias y shortcuts', [
118
+ ' - factura -> fa, fb, fc',
119
+ ' - nota-credito -> nca, ncb, ncc',
120
+ ' - nota-debito -> nda, ndb, ndc',
121
+ ' - factura-credito-electronica -> fcea, fceb, fcec',
122
+ ' - nota-credito-electronica -> ncea, nceb, ncec',
123
+ ' - nota-debito-electronica -> ndea, ndeb, ndec',
124
+ ].join('\n'));
125
+ }
126
+ function createProgramCommands() {
127
+ return section('Comandos importantes', [
128
+ ' - Emitir comprobantes por shortcut: arcli fc ...',
129
+ ' - Emitir por familia y letra: arcli factura c ...',
130
+ ' - Ver y guardar config: arcli config',
131
+ ' - Revisar entorno y credenciales: arcli config revisar',
132
+ ' - Ver ejemplos listos para copiar: arcli ejemplos',
133
+ ' - Consultar si un receptor esta obligado a FCE: arcli fce-obligado <cuit>',
134
+ ' - Ver escenas de UI: arcli storybook',
135
+ ].join('\n'));
136
+ }
137
+ function createProgramExamples() {
138
+ return section('Ejemplos utiles', [
139
+ ' - Basico: arcli fc -m 300000 --cs --consumidor-final --ir-cf',
140
+ ' - Con CUIT: arcli fa -m 1 --cs --cuit 20168598204 --ir-ri',
141
+ ' - Nota: arcli nca -m 1 --cs --cuit 20168598204 --ir-ri --ac fa --apv 3 --ar 6 --acuit 20409509763',
142
+ ].join('\n'));
143
+ }
144
+ function createProgramSafety() {
145
+ return section('Ejecucion y seguridad', [
146
+ ' - --previsualizar muestra la solicitud antes de emitir.',
147
+ ' - --emitir habla de verdad con ARCA.',
148
+ ' - --produccion cambia al entorno real.',
149
+ ' - Para emitir de verdad necesita --produccion junto con --emitir.',
150
+ ' - Para scripts o pipelines, usá --json y evitá automatizar sobre salida humana.',
151
+ ].join('\n'));
152
+ }
153
+ function createProgramProject() {
154
+ return section('Proyecto y actualizaciones', [
155
+ ' - Repositorio: https://github.com/LcsGrz/arcli',
156
+ ' - Actualizar a la ultima version: npm install -g arcli@latest',
157
+ ' - Ver la version instalada: arcli --version',
158
+ ].join('\n'));
159
+ }
160
+ function createProgramDiscovery() {
161
+ return section('Descubrimiento', [
162
+ ' - Ayuda general: arcli ayuda',
163
+ ' - Ayuda de un shortcut: arcli fc ayuda',
164
+ ' - Ayuda de una familia: arcli factura ayuda',
165
+ ' - Ayuda de config: arcli config ayuda',
166
+ ' - Ayuda de ejemplos: arcli ejemplos ayuda',
167
+ ' - Ayuda de storybook: arcli storybook ayuda',
168
+ ].join('\n'));
169
+ }
170
+ function createProgramFrequentErrors() {
171
+ return section('Errores frecuentes', [
172
+ ' - Identidad duplicada: no uses --cuit y --consumidor-final juntos.',
173
+ ' - Falta IVA receptor: elegí --ir-* o --iva-receptor.',
174
+ ' - Flags incompatibles: no mezcles --emitir y --previsualizar.',
175
+ ' - JSON invalido o incompleto: revisá el archivo pasado a --cargar.',
176
+ ].join('\n'));
177
+ }
178
+ function createVoucherSummary(shortcut) {
179
+ const definition = getVoucherKindByShortcut(shortcut);
180
+ if (!definition) {
181
+ return '';
182
+ }
183
+ const whenToUse = definition.requiresAssociatedVoucher
184
+ ? 'Use este shortcut cuando ya sabe el comprobante exacto y necesita informar un asociado compatible.'
185
+ : 'Use este shortcut cuando ya sabe exactamente que comprobante quiere emitir y quiere escribir menos.';
186
+ return section('Resumen', [
187
+ ` - Comprobante: ${definition.displayName}`,
188
+ ` - Shortcut: arcli ${shortcut}`,
189
+ ` - Comando largo: arcli ${definition.family} ${definition.letter}`,
190
+ ` - Tipo ARCA: ${definition.arcaType}`,
191
+ ` - Cuando usarlo: ${whenToUse}`,
192
+ ].join('\n'));
193
+ }
194
+ function createShortcutMinimum(shortcut) {
195
+ const definition = getVoucherKindByShortcut(shortcut);
196
+ if (!definition) {
197
+ return '';
198
+ }
199
+ const example = definition.requiresAssociatedVoucher
200
+ ? ` - Ejemplo minimo: arcli ${shortcut} -m 1 --cs --cuit 20168598204 --ir-ri --ac fa --apv 3 --ar 6 --acuit 20409509763`
201
+ : ` - Ejemplo minimo: arcli ${shortcut} -m 300000 --cs --consumidor-final --ir-cf`;
202
+ return section('Para empezar', [
203
+ example,
204
+ definition.requiresAssociatedVoucher
205
+ ? ' - Ademas de la estructura base, este comprobante siempre necesita asociado.'
206
+ : ' - Con eso ya tenés una base funcional para previsualizar o emitir.',
207
+ ].join('\n'));
208
+ }
209
+ function createShortcutExamples(shortcut) {
210
+ const definition = getVoucherKindByShortcut(shortcut);
211
+ if (!definition) {
212
+ return '';
213
+ }
214
+ const examples = definition.requiresAssociatedVoucher
215
+ ? [
216
+ ` - Previsualizar: arcli ${shortcut} -m 1 --cs --cuit 20168598204 --ir-ri --ac fa --apv 3 --ar 6 --acuit 20409509763 --previsualizar`,
217
+ ` - Emitir: arcli ${shortcut} -m 1 --cs --cuit 20168598204 --ir-ri --ac fa --apv 3 --ar 6 --acuit 20409509763 --emitir --bruto`,
218
+ ` - JSON: arcli ${shortcut} --cargar ./voucher.json --json`,
219
+ ]
220
+ : [
221
+ ` - Rapido: arcli ${shortcut} -m 15000 --cs --consumidor-final --ir-cf`,
222
+ ` - Emitir: arcli ${shortcut} -m 1 --cs --cuit 20168598204 --ir-ri --emitir --bruto`,
223
+ ` - JSON: arcli ${shortcut} --cargar ./voucher.json --json`,
224
+ ];
225
+ return section('Ejemplos', examples.join('\n'));
226
+ }
227
+ function createShortcutImportantFlags(shortcut) {
228
+ const definition = getVoucherKindByShortcut(shortcut);
229
+ if (!definition) {
230
+ return '';
231
+ }
232
+ return section('Flags importantes', [
233
+ ' - Estructura base: --monto, --concepto/--cs/--cp/--csp, identidad y IVA receptor.',
234
+ ' - Datos comunes: --pv, --fecha, --moneda, --cm, --cargar.',
235
+ ' - Servicio: --dia, --sd y --sh cuando el concepto usa servicios.',
236
+ definition.requiresAssociatedVoucher
237
+ ? definition.isElectronicCredit
238
+ ? ' - Asociado: --ac o --at, mas --apv, --ar y --afecha.'
239
+ : ' - Asociado: --ac o --at, mas --apv, --ar y --acuit; o un periodo con --pd y --ph.'
240
+ : ' - Asociado: no aplica para este comprobante.',
241
+ ...(definition.isElectronicCredit
242
+ ? [
243
+ definition.requiresAssociatedVoucher
244
+ ? ' - FCE: --afecha obligatoria y --anulacion si anula una factura rechazada.'
245
+ : ' - FCE: --cbu obligatorio (o config cbu), --alias y --transferencia sca|adc.',
246
+ ]
247
+ : []),
248
+ ' - Salida y ejecucion: --previsualizar, --emitir, --json, --bruto, --testing, --produccion.',
249
+ ].join('\n'));
250
+ }
251
+ function createShortcutAvailableFlags(shortcut) {
252
+ const definition = getVoucherKindByShortcut(shortcut);
253
+ if (!definition) {
254
+ return '';
255
+ }
256
+ return section('Mas parametros disponibles', [
257
+ 'Generales',
258
+ AVAILABLE_GENERAL_OPTIONS,
259
+ '',
260
+ 'Receptor e IVA',
261
+ AVAILABLE_IDENTITY_OPTIONS,
262
+ '',
263
+ 'Servicio',
264
+ AVAILABLE_SERVICE_OPTIONS,
265
+ '',
266
+ 'Comprobante asociado',
267
+ definition.requiresAssociatedVoucher ? AVAILABLE_ASSOCIATED_OPTIONS : ' - No aplica para este comprobante.',
268
+ '',
269
+ 'Credito electronico (FCE)',
270
+ resolveFceOptions(definition.isElectronicCredit, definition.requiresAssociatedVoucher),
271
+ '',
272
+ 'Ejecucion y salida',
273
+ AVAILABLE_EXECUTION_OPTIONS,
274
+ ].join('\n'));
275
+ }
276
+ function createShortcutFrequentErrors(shortcut) {
277
+ const definition = getVoucherKindByShortcut(shortcut);
278
+ if (!definition) {
279
+ return '';
280
+ }
281
+ const lines = [
282
+ ' - No mezcle identidades del receptor.',
283
+ ' - No mezcle --emitir y --previsualizar.',
284
+ ' - Si usa --cargar, revise que el JSON tenga claves validas.',
285
+ ];
286
+ if (definition.requiresAssociatedVoucher) {
287
+ lines.push(' - Este comprobante exige asociado; complete --ac, --apv, --ar y --acuit cuando corresponda.');
288
+ }
289
+ return section('Errores frecuentes', lines.join('\n'));
290
+ }
291
+ function createFamilySummary(family) {
292
+ return section('Resumen', [
293
+ ` - Familia: ${FAMILY_LABELS[family]}`,
294
+ ` - Uso: arcli ${family} <a|b|c>`,
295
+ ' - Letras validas: a, b, c',
296
+ ' - Use la familia cuando quiera cambiar solo la letra sin aprender todos los shortcuts.',
297
+ ' - Si ya sabés el comprobante exacto, el shortcut suele ser mas rapido.',
298
+ ].join('\n'));
299
+ }
300
+ function createFamilyExamples(family) {
301
+ return section('Ejemplos por letra', [
302
+ ` - Letra A: arcli ${family} a -m 15000 --cs --cuit 20168598204 --ir-ri`,
303
+ ` - Letra B: arcli ${family} b -m 15000 --cs --consumidor-final --ir-cf`,
304
+ ` - Letra C con JSON: arcli ${family} c --cargar ./voucher.json --json`,
305
+ ].join('\n'));
306
+ }
307
+ function createFamilySharedFlags(family) {
308
+ return [
309
+ section('Shortcuts relacionados', formatFamilyShortcuts(family)),
310
+ '',
311
+ section('Flags importantes', [
312
+ ' - Base comun: --monto, --concepto/--cs/--cp/--csp, identidad e IVA receptor.',
313
+ ' - Datos comunes: --pv, --fecha, --moneda, --cm, --cargar.',
314
+ ' - Servicio: --dia, --sd y --sh cuando el concepto usa servicios.',
315
+ family.includes('nota')
316
+ ? ' - Asociado: esta familia lo exige; usá --ac o --at, mas --apv, --ar y --acuit.'
317
+ : ' - Asociado: no aplica para esta familia.',
318
+ ' - Ejecucion y salida: --previsualizar, --emitir, --json, --bruto, --testing, --produccion.',
319
+ ].join('\n')),
320
+ '',
321
+ section('Mas parametros disponibles', [
322
+ 'Generales',
323
+ AVAILABLE_GENERAL_OPTIONS,
324
+ '',
325
+ 'Receptor e IVA',
326
+ AVAILABLE_IDENTITY_OPTIONS,
327
+ '',
328
+ 'Servicio',
329
+ AVAILABLE_SERVICE_OPTIONS,
330
+ '',
331
+ 'Comprobante asociado',
332
+ family.includes('nota') ? AVAILABLE_ASSOCIATED_OPTIONS : ' - No aplica para esta familia.',
333
+ '',
334
+ 'Credito electronico (FCE)',
335
+ resolveFceOptions(family.includes('electronica'), family.includes('nota')),
336
+ '',
337
+ 'Ejecucion y salida',
338
+ AVAILABLE_EXECUTION_OPTIONS,
339
+ ].join('\n')),
340
+ ].join('\n');
341
+ }
342
+ function createFamilyFrequentErrors(family) {
343
+ const lines = [
344
+ ' - La letra debe ser a, b o c.',
345
+ ' - No mezcle identidades o conceptos incompatibles.',
346
+ ' - Si carga JSON, la letra del comando y el contenido deben representar el mismo comprobante.',
347
+ ];
348
+ if (family.includes('nota')) {
349
+ lines.push(' - Las notas requieren un asociado compatible; sin eso ARCLI no puede armar el payload final.');
350
+ }
351
+ return section('Errores frecuentes', lines.join('\n'));
352
+ }
353
+ export function createConfigHelp() {
354
+ return [
355
+ '',
356
+ section('Para que sirve', [
357
+ ' - Guardar defaults del CLI para no repetir flags en cada corrida.',
358
+ ' - Definir rutas de certificados y claves por entorno.',
359
+ ' - Revisar si el entorno esta listo antes de emitir.',
360
+ ].join('\n')),
361
+ '',
362
+ section('Casos comunes', [
363
+ ' - Guardar defaults para no repetir flags como puntoVenta, concepto o IVA receptor.',
364
+ ' - Revisar si testing o produccion tienen credenciales y contexto validos.',
365
+ ' - Debuggear por que un comando pide datos que pensabas tener guardados.',
366
+ ].join('\n')),
367
+ '',
368
+ section('Comandos mas usados', [
369
+ ' - Ver config actual: arcli config',
370
+ ' - Revisar entorno: arcli config revisar',
371
+ ' - Ver ruta del archivo: arcli config ruta',
372
+ ' - Guardar un default: arcli config establecer puntoVenta 3',
373
+ ' - Guardar una credencial: arcli config establecer cert.testing /ruta/cert.crt',
374
+ ].join('\n')),
375
+ '',
376
+ section('Defaults que podes guardar', [
377
+ ' - entorno: testing o produccion por defecto cuando no pasas --testing/--produccion.',
378
+ ' - cuit, puntoVenta, concepto, ivaReceptor: datos de facturacion que se repiten siempre.',
379
+ ' - cert.testing, cert.produccion, key.testing, key.produccion: rutas a certificado/clave por entorno.',
380
+ ' - moneda, cotizacion: defaults cuando no pasas --moneda/--cm.',
381
+ ' - alicuota: alicuota de IVA por defecto para letras A y B.',
382
+ ' - emitir, json, bruto: defaults de ejecucion y salida (true/false, si/no o 1/0).',
383
+ ' - ticketPath: carpeta donde se cachea el ticket WSAA.',
384
+ ' - Guardar: arcli config establecer <clave> <valor>. Borrar: arcli config eliminar <clave>.',
385
+ ].join('\n')),
386
+ '',
387
+ section('Ejemplos', [
388
+ ' - arcli config establecer cuit 20409509763',
389
+ ' - arcli config establecer entorno produccion',
390
+ ' - arcli config establecer ivaReceptor consumidor-final',
391
+ ' - arcli config establecer key.produccion /ruta/clave.key',
392
+ ' - arcli config establecer ticketPath /ruta/tickets',
393
+ ' - arcli config eliminar json',
394
+ ].join('\n')),
395
+ '',
396
+ section('Errores frecuentes', [
397
+ ' - Faltan cert.testing o key.testing: corra arcli config revisar.',
398
+ ' - Punto de venta no configurado: guarde puntoVenta o paselo por flag.',
399
+ ' - Emitir por defecto activado sin querer: revise el valor de emitir.',
400
+ ].join('\n')),
401
+ '',
402
+ section('No tenes certificado todavia?', [
403
+ ' - Guia paso a paso (testing y produccion), con capturas de ARCA:',
404
+ ' https://github.com/LcsGrz/arcli/blob/main/docs/obtencion-certificados.md',
405
+ ].join('\n')),
406
+ '',
407
+ ].join('\n');
408
+ }
409
+ export function createStorybookHelp() {
410
+ return [
411
+ '',
412
+ section('Escenas disponibles', [
413
+ ' - arcli storybook',
414
+ ' - arcli storybook colores',
415
+ ' - arcli storybook componentes',
416
+ ' - arcli storybook comprobantes',
417
+ ' - arcli storybook configuracion',
418
+ ' - arcli storybook errores',
419
+ ' - arcli storybook json',
420
+ ].join('\n')),
421
+ '',
422
+ section('Cuando usarlo', [
423
+ ' - Revisar la UI del CLI sin pegarle a ARCA.',
424
+ ' - Probar escenas visuales mientras ajusta paneles, colores o contratos JSON.',
425
+ ].join('\n')),
426
+ '',
427
+ ].join('\n');
428
+ }
429
+ export function createExamplesHelp() {
430
+ return [
431
+ '',
432
+ section('Para que sirve', [
433
+ ' - Mostrar ejemplos seguros y listos para copiar de todos los comprobantes soportados.',
434
+ ' - Comparar la forma larga y la forma corta del mismo comando.',
435
+ ' - Ver rapido que cambia entre una variante minima y una full.',
436
+ ].join('\n')),
437
+ '',
438
+ section('Como leer la salida', [
439
+ ' - Minima: datos esenciales del comprobante.',
440
+ ' - Full: mas campos explicitados para el mismo flujo.',
441
+ ' - Larga: comando largo y flags descriptivos.',
442
+ ' - Corta: shortcut y aliases practicos.',
443
+ ].join('\n')),
444
+ '',
445
+ section('Seguridad', [
446
+ ' - Todos los ejemplos usan --previsualizar para evitar emisiones reales por error.',
447
+ ' - Si queres emitir, reemplaza --previsualizar por --emitir.',
448
+ ].join('\n')),
449
+ '',
450
+ ].join('\n');
451
+ }
452
+ export function createFceObligationHelp() {
453
+ return [
454
+ '',
455
+ section('Para que sirve', [
456
+ ' - Saber si a un receptor le corresponde factura comun o Factura de Credito Electronica (FCE).',
457
+ ' - ARCA informa si esta obligado a recibir FCE y desde que monto.',
458
+ ].join('\n')),
459
+ '',
460
+ section('Ejemplos', [' - arcli fce-obligado 30709965812', ' - arcli fce-obligado 30709965812 --fecha 15/10 --json'].join('\n')),
461
+ '',
462
+ section('Requisitos', [
463
+ ' - El certificado tiene que estar autorizado para el servicio wsfecred en ARCA.',
464
+ ' - Para chequearlo en cada factura: arcli config establecer verificarFce true',
465
+ ].join('\n')),
466
+ '',
467
+ ].join('\n');
468
+ }
469
+ export function createShortcutHelp(shortcut) {
470
+ return [
471
+ '',
472
+ createVoucherSummary(shortcut),
473
+ '',
474
+ createShortcutMinimum(shortcut),
475
+ '',
476
+ createShortcutImportantFlags(shortcut),
477
+ '',
478
+ createShortcutExamples(shortcut),
479
+ '',
480
+ createShortcutAvailableFlags(shortcut),
481
+ '',
482
+ section('Reglas clave', CORE_RULES),
483
+ '',
484
+ createShortcutFrequentErrors(shortcut),
485
+ '',
486
+ ].join('\n');
487
+ }
488
+ export function createFamilyHelp(family) {
489
+ return [
490
+ '',
491
+ createFamilySummary(family),
492
+ '',
493
+ createFamilyExamples(family),
494
+ '',
495
+ createFamilySharedFlags(family),
496
+ '',
497
+ section('Reglas clave', CORE_RULES),
498
+ '',
499
+ createFamilyFrequentErrors(family),
500
+ '',
501
+ ].join('\n');
502
+ }
503
+ export function createProgramHelp() {
504
+ return [
505
+ '',
506
+ createProgramQuickStart(),
507
+ '',
508
+ createProgramMentalModel(),
509
+ '',
510
+ createProgramFamilies(),
511
+ '',
512
+ createProgramCommands(),
513
+ '',
514
+ createProgramExamples(),
515
+ '',
516
+ createProgramSafety(),
517
+ '',
518
+ createProgramDiscovery(),
519
+ '',
520
+ createProgramFrequentErrors(),
521
+ '',
522
+ createProgramProject(),
523
+ '',
524
+ ].join('\n');
525
+ }
526
+ export function configureSpanishHelp(command) {
527
+ command.helpCommand(false);
528
+ command.helpOption('--ayuda', 'mostrar ayuda');
529
+ command.showHelpAfterError('(usa "ayuda" para ver ejemplos y opciones)');
530
+ }
531
+ export function createProgramHeader() {
532
+ return renderLogo();
533
+ }
534
+ //# sourceMappingURL=help.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/cli/help.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,MAAM,aAAa,GAAkC;IACnD,OAAO,EAAE,SAAS;IAClB,6BAA6B,EAAE,gCAAgC;IAC/D,cAAc,EAAE,iBAAiB;IACjC,0BAA0B,EAAE,6BAA6B;IACzD,aAAa,EAAE,gBAAgB;IAC/B,yBAAyB,EAAE,4BAA4B;CACxD,CAAC;AAEF,MAAM,gBAAgB,GAAwF;IAC5G,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IAC3B,6BAA6B,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;IACvD,cAAc,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IACrC,0BAA0B,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;IACpD,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IACpC,yBAAyB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;CACpD,CAAC;AAEF,MAAM,yBAAyB,GAAG;IAChC,8DAA8D;IAC9D,4EAA4E;IAC5E,uEAAuE;IACvE,iFAAiF;IACjF,wDAAwD;IACxD,0FAA0F;IAC1F,8HAA8H;IAC9H,4GAA4G;IAC5G,uEAAuE;IACvE,oHAAoH;IACpH,qEAAqE;IACrE,4EAA4E;CAC7E,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,0BAA0B,GAAG;IACjC,iDAAiD;IACjD,iDAAiD;IAC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KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,MAAqB;IACpD,OAAO;QACL,EAAE;QACF,mBAAmB,CAAC,MAAM,CAAC;QAC3B,EAAE;QACF,oBAAoB,CAAC,MAAM,CAAC;QAC5B,EAAE;QACF,uBAAuB,CAAC,MAAM,CAAC;QAC/B,EAAE;QACF,OAAO,CAAC,cAAc,EAAE,UAAU,CAAC;QACnC,EAAE;QACF,0BAA0B,CAAC,MAAM,CAAC;QAClC,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,OAAO;QACL,EAAE;QACF,uBAAuB,EAAE;QACzB,EAAE;QACF,wBAAwB,EAAE;QAC1B,EAAE;QACF,qBAAqB,EAAE;QACvB,EAAE;QACF,qBAAqB,EAAE;QACvB,EAAE;QACF,qBAAqB,EAAE;QACvB,EAAE;QACF,mBAAmB,EAAE;QACrB,EAAE;QACF,sBAAsB,EAAE;QACxB,EAAE;QACF,2BAA2B,EAAE;QAC7B,EAAE;QACF,oBAAoB,EAAE;QACtB,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,OAAgB;IACnD,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3B,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;IAC/C,OAAO,CAAC,kBAAkB,CAAC,4CAA4C,CAAC,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,mBAAmB;IACjC,OAAO,UAAU,EAAE,CAAC;AACtB,CAAC"}
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+ import { renderUpdateNoticePanel } from '../modules/update-check/update-check.presenter.js';
3
+ import { checkForUpdate } from '../modules/update-check/update-check.service.js';
4
+ import { formatCliError, writeTerminalError, writeTerminalJsonError } from '../ui/index.js';
5
+ import { createProgram } from './program.js';
6
+ import { CLI_VERSION } from './version.js';
7
+ function normalizeHelpArgv(argv) {
8
+ const cliArgs = argv.slice(2);
9
+ if (cliArgs.length === 0) {
10
+ return argv;
11
+ }
12
+ if (cliArgs[0] === 'ayuda') {
13
+ const rest = cliArgs.slice(1);
14
+ return argv.slice(0, 2).concat(rest.length > 0 ? [...rest, '--ayuda'] : ['--ayuda']);
15
+ }
16
+ if (cliArgs[cliArgs.length - 1] === 'ayuda') {
17
+ return argv.slice(0, 2).concat([...cliArgs.slice(0, -1), '--ayuda']);
18
+ }
19
+ return argv;
20
+ }
21
+ const program = createProgram();
22
+ const useJson = process.argv.includes('--json');
23
+ const updateCheckPromise = useJson ? Promise.resolve(null) : checkForUpdate(CLI_VERSION).catch(() => null);
24
+ program
25
+ .parseAsync(normalizeHelpArgv(process.argv))
26
+ .then(async () => {
27
+ const updateResult = await updateCheckPromise;
28
+ if (updateResult) {
29
+ writeTerminalError(renderUpdateNoticePanel(updateResult));
30
+ }
31
+ })
32
+ .catch((error) => {
33
+ if (useJson) {
34
+ writeTerminalJsonError(formatCliError(error, useJson));
35
+ }
36
+ else {
37
+ writeTerminalError(formatCliError(error, useJson));
38
+ }
39
+ process.exitCode = 1;
40
+ });
41
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AACzF,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAEnF,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,SAA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,KAAK,IAAI,EAAE;IACf,MAAM,YAAY,GAAG,MAAM,kBAAkB,CAAC;IAE9C,IAAI,YAAY,EAAE,CAAC;QACjB,kBAAkB,CAAC,uBAAuB,CAAC,YAAY,CAAC,CAAC,CAAC;IAC5D,CAAC;AACH,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IACxB,IAAI,OAAO,EAAE,CAAC;QACZ,sBAAsB,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IACzD,CAAC;SAAM,CAAC;QACN,kBAAkB,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IACrD,CAAC;IAED,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare function createProgram(): Command;
@@ -0,0 +1,30 @@
1
+ import { Command } from 'commander';
2
+ import { registerGlobalOptions } from './commands/billing.command.shared.js';
3
+ import { registerBillingFamilyCommands } from './commands/billing-family.command.js';
4
+ import { registerBillingShortcutCommands } from './commands/billing-shortcuts.command.js';
5
+ import { registerConfigCommand } from './commands/config.command.js';
6
+ import { registerExamplesCommand } from './commands/examples.command.js';
7
+ import { registerFceObligationCommand } from './commands/fce-obligation.command.js';
8
+ import { registerStorybookCommand } from './commands/storybook.command.js';
9
+ import { configureSpanishHelp, createProgramHeader, createProgramHelp } from './help.js';
10
+ import { CLI_VERSION } from './version.js';
11
+ export function createProgram() {
12
+ const program = new Command();
13
+ program
14
+ .name('arcli')
15
+ .description('Emití y revisá comprobantes ARCA desde terminal con una UX mas simple, validaciones claras y salida lista para automatizar.')
16
+ .version(CLI_VERSION)
17
+ .showHelpAfterError('(usa "ayuda" para ver comandos y ejemplos)');
18
+ configureSpanishHelp(program);
19
+ registerGlobalOptions(program);
20
+ registerBillingShortcutCommands(program);
21
+ registerBillingFamilyCommands(program);
22
+ registerConfigCommand(program);
23
+ registerExamplesCommand(program);
24
+ registerFceObligationCommand(program);
25
+ registerStorybookCommand(program);
26
+ program.addHelpText('beforeAll', ({ command }) => (command === program ? createProgramHeader() : ''));
27
+ program.addHelpText('afterAll', ({ command }) => (command === program ? createProgramHelp() : ''));
28
+ return program;
29
+ }
30
+ //# sourceMappingURL=program.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"program.js","sourceRoot":"","sources":["../../src/cli/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,UAAU,aAAa;IAC3B,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAE9B,OAAO;SACJ,IAAI,CAAC,OAAO,CAAC;SACb,WAAW,CACV,6HAA6H,CAC9H;SACA,OAAO,CAAC,WAAW,CAAC;SACpB,kBAAkB,CAAC,4CAA4C,CAAC,CAAC;IAEpE,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC9B,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAE/B,+BAA+B,CAAC,OAAO,CAAC,CAAC;IACzC,6BAA6B,CAAC,OAAO,CAAC,CAAC;IACvC,qBAAqB,CA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