i-repo 2.0.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.
Files changed (488) hide show
  1. package/README.md +37 -10
  2. package/dist/bin/irepo.d.ts +0 -1
  3. package/dist/bin/irepo.js +154 -16
  4. package/dist/commands/auth.d.ts +0 -1
  5. package/dist/commands/auth.js +6 -1
  6. package/dist/commands/batch-result.d.ts +2 -0
  7. package/dist/commands/batch-result.js +24 -0
  8. package/dist/commands/config.d.ts +0 -1
  9. package/dist/commands/config.js +15 -4
  10. package/dist/commands/definition-batches/index.d.ts +0 -1
  11. package/dist/commands/definition-batches/index.js +22 -22
  12. package/dist/commands/definitions/get.d.ts +0 -1
  13. package/dist/commands/definitions/get.js +6 -3
  14. package/dist/commands/definitions/index.d.ts +0 -1
  15. package/dist/commands/definitions/index.js +0 -1
  16. package/dist/commands/definitions/labels.d.ts +0 -1
  17. package/dist/commands/definitions/labels.js +9 -9
  18. package/dist/commands/definitions/list.d.ts +0 -1
  19. package/dist/commands/definitions/list.js +11 -17
  20. package/dist/commands/definitions/lock.d.ts +0 -1
  21. package/dist/commands/definitions/lock.js +7 -4
  22. package/dist/commands/definitions/roles.d.ts +0 -1
  23. package/dist/commands/definitions/roles.js +7 -7
  24. package/dist/commands/index.d.ts +0 -1
  25. package/dist/commands/index.js +0 -1
  26. package/dist/commands/plugin.d.ts +0 -1
  27. package/dist/commands/plugin.js +69 -7
  28. package/dist/commands/raw.d.ts +0 -1
  29. package/dist/commands/raw.js +5 -5
  30. package/dist/commands/report-batches/index.d.ts +0 -1
  31. package/dist/commands/report-batches/index.js +99 -95
  32. package/dist/commands/reports/cluster-value.d.ts +0 -1
  33. package/dist/commands/reports/cluster-value.js +11 -8
  34. package/dist/commands/reports/copy.d.ts +0 -1
  35. package/dist/commands/reports/copy.js +7 -5
  36. package/dist/commands/reports/create-sorted.d.ts +0 -1
  37. package/dist/commands/reports/create-sorted.js +6 -4
  38. package/dist/commands/reports/download.d.ts +0 -1
  39. package/dist/commands/reports/download.js +7 -5
  40. package/dist/commands/reports/get.d.ts +0 -1
  41. package/dist/commands/reports/get.js +13 -8
  42. package/dist/commands/reports/index.d.ts +0 -1
  43. package/dist/commands/reports/index.js +0 -1
  44. package/dist/commands/reports/labels.d.ts +0 -1
  45. package/dist/commands/reports/labels.js +5 -5
  46. package/dist/commands/reports/list.d.ts +0 -1
  47. package/dist/commands/reports/list.js +38 -46
  48. package/dist/commands/reports/lock.d.ts +0 -1
  49. package/dist/commands/reports/lock.js +7 -4
  50. package/dist/commands/reports/roles.d.ts +0 -1
  51. package/dist/commands/reports/roles.js +5 -5
  52. package/dist/commands/schema.d.ts +33 -0
  53. package/dist/commands/schema.js +72 -0
  54. package/dist/commands/shared-options.d.ts +61 -0
  55. package/dist/commands/shared-options.js +143 -0
  56. package/dist/commands/systems/index.d.ts +0 -1
  57. package/dist/commands/systems/index.js +52 -46
  58. package/dist/config/client.d.ts +0 -1
  59. package/dist/config/client.js +6 -4
  60. package/dist/config/command-gate.d.ts +68 -0
  61. package/dist/config/command-gate.js +133 -0
  62. package/dist/config/index.d.ts +0 -1
  63. package/dist/config/index.js +0 -1
  64. package/dist/config/migrate.d.ts +0 -1
  65. package/dist/config/migrate.js +0 -1
  66. package/dist/config/scoped-store.d.ts +0 -1
  67. package/dist/config/scoped-store.js +72 -20
  68. package/dist/config/store.d.ts +12 -1
  69. package/dist/config/store.js +2 -1
  70. package/dist/contracts/registry.d.ts +36 -0
  71. package/dist/contracts/registry.js +40 -0
  72. package/dist/core/errors.d.ts +13 -1
  73. package/dist/core/errors.js +22 -1
  74. package/dist/core/index.d.ts +1 -2
  75. package/dist/core/index.js +1 -2
  76. package/dist/core/logger.d.ts +0 -1
  77. package/dist/core/logger.js +0 -1
  78. package/dist/i18n/command-labels.d.ts +0 -1
  79. package/dist/i18n/command-labels.js +0 -1
  80. package/dist/i18n/index.d.ts +0 -1
  81. package/dist/i18n/index.js +0 -1
  82. package/dist/i18n/locales/en.d.ts +0 -1
  83. package/dist/i18n/locales/en.js +11 -1
  84. package/dist/i18n/locales/ja.d.ts +0 -1
  85. package/dist/i18n/locales/ja.js +11 -1
  86. package/dist/i18n/types.d.ts +9 -1
  87. package/dist/i18n/types.js +0 -1
  88. package/dist/index.d.ts +0 -1
  89. package/dist/index.js +0 -1
  90. package/dist/ink/App.d.ts +0 -1
  91. package/dist/ink/App.js +0 -1
  92. package/dist/ink/components/Banner.d.ts +0 -1
  93. package/dist/ink/components/Banner.js +0 -1
  94. package/dist/ink/components/DetailView.d.ts +0 -1
  95. package/dist/ink/components/DetailView.js +0 -1
  96. package/dist/ink/components/ErrorView.d.ts +0 -1
  97. package/dist/ink/components/ErrorView.js +0 -1
  98. package/dist/ink/components/FilterSelect.d.ts +0 -1
  99. package/dist/ink/components/FilterSelect.js +0 -1
  100. package/dist/ink/components/Layout.d.ts +0 -1
  101. package/dist/ink/components/Layout.js +0 -1
  102. package/dist/ink/components/OptionForm.d.ts +0 -1
  103. package/dist/ink/components/OptionForm.js +15 -4
  104. package/dist/ink/components/ResultView.d.ts +0 -1
  105. package/dist/ink/components/ResultView.js +0 -1
  106. package/dist/ink/components/SpinnerView.d.ts +0 -1
  107. package/dist/ink/components/SpinnerView.js +0 -1
  108. package/dist/ink/components/TableView.d.ts +0 -1
  109. package/dist/ink/components/TableView.js +0 -1
  110. package/dist/ink/escape-sequences.d.ts +0 -1
  111. package/dist/ink/escape-sequences.js +0 -1
  112. package/dist/ink/index.d.ts +0 -1
  113. package/dist/ink/index.js +0 -1
  114. package/dist/ink/keymap.d.ts +0 -1
  115. package/dist/ink/keymap.js +0 -1
  116. package/dist/ink/registry/commands.d.ts +0 -1
  117. package/dist/ink/registry/commands.js +66 -3
  118. package/dist/ink/registry/executors.d.ts +0 -1
  119. package/dist/ink/registry/executors.js +31 -19
  120. package/dist/ink/screens/AuthLoginScreen.d.ts +0 -1
  121. package/dist/ink/screens/AuthLoginScreen.js +0 -1
  122. package/dist/ink/screens/CommandScreen.d.ts +0 -1
  123. package/dist/ink/screens/CommandScreen.js +12 -5
  124. package/dist/ink/screens/HomeScreen.d.ts +0 -1
  125. package/dist/ink/screens/HomeScreen.js +16 -4
  126. package/dist/ink/screens/PluginsScreen.d.ts +0 -1
  127. package/dist/ink/screens/PluginsScreen.js +27 -3
  128. package/dist/ink/screens/UpdateCheckScreen.d.ts +0 -1
  129. package/dist/ink/screens/UpdateCheckScreen.js +0 -1
  130. package/dist/ink/theme.d.ts +0 -1
  131. package/dist/ink/theme.js +0 -1
  132. package/dist/ink/types.d.ts +12 -1
  133. package/dist/ink/types.js +0 -1
  134. package/dist/ink/ui-theme.d.ts +0 -1
  135. package/dist/ink/ui-theme.js +0 -1
  136. package/dist/ink/use-stdin-recovery.d.ts +0 -1
  137. package/dist/ink/use-stdin-recovery.js +0 -1
  138. package/dist/plugins/describe.d.ts +59 -0
  139. package/dist/plugins/describe.js +144 -0
  140. package/dist/plugins/dispatch.d.ts +14 -2
  141. package/dist/plugins/dispatch.js +15 -5
  142. package/dist/plugins/templates.d.ts +0 -1
  143. package/dist/plugins/templates.js +12 -3
  144. package/dist/plugins/verify.d.ts +17 -1
  145. package/dist/plugins/verify.js +23 -7
  146. package/dist/sdk/api/auth.d.ts +0 -1
  147. package/dist/sdk/api/auth.js +0 -1
  148. package/dist/sdk/api/definition-batch.d.ts +0 -1
  149. package/dist/sdk/api/definition-batch.js +0 -1
  150. package/dist/sdk/api/definition.d.ts +0 -1
  151. package/dist/sdk/api/definition.js +0 -1
  152. package/dist/sdk/api/report-batch.d.ts +0 -1
  153. package/dist/sdk/api/report-batch.js +0 -1
  154. package/dist/sdk/api/report.d.ts +0 -1
  155. package/dist/sdk/api/report.js +0 -1
  156. package/dist/sdk/api/system.d.ts +0 -1
  157. package/dist/sdk/api/system.js +0 -1
  158. package/dist/sdk/client.d.ts +0 -1
  159. package/dist/sdk/client.js +0 -1
  160. package/dist/sdk/core/base-api.d.ts +7 -1
  161. package/dist/sdk/core/base-api.js +39 -1
  162. package/dist/sdk/core/errors.d.ts +0 -1
  163. package/dist/sdk/core/errors.js +0 -1
  164. package/dist/sdk/core/http-client.d.ts +0 -1
  165. package/dist/sdk/core/http-client.js +4 -2
  166. package/dist/sdk/core/index.d.ts +0 -1
  167. package/dist/sdk/core/index.js +0 -1
  168. package/dist/sdk/core/params.d.ts +0 -1
  169. package/dist/sdk/core/params.js +0 -1
  170. package/dist/sdk/core/xml-parser.d.ts +0 -1
  171. package/dist/sdk/core/xml-parser.js +0 -1
  172. package/dist/sdk/generated/types.d.ts +0 -1
  173. package/dist/sdk/generated/types.js +0 -1
  174. package/dist/sdk/index.d.ts +0 -1
  175. package/dist/sdk/index.js +0 -1
  176. package/dist/sdk/resources/definition-batches.d.ts +0 -1
  177. package/dist/sdk/resources/definition-batches.js +0 -1
  178. package/dist/sdk/resources/definitions.d.ts +0 -1
  179. package/dist/sdk/resources/definitions.js +0 -1
  180. package/dist/sdk/resources/index.d.ts +0 -1
  181. package/dist/sdk/resources/index.js +0 -1
  182. package/dist/sdk/resources/report-batches.d.ts +0 -1
  183. package/dist/sdk/resources/report-batches.js +0 -1
  184. package/dist/sdk/resources/reports.d.ts +0 -1
  185. package/dist/sdk/resources/reports.js +0 -1
  186. package/dist/sdk/resources/shared.d.ts +5 -1
  187. package/dist/sdk/resources/shared.js +7 -5
  188. package/dist/sdk/resources/systems.d.ts +0 -1
  189. package/dist/sdk/resources/systems.js +0 -1
  190. package/dist/sdk/types/common.d.ts +0 -1
  191. package/dist/sdk/types/common.js +0 -1
  192. package/dist/sdk/types/definition-batch.d.ts +0 -1
  193. package/dist/sdk/types/definition-batch.js +0 -1
  194. package/dist/sdk/types/definition.d.ts +2 -3
  195. package/dist/sdk/types/definition.js +0 -1
  196. package/dist/sdk/types/index.d.ts +0 -1
  197. package/dist/sdk/types/index.js +0 -1
  198. package/dist/sdk/types/public.d.ts +16 -5
  199. package/dist/sdk/types/public.js +0 -1
  200. package/dist/sdk/types/report-batch.d.ts +0 -1
  201. package/dist/sdk/types/report-batch.js +0 -1
  202. package/dist/sdk/types/report.d.ts +2 -3
  203. package/dist/sdk/types/report.js +0 -1
  204. package/dist/sdk/types/system.d.ts +0 -1
  205. package/dist/sdk/types/system.js +0 -1
  206. package/dist/ui/banner.d.ts +0 -1
  207. package/dist/ui/banner.js +0 -1
  208. package/dist/ui/error.d.ts +5 -2
  209. package/dist/ui/error.js +12 -6
  210. package/dist/ui/formatters/csv.d.ts +12 -1
  211. package/dist/ui/formatters/csv.js +24 -8
  212. package/dist/ui/formatters/envelope.d.ts +1 -1
  213. package/dist/ui/formatters/envelope.js +1 -2
  214. package/dist/ui/formatters/index.d.ts +4 -2
  215. package/dist/ui/formatters/index.js +9 -1
  216. package/dist/ui/formatters/json.d.ts +0 -7
  217. package/dist/ui/formatters/json.js +12 -2
  218. package/dist/ui/formatters/ndjson.d.ts +0 -19
  219. package/dist/ui/formatters/ndjson.js +2 -2
  220. package/dist/ui/formatters/quiet.d.ts +0 -1
  221. package/dist/ui/formatters/quiet.js +3 -3
  222. package/dist/ui/formatters/renderers.d.ts +0 -1
  223. package/dist/ui/formatters/renderers.js +0 -1
  224. package/dist/ui/formatters/table.d.ts +0 -1
  225. package/dist/ui/formatters/table.js +12 -10
  226. package/dist/ui/formatters/writer.d.ts +37 -0
  227. package/dist/ui/formatters/writer.js +82 -0
  228. package/dist/ui/index.d.ts +1 -1
  229. package/dist/ui/index.js +1 -1
  230. package/dist/ui/progress.d.ts +0 -1
  231. package/dist/ui/progress.js +0 -1
  232. package/dist/ui/prompt.d.ts +0 -1
  233. package/dist/ui/prompt.js +0 -1
  234. package/dist/ui/spinner.d.ts +0 -1
  235. package/dist/ui/spinner.js +0 -1
  236. package/dist/ui/table.d.ts +0 -1
  237. package/dist/ui/table.js +11 -11
  238. package/dist/ui/theme.d.ts +0 -1
  239. package/dist/ui/theme.js +0 -1
  240. package/dist/ui/width.d.ts +12 -1
  241. package/dist/ui/width.js +17 -1
  242. package/dist/utils/constants.d.ts +0 -1
  243. package/dist/utils/constants.js +0 -1
  244. package/dist/utils/file.d.ts +0 -1
  245. package/dist/utils/file.js +13 -3
  246. package/dist/utils/index.d.ts +0 -1
  247. package/dist/utils/index.js +0 -1
  248. package/dist/utils/output.d.ts +0 -1
  249. package/dist/utils/output.js +0 -1
  250. package/dist/utils/version.d.ts +0 -1
  251. package/dist/utils/version.js +0 -1
  252. package/package.json +2 -2
  253. package/dist/bin/irepo.d.ts.map +0 -1
  254. package/dist/bin/irepo.js.map +0 -1
  255. package/dist/commands/auth.d.ts.map +0 -1
  256. package/dist/commands/auth.js.map +0 -1
  257. package/dist/commands/config.d.ts.map +0 -1
  258. package/dist/commands/config.js.map +0 -1
  259. package/dist/commands/definition-batches/index.d.ts.map +0 -1
  260. package/dist/commands/definition-batches/index.js.map +0 -1
  261. package/dist/commands/definitions/get.d.ts.map +0 -1
  262. package/dist/commands/definitions/get.js.map +0 -1
  263. package/dist/commands/definitions/index.d.ts.map +0 -1
  264. package/dist/commands/definitions/index.js.map +0 -1
  265. package/dist/commands/definitions/labels.d.ts.map +0 -1
  266. package/dist/commands/definitions/labels.js.map +0 -1
  267. package/dist/commands/definitions/list.d.ts.map +0 -1
  268. package/dist/commands/definitions/list.js.map +0 -1
  269. package/dist/commands/definitions/lock.d.ts.map +0 -1
  270. package/dist/commands/definitions/lock.js.map +0 -1
  271. package/dist/commands/definitions/roles.d.ts.map +0 -1
  272. package/dist/commands/definitions/roles.js.map +0 -1
  273. package/dist/commands/index.d.ts.map +0 -1
  274. package/dist/commands/index.js.map +0 -1
  275. package/dist/commands/plugin.d.ts.map +0 -1
  276. package/dist/commands/plugin.js.map +0 -1
  277. package/dist/commands/raw.d.ts.map +0 -1
  278. package/dist/commands/raw.js.map +0 -1
  279. package/dist/commands/report-batches/index.d.ts.map +0 -1
  280. package/dist/commands/report-batches/index.js.map +0 -1
  281. package/dist/commands/reports/cluster-value.d.ts.map +0 -1
  282. package/dist/commands/reports/cluster-value.js.map +0 -1
  283. package/dist/commands/reports/copy.d.ts.map +0 -1
  284. package/dist/commands/reports/copy.js.map +0 -1
  285. package/dist/commands/reports/create-sorted.d.ts.map +0 -1
  286. package/dist/commands/reports/create-sorted.js.map +0 -1
  287. package/dist/commands/reports/download.d.ts.map +0 -1
  288. package/dist/commands/reports/download.js.map +0 -1
  289. package/dist/commands/reports/get.d.ts.map +0 -1
  290. package/dist/commands/reports/get.js.map +0 -1
  291. package/dist/commands/reports/index.d.ts.map +0 -1
  292. package/dist/commands/reports/index.js.map +0 -1
  293. package/dist/commands/reports/labels.d.ts.map +0 -1
  294. package/dist/commands/reports/labels.js.map +0 -1
  295. package/dist/commands/reports/list.d.ts.map +0 -1
  296. package/dist/commands/reports/list.js.map +0 -1
  297. package/dist/commands/reports/lock.d.ts.map +0 -1
  298. package/dist/commands/reports/lock.js.map +0 -1
  299. package/dist/commands/reports/roles.d.ts.map +0 -1
  300. package/dist/commands/reports/roles.js.map +0 -1
  301. package/dist/commands/systems/index.d.ts.map +0 -1
  302. package/dist/commands/systems/index.js.map +0 -1
  303. package/dist/config/client.d.ts.map +0 -1
  304. package/dist/config/client.js.map +0 -1
  305. package/dist/config/index.d.ts.map +0 -1
  306. package/dist/config/index.js.map +0 -1
  307. package/dist/config/migrate.d.ts.map +0 -1
  308. package/dist/config/migrate.js.map +0 -1
  309. package/dist/config/scoped-store.d.ts.map +0 -1
  310. package/dist/config/scoped-store.js.map +0 -1
  311. package/dist/config/store.d.ts.map +0 -1
  312. package/dist/config/store.js.map +0 -1
  313. package/dist/core/errors.d.ts.map +0 -1
  314. package/dist/core/errors.js.map +0 -1
  315. package/dist/core/index.d.ts.map +0 -1
  316. package/dist/core/index.js.map +0 -1
  317. package/dist/core/logger.d.ts.map +0 -1
  318. package/dist/core/logger.js.map +0 -1
  319. package/dist/i18n/command-labels.d.ts.map +0 -1
  320. package/dist/i18n/command-labels.js.map +0 -1
  321. package/dist/i18n/index.d.ts.map +0 -1
  322. package/dist/i18n/index.js.map +0 -1
  323. package/dist/i18n/locales/en.d.ts.map +0 -1
  324. package/dist/i18n/locales/en.js.map +0 -1
  325. package/dist/i18n/locales/ja.d.ts.map +0 -1
  326. package/dist/i18n/locales/ja.js.map +0 -1
  327. package/dist/i18n/types.d.ts.map +0 -1
  328. package/dist/i18n/types.js.map +0 -1
  329. package/dist/index.d.ts.map +0 -1
  330. package/dist/index.js.map +0 -1
  331. package/dist/ink/App.d.ts.map +0 -1
  332. package/dist/ink/App.js.map +0 -1
  333. package/dist/ink/components/Banner.d.ts.map +0 -1
  334. package/dist/ink/components/Banner.js.map +0 -1
  335. package/dist/ink/components/DetailView.d.ts.map +0 -1
  336. package/dist/ink/components/DetailView.js.map +0 -1
  337. package/dist/ink/components/ErrorView.d.ts.map +0 -1
  338. package/dist/ink/components/ErrorView.js.map +0 -1
  339. package/dist/ink/components/FilterSelect.d.ts.map +0 -1
  340. package/dist/ink/components/FilterSelect.js.map +0 -1
  341. package/dist/ink/components/Layout.d.ts.map +0 -1
  342. package/dist/ink/components/Layout.js.map +0 -1
  343. package/dist/ink/components/OptionForm.d.ts.map +0 -1
  344. package/dist/ink/components/OptionForm.js.map +0 -1
  345. package/dist/ink/components/ResultView.d.ts.map +0 -1
  346. package/dist/ink/components/ResultView.js.map +0 -1
  347. package/dist/ink/components/SpinnerView.d.ts.map +0 -1
  348. package/dist/ink/components/SpinnerView.js.map +0 -1
  349. package/dist/ink/components/TableView.d.ts.map +0 -1
  350. package/dist/ink/components/TableView.js.map +0 -1
  351. package/dist/ink/escape-sequences.d.ts.map +0 -1
  352. package/dist/ink/escape-sequences.js.map +0 -1
  353. package/dist/ink/index.d.ts.map +0 -1
  354. package/dist/ink/index.js.map +0 -1
  355. package/dist/ink/keymap.d.ts.map +0 -1
  356. package/dist/ink/keymap.js.map +0 -1
  357. package/dist/ink/registry/commands.d.ts.map +0 -1
  358. package/dist/ink/registry/commands.js.map +0 -1
  359. package/dist/ink/registry/executors.d.ts.map +0 -1
  360. package/dist/ink/registry/executors.js.map +0 -1
  361. package/dist/ink/screens/AuthLoginScreen.d.ts.map +0 -1
  362. package/dist/ink/screens/AuthLoginScreen.js.map +0 -1
  363. package/dist/ink/screens/CommandScreen.d.ts.map +0 -1
  364. package/dist/ink/screens/CommandScreen.js.map +0 -1
  365. package/dist/ink/screens/HomeScreen.d.ts.map +0 -1
  366. package/dist/ink/screens/HomeScreen.js.map +0 -1
  367. package/dist/ink/screens/PluginsScreen.d.ts.map +0 -1
  368. package/dist/ink/screens/PluginsScreen.js.map +0 -1
  369. package/dist/ink/screens/UpdateCheckScreen.d.ts.map +0 -1
  370. package/dist/ink/screens/UpdateCheckScreen.js.map +0 -1
  371. package/dist/ink/theme.d.ts.map +0 -1
  372. package/dist/ink/theme.js.map +0 -1
  373. package/dist/ink/types.d.ts.map +0 -1
  374. package/dist/ink/types.js.map +0 -1
  375. package/dist/ink/ui-theme.d.ts.map +0 -1
  376. package/dist/ink/ui-theme.js.map +0 -1
  377. package/dist/ink/use-stdin-recovery.d.ts.map +0 -1
  378. package/dist/ink/use-stdin-recovery.js.map +0 -1
  379. package/dist/plugins/dispatch.d.ts.map +0 -1
  380. package/dist/plugins/dispatch.js.map +0 -1
  381. package/dist/plugins/templates.d.ts.map +0 -1
  382. package/dist/plugins/templates.js.map +0 -1
  383. package/dist/plugins/verify.d.ts.map +0 -1
  384. package/dist/plugins/verify.js.map +0 -1
  385. package/dist/sdk/api/auth.d.ts.map +0 -1
  386. package/dist/sdk/api/auth.js.map +0 -1
  387. package/dist/sdk/api/definition-batch.d.ts.map +0 -1
  388. package/dist/sdk/api/definition-batch.js.map +0 -1
  389. package/dist/sdk/api/definition.d.ts.map +0 -1
  390. package/dist/sdk/api/definition.js.map +0 -1
  391. package/dist/sdk/api/report-batch.d.ts.map +0 -1
  392. package/dist/sdk/api/report-batch.js.map +0 -1
  393. package/dist/sdk/api/report.d.ts.map +0 -1
  394. package/dist/sdk/api/report.js.map +0 -1
  395. package/dist/sdk/api/system.d.ts.map +0 -1
  396. package/dist/sdk/api/system.js.map +0 -1
  397. package/dist/sdk/client.d.ts.map +0 -1
  398. package/dist/sdk/client.js.map +0 -1
  399. package/dist/sdk/core/base-api.d.ts.map +0 -1
  400. package/dist/sdk/core/base-api.js.map +0 -1
  401. package/dist/sdk/core/errors.d.ts.map +0 -1
  402. package/dist/sdk/core/errors.js.map +0 -1
  403. package/dist/sdk/core/http-client.d.ts.map +0 -1
  404. package/dist/sdk/core/http-client.js.map +0 -1
  405. package/dist/sdk/core/index.d.ts.map +0 -1
  406. package/dist/sdk/core/index.js.map +0 -1
  407. package/dist/sdk/core/params.d.ts.map +0 -1
  408. package/dist/sdk/core/params.js.map +0 -1
  409. package/dist/sdk/core/xml-parser.d.ts.map +0 -1
  410. package/dist/sdk/core/xml-parser.js.map +0 -1
  411. package/dist/sdk/generated/types.d.ts.map +0 -1
  412. package/dist/sdk/generated/types.js.map +0 -1
  413. package/dist/sdk/index.d.ts.map +0 -1
  414. package/dist/sdk/index.js.map +0 -1
  415. package/dist/sdk/resources/definition-batches.d.ts.map +0 -1
  416. package/dist/sdk/resources/definition-batches.js.map +0 -1
  417. package/dist/sdk/resources/definitions.d.ts.map +0 -1
  418. package/dist/sdk/resources/definitions.js.map +0 -1
  419. package/dist/sdk/resources/index.d.ts.map +0 -1
  420. package/dist/sdk/resources/index.js.map +0 -1
  421. package/dist/sdk/resources/report-batches.d.ts.map +0 -1
  422. package/dist/sdk/resources/report-batches.js.map +0 -1
  423. package/dist/sdk/resources/reports.d.ts.map +0 -1
  424. package/dist/sdk/resources/reports.js.map +0 -1
  425. package/dist/sdk/resources/shared.d.ts.map +0 -1
  426. package/dist/sdk/resources/shared.js.map +0 -1
  427. package/dist/sdk/resources/systems.d.ts.map +0 -1
  428. package/dist/sdk/resources/systems.js.map +0 -1
  429. package/dist/sdk/types/common.d.ts.map +0 -1
  430. package/dist/sdk/types/common.js.map +0 -1
  431. package/dist/sdk/types/definition-batch.d.ts.map +0 -1
  432. package/dist/sdk/types/definition-batch.js.map +0 -1
  433. package/dist/sdk/types/definition.d.ts.map +0 -1
  434. package/dist/sdk/types/definition.js.map +0 -1
  435. package/dist/sdk/types/index.d.ts.map +0 -1
  436. package/dist/sdk/types/index.js.map +0 -1
  437. package/dist/sdk/types/public.d.ts.map +0 -1
  438. package/dist/sdk/types/public.js.map +0 -1
  439. package/dist/sdk/types/report-batch.d.ts.map +0 -1
  440. package/dist/sdk/types/report-batch.js.map +0 -1
  441. package/dist/sdk/types/report.d.ts.map +0 -1
  442. package/dist/sdk/types/report.js.map +0 -1
  443. package/dist/sdk/types/system.d.ts.map +0 -1
  444. package/dist/sdk/types/system.js.map +0 -1
  445. package/dist/ui/banner.d.ts.map +0 -1
  446. package/dist/ui/banner.js.map +0 -1
  447. package/dist/ui/error.d.ts.map +0 -1
  448. package/dist/ui/error.js.map +0 -1
  449. package/dist/ui/formatters/csv.d.ts.map +0 -1
  450. package/dist/ui/formatters/csv.js.map +0 -1
  451. package/dist/ui/formatters/envelope.d.ts.map +0 -1
  452. package/dist/ui/formatters/envelope.js.map +0 -1
  453. package/dist/ui/formatters/index.d.ts.map +0 -1
  454. package/dist/ui/formatters/index.js.map +0 -1
  455. package/dist/ui/formatters/json.d.ts.map +0 -1
  456. package/dist/ui/formatters/json.js.map +0 -1
  457. package/dist/ui/formatters/ndjson.d.ts.map +0 -1
  458. package/dist/ui/formatters/ndjson.js.map +0 -1
  459. package/dist/ui/formatters/quiet.d.ts.map +0 -1
  460. package/dist/ui/formatters/quiet.js.map +0 -1
  461. package/dist/ui/formatters/renderers.d.ts.map +0 -1
  462. package/dist/ui/formatters/renderers.js.map +0 -1
  463. package/dist/ui/formatters/table.d.ts.map +0 -1
  464. package/dist/ui/formatters/table.js.map +0 -1
  465. package/dist/ui/index.d.ts.map +0 -1
  466. package/dist/ui/index.js.map +0 -1
  467. package/dist/ui/progress.d.ts.map +0 -1
  468. package/dist/ui/progress.js.map +0 -1
  469. package/dist/ui/prompt.d.ts.map +0 -1
  470. package/dist/ui/prompt.js.map +0 -1
  471. package/dist/ui/spinner.d.ts.map +0 -1
  472. package/dist/ui/spinner.js.map +0 -1
  473. package/dist/ui/table.d.ts.map +0 -1
  474. package/dist/ui/table.js.map +0 -1
  475. package/dist/ui/theme.d.ts.map +0 -1
  476. package/dist/ui/theme.js.map +0 -1
  477. package/dist/ui/width.d.ts.map +0 -1
  478. package/dist/ui/width.js.map +0 -1
  479. package/dist/utils/constants.d.ts.map +0 -1
  480. package/dist/utils/constants.js.map +0 -1
  481. package/dist/utils/file.d.ts.map +0 -1
  482. package/dist/utils/file.js.map +0 -1
  483. package/dist/utils/index.d.ts.map +0 -1
  484. package/dist/utils/index.js.map +0 -1
  485. package/dist/utils/output.d.ts.map +0 -1
  486. package/dist/utils/output.js.map +0 -1
  487. package/dist/utils/version.d.ts.map +0 -1
  488. package/dist/utils/version.js.map +0 -1
@@ -4,6 +4,7 @@
4
4
  import { readFile } from "node:fs/promises";
5
5
  import { basename } from "node:path";
6
6
  import { handleError } from "../../core/errors.js";
7
+ import { encodingOption, fileTypeXmlCsv } from "../shared-options.js";
7
8
  import { saveBinaryDownload, inferFilename } from "../../utils/file.js";
8
9
  import { formatOutput } from "../../ui/formatters/index.js";
9
10
  import { withSpinner } from "../../ui/spinner.js";
@@ -15,8 +16,8 @@ export function registerDefinitionsLabels(parent, getClient) {
15
16
  labels
16
17
  .command("download")
17
18
  .description("Download definition labels")
18
- .requiredOption("--type <type>", "File type (xml/csv)")
19
- .option("--encoding <encoding>", "Encoding (932=SJIS, 65001=UTF8)")
19
+ .addOption(fileTypeXmlCsv("--type <type>"))
20
+ .addOption(encodingOption())
20
21
  .option("-o, --output <path>", "Output file path")
21
22
  .action(async (options, cmd) => {
22
23
  try {
@@ -38,8 +39,8 @@ export function registerDefinitionsLabels(parent, getClient) {
38
39
  labels
39
40
  .command("upload <file>")
40
41
  .description("Upload definition labels")
41
- .requiredOption("--type <type>", "File type (xml/csv)")
42
- .option("--encoding <encoding>", "Encoding (932=SJIS, 65001=UTF8)")
42
+ .addOption(fileTypeXmlCsv("--type <type>"))
43
+ .addOption(encodingOption())
43
44
  .action(async (file, options, cmd) => {
44
45
  try {
45
46
  const globalOpts = cmd.optsWithGlobals();
@@ -68,8 +69,8 @@ export function registerDefinitionsLabels(parent, getClient) {
68
69
  reportLabels
69
70
  .command("download")
70
71
  .description("Download report label definitions")
71
- .requiredOption("--type <type>", "File type (xml/csv)")
72
- .option("--encoding <encoding>", "Encoding (932=SJIS, 65001=UTF8)")
72
+ .addOption(fileTypeXmlCsv("--type <type>"))
73
+ .addOption(encodingOption())
73
74
  .option("-o, --output <path>", "Output file path")
74
75
  .action(async (options, cmd) => {
75
76
  try {
@@ -91,8 +92,8 @@ export function registerDefinitionsLabels(parent, getClient) {
91
92
  reportLabels
92
93
  .command("upload <file>")
93
94
  .description("Upload report label definitions")
94
- .requiredOption("--type <type>", "File type (xml/csv)")
95
- .option("--encoding <encoding>", "Encoding (932=SJIS, 65001=UTF8)")
95
+ .addOption(fileTypeXmlCsv("--type <type>"))
96
+ .addOption(encodingOption())
96
97
  .action(async (file, options, cmd) => {
97
98
  try {
98
99
  const globalOpts = cmd.optsWithGlobals();
@@ -115,4 +116,3 @@ export function registerDefinitionsLabels(parent, getClient) {
115
116
  }
116
117
  });
117
118
  }
118
- //# sourceMappingURL=labels.js.map
@@ -4,4 +4,3 @@
4
4
  import type { Command } from "commander";
5
5
  import type { IReporterClient } from "../../sdk/index.js";
6
6
  export declare function registerDefinitionsList(parent: Command, getClient: (cmd: Command) => Promise<IReporterClient>): void;
7
- //# sourceMappingURL=list.d.ts.map
@@ -2,15 +2,18 @@ import { PublicStatus } from "../../sdk/index.js";
2
2
  import { formatOutput } from "../../ui/formatters/index.js";
3
3
  import { typeLabels, currentLabels } from "../../ui/formatters/renderers.js";
4
4
  import { handleError } from "../../core/errors.js";
5
+ import { choiceOption, collectSystemKeys, parseChoiceList, parseLabelId, } from "../shared-options.js";
5
6
  export function registerDefinitionsList(parent, getClient) {
6
7
  parent
7
8
  .command("list")
8
9
  .description("List definitions")
9
- .option("-l, --label-id <id>", "Label ID (-9 for all levels)")
10
+ // タイポしたフィルタ値を黙って捨てると「フィルタなしの全件」が
11
+ // 成功の顔で返る — choices()/parser でパース時に弾く (help にも許容値が出る)
12
+ .option("-l, --label-id <id>", "Label ID (-9 for all levels)", parseLabelId)
10
13
  .option("-w, --word <keyword>", "Search keyword")
11
- .option("--public-status <status>", "Public status (test/published)")
12
- .option("-t, --type <types>", "Item types to include (label,sheet,set,book)")
13
- .option("--word-target <targets>", "Search targets (name,remarks)", "name")
14
+ .addOption(choiceOption("--public-status <status>", "Public status", ["test", "published"]))
15
+ .option("-t, --type <types>", "Item types to include (comma-separated: label,sheet,set,book)", parseChoiceList(["label", "sheet", "set", "book"]))
16
+ .option("--word-target <targets>", "Search targets (comma-separated: name,remarks)", parseChoiceList(["name", "remarks"]), "name")
14
17
  .option("--history", "Include history definitions")
15
18
  .option("-k, --system-key <n>=<v>", "System key (1-5)", collectSystemKeys, {})
16
19
  .action(async (options, cmd) => {
@@ -46,12 +49,12 @@ function buildListParams(options) {
46
49
  params.word = options.word;
47
50
  if (options.history)
48
51
  params.history = true;
49
- // Public status mapping
52
+ // Public status (choices() 検証済み)
50
53
  if (options.publicStatus === "test")
51
54
  params.publicStatus = PublicStatus.Test;
52
55
  else if (options.publicStatus === "published")
53
56
  params.publicStatus = PublicStatus.Published;
54
- // Item type targets
57
+ // Item type targets (parseChoiceList 検証済み)
55
58
  if (options.type) {
56
59
  const types = options.type.split(",");
57
60
  params.itemTargetLabel = types.includes("label");
@@ -59,13 +62,13 @@ function buildListParams(options) {
59
62
  params.itemTargetSet = types.includes("set");
60
63
  params.itemTargetBook = types.includes("book");
61
64
  }
62
- // Word targets
65
+ // Word targets (parseChoiceList 検証済み)
63
66
  if (options.wordTarget) {
64
67
  const targets = options.wordTarget.split(",");
65
68
  params.wordTargetName = targets.includes("name");
66
69
  params.wordTargetRemarks = targets.includes("remarks");
67
70
  }
68
- // System keys
71
+ // System keys (collectSystemKeys 検証済み)
69
72
  const systemKeys = options.systemKey;
70
73
  if (systemKeys) {
71
74
  for (const [n, v] of Object.entries(systemKeys)) {
@@ -74,12 +77,3 @@ function buildListParams(options) {
74
77
  }
75
78
  return params;
76
79
  }
77
- // ── Helpers ────────────────────────────────────────────────────
78
- function collectSystemKeys(value, previous) {
79
- const [n, v] = value.split("=", 2);
80
- if (n && v && Number(n) >= 1 && Number(n) <= 5) {
81
- previous[n] = v;
82
- }
83
- return previous;
84
- }
85
- //# sourceMappingURL=list.js.map
@@ -4,4 +4,3 @@
4
4
  import type { Command } from "commander";
5
5
  import type { IReporterClient } from "../../sdk/index.js";
6
6
  export declare function registerDefinitionsLock(parent: Command, getClient: (cmd: Command) => Promise<IReporterClient>): void;
7
- //# sourceMappingURL=lock.d.ts.map
@@ -1,12 +1,14 @@
1
- import { handleError } from "../../core/errors.js";
1
+ import { assertNumericId, handleError } from "../../core/errors.js";
2
2
  import { printSuccess } from "../../ui/index.js";
3
3
  import { withSpinner } from "../../ui/spinner.js";
4
4
  export function registerDefinitionsLock(parent, getClient) {
5
5
  parent
6
- .command("lock <topId>")
6
+ .command("lock")
7
7
  .description("Acquire exclusive lock on a definition")
8
+ .argument("<topId>", "Definition TOPID (numeric)")
8
9
  .action(async (topId, _options, cmd) => {
9
10
  try {
11
+ assertNumericId(topId, "topId");
10
12
  const client = await getClient(cmd);
11
13
  await withSpinner("processing", async () => {
12
14
  await client.definitions.lock({ topId });
@@ -18,10 +20,12 @@ export function registerDefinitionsLock(parent, getClient) {
18
20
  }
19
21
  });
20
22
  parent
21
- .command("unlock <topId>")
23
+ .command("unlock")
22
24
  .description("Release exclusive lock on a definition")
25
+ .argument("<topId>", "Definition TOPID (numeric)")
23
26
  .action(async (topId, _options, cmd) => {
24
27
  try {
28
+ assertNumericId(topId, "topId");
25
29
  const client = await getClient(cmd);
26
30
  await withSpinner("processing", async () => {
27
31
  await client.definitions.unlock({ topId });
@@ -33,4 +37,3 @@ export function registerDefinitionsLock(parent, getClient) {
33
37
  }
34
38
  });
35
39
  }
36
- //# sourceMappingURL=lock.js.map
@@ -1,4 +1,3 @@
1
1
  import type { Command } from "commander";
2
2
  import type { IReporterClient } from "../../sdk/index.js";
3
3
  export declare function registerDefinitionsRoles(parent: Command, getClient: (cmd: Command) => Promise<IReporterClient>): void;
4
- //# sourceMappingURL=roles.d.ts.map
@@ -4,6 +4,7 @@
4
4
  import { readFile } from "node:fs/promises";
5
5
  import { basename } from "node:path";
6
6
  import { handleError } from "../../core/errors.js";
7
+ import { choiceOption, encodingOption, fileTypeXmlCsv } from "../shared-options.js";
7
8
  import { saveBinaryDownload, inferFilename } from "../../utils/file.js";
8
9
  import { formatOutput } from "../../ui/formatters/index.js";
9
10
  import { withSpinner } from "../../ui/spinner.js";
@@ -14,8 +15,8 @@ export function registerDefinitionsRoles(parent, getClient) {
14
15
  roles
15
16
  .command("download")
16
17
  .description("Download definition roles")
17
- .requiredOption("--type <type>", "File type (xml/csv)")
18
- .option("--encoding <encoding>", "Encoding (932=SJIS, 65001=UTF8)")
18
+ .addOption(fileTypeXmlCsv("--type <type>"))
19
+ .addOption(encodingOption())
19
20
  .option("-o, --output <path>", "Output file path")
20
21
  .action(async (options, cmd) => {
21
22
  try {
@@ -37,10 +38,10 @@ export function registerDefinitionsRoles(parent, getClient) {
37
38
  roles
38
39
  .command("upload <file>")
39
40
  .description("Upload definition roles")
40
- .requiredOption("--type <type>", "File type (xml/csv)")
41
- .option("--encoding <encoding>", "Encoding (932=SJIS, 65001=UTF8)")
42
- .option("--def-role-mode <mode>", "Apply to revision definitions (0/1)")
43
- .option("--rep-role-mode <mode>", "Apply to input reports (0/1)")
41
+ .addOption(fileTypeXmlCsv("--type <type>"))
42
+ .addOption(encodingOption())
43
+ .addOption(choiceOption("--def-role-mode <mode>", "Apply to revision definitions", ["0", "1"]))
44
+ .addOption(choiceOption("--rep-role-mode <mode>", "Apply to input reports", ["0", "1"]))
44
45
  .action(async (file, options, cmd) => {
45
46
  try {
46
47
  const globalOpts = cmd.optsWithGlobals();
@@ -65,4 +66,3 @@ export function registerDefinitionsRoles(parent, getClient) {
65
66
  }
66
67
  });
67
68
  }
68
- //# sourceMappingURL=roles.js.map
@@ -8,4 +8,3 @@ export { reportsCommand } from "./reports/index.js";
8
8
  export { reportBatchesCommand } from "./report-batches/index.js";
9
9
  export { definitionBatchesCommand } from "./definition-batches/index.js";
10
10
  export { systemsCommand } from "./systems/index.js";
11
- //# sourceMappingURL=index.d.ts.map
@@ -8,4 +8,3 @@ export { reportsCommand } from "./reports/index.js";
8
8
  export { reportBatchesCommand } from "./report-batches/index.js";
9
9
  export { definitionBatchesCommand } from "./definition-batches/index.js";
10
10
  export { systemsCommand } from "./systems/index.js";
11
- //# sourceMappingURL=index.js.map
@@ -8,4 +8,3 @@
8
8
  */
9
9
  import { Command } from "commander";
10
10
  export declare const pluginCommand: Command;
11
- //# sourceMappingURL=plugin.d.ts.map
@@ -7,13 +7,15 @@
7
7
  * (verify).
8
8
  */
9
9
  import { Command } from "commander";
10
- import { chmodSync, existsSync, mkdirSync, writeFileSync } from "node:fs";
10
+ import { chmodSync, existsSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
11
+ import { tmpdir } from "node:os";
11
12
  import { join } from "node:path";
12
13
  import { findPlugin, listPlugins, pluginHomeDir, isValidPluginName, PLUGIN_PREFIX, } from "../plugins/dispatch.js";
13
14
  import { shTemplate, nodeTemplate } from "../plugins/templates.js";
14
- import { verifyPlugin } from "../plugins/verify.js";
15
- import { formatOutput } from "../ui/index.js";
16
- import { handleError } from "../core/errors.js";
15
+ import { verifyPlugin, runPlugin, parseLines } from "../plugins/verify.js";
16
+ import { validateDescribe, buildDescribeRow } from "../plugins/describe.js";
17
+ import { formatOutput, out } from "../ui/index.js";
18
+ import { handleError, ValidationError } from "../core/errors.js";
17
19
  export const pluginCommand = new Command("plugin").description("Manage i-repo plugins (PATH-based i-repo-* executables)");
18
20
  pluginCommand
19
21
  .command("list")
@@ -39,13 +41,74 @@ pluginCommand
39
41
  .action((name) => {
40
42
  const p = findPlugin(name);
41
43
  if (p) {
42
- console.log(p);
44
+ out(p);
43
45
  }
44
46
  else {
45
47
  console.error(`Plugin "i-repo-${name}" not found on PATH.`);
46
48
  process.exitCode = 1;
47
49
  }
48
50
  });
51
+ pluginCommand
52
+ .command("describe")
53
+ .description("Show a plugin's self-description (--plugin-schema): contract versions, recordTypes, params")
54
+ .argument("<name>", "Plugin name (without the i-repo- prefix)")
55
+ .action((name, _options, cmd) => {
56
+ const globalOpts = cmd.optsWithGlobals();
57
+ try {
58
+ const bin = findPlugin(name);
59
+ if (!bin) {
60
+ handleError(new ValidationError(`Plugin "i-repo-${name}" not found on PATH.`), { format: globalOpts.format });
61
+ return;
62
+ }
63
+ // verify と同じ信頼境界で1回だけ問い合わせる (allow-list env / 一時cwd /
64
+ // timeout)。メタデータ照会に pluginPassEnv の秘密は不要 (passEnv:false)
65
+ const cwd = mkdtempSync(join(tmpdir(), "irepo-describe-"));
66
+ let probe;
67
+ try {
68
+ probe = runPlugin(bin, ["--plugin-schema"], { cwd, passEnv: false });
69
+ }
70
+ finally {
71
+ rmSync(cwd, { recursive: true, force: true });
72
+ }
73
+ if (probe.failed || probe.status !== 0) {
74
+ handleError(new ValidationError(`Plugin "i-repo-${name}" does not answer --plugin-schema (exit ${probe.status}). ` +
75
+ `Self-description is optional — see docs/PLUGINS.md §3.`), { format: globalOpts.format });
76
+ return;
77
+ }
78
+ const { rows, invalid } = parseLines(probe.stdout);
79
+ const declared = rows[0];
80
+ if (invalid.length > 0 || rows.length !== 1 || !Array.isArray(declared?.pluginApi)) {
81
+ handleError(new ValidationError(`Plugin "i-repo-${name}" answered --plugin-schema but not with a single JSON line containing pluginApi[].`), { format: globalOpts.format });
82
+ return;
83
+ }
84
+ // 壊れた宣言を黙って表示しない — これを信じるフォーム生成側を守る
85
+ const problems = validateDescribe(declared);
86
+ if (problems.length > 0) {
87
+ handleError(new ValidationError(`Plugin "i-repo-${name}" has a malformed self-description: ${problems[0]}`), { format: globalOpts.format });
88
+ return;
89
+ }
90
+ const format = (globalOpts.format ?? "table");
91
+ const row = buildDescribeRow(PLUGIN_PREFIX + name, bin, declared);
92
+ // 人間面 (table/csv) では params を読める1行に整形 (ndjson/json は宣言そのまま —
93
+ // render と同じ「ラベル化は人間面のみ」の流儀)
94
+ if ((format === "table" || format === "csv") && Array.isArray(row.params)) {
95
+ row.params = row.params
96
+ .map((p) => {
97
+ const choices = Array.isArray(p.choices) ? `:${p.choices.join("|")}` : "";
98
+ return `${String(p.name)} <${String(p.type)}${choices}>${p.required ? " (required)" : ""}`;
99
+ })
100
+ .join(", ");
101
+ }
102
+ formatOutput(row, {
103
+ format,
104
+ quiet: globalOpts.quiet,
105
+ quietField: "plugin",
106
+ });
107
+ }
108
+ catch (error) {
109
+ handleError(error, { format: globalOpts.format });
110
+ }
111
+ });
49
112
  pluginCommand
50
113
  .command("init")
51
114
  .description("Scaffold a contract-conformant plugin in ~/.i-repo/plugins")
@@ -93,7 +156,7 @@ pluginCommand
93
156
  }
94
157
  for (const f of created)
95
158
  console.error(`✅ created ${f}`);
96
- console.error(` Try it: i-repo ${name} --plugin-schema`);
159
+ console.error(` Try it: i-repo plugin describe ${name}`);
97
160
  console.error(` Test it: cat examples/fixtures/reports-list.ndjson | ${target}`);
98
161
  console.error(` Check it: i-repo plugin verify ${name}`);
99
162
  });
@@ -130,4 +193,3 @@ pluginCommand
130
193
  handleError(error, { format: globalOpts.format });
131
194
  }
132
195
  });
133
- //# sourceMappingURL=plugin.js.map
@@ -6,4 +6,3 @@
6
6
  */
7
7
  import { Command } from "commander";
8
8
  export declare const rawCommand: Command;
9
- //# sourceMappingURL=raw.d.ts.map
@@ -8,8 +8,8 @@ import { Command } from "commander";
8
8
  import { readFile, writeFile } from "node:fs/promises";
9
9
  import { basename } from "node:path";
10
10
  import { createClient } from "../config/client.js";
11
- import { handleError } from "../core/errors.js";
12
- import { withSpinner } from "../ui/index.js";
11
+ import { handleError, ValidationError } from "../core/errors.js";
12
+ import { withSpinner, out } from "../ui/index.js";
13
13
  export const rawCommand = new Command("raw")
14
14
  .description("Execute raw API command (returns XML)")
15
15
  .argument("<params...>", "API parameters as key=value pairs (e.g. command=GetReportList labelId=-9)")
@@ -24,7 +24,8 @@ export const rawCommand = new Command("raw")
24
24
  for (const param of params) {
25
25
  const eqIdx = param.indexOf("=");
26
26
  if (eqIdx < 1) {
27
- throw new Error(`Invalid parameter "${param}". Use key=value format (e.g. command=GetReportList)`);
27
+ // 引数形式の誤りは検証エラー (exit 11) 素の Error だと exit 1 になる
28
+ throw new ValidationError(`Invalid parameter "${param}". Use key=value format (e.g. command=GetReportList)`);
28
29
  }
29
30
  parsedParams[param.substring(0, eqIdx)] = param.substring(eqIdx + 1);
30
31
  }
@@ -54,11 +55,10 @@ export const rawCommand = new Command("raw")
54
55
  }
55
56
  }
56
57
  else {
57
- console.log(xml);
58
+ out(xml);
58
59
  }
59
60
  }
60
61
  catch (error) {
61
62
  handleError(error, { format: globalOpts.format });
62
63
  }
63
64
  });
64
- //# sourceMappingURL=raw.js.map
@@ -6,4 +6,3 @@
6
6
  */
7
7
  import { Command } from "commander";
8
8
  export declare const reportBatchesCommand: Command;
9
- //# sourceMappingURL=index.d.ts.map