@apimatic/cli 1.5.0 → 2.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (610) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +128 -212
  3. package/apimatic.schema.json +550 -0
  4. package/lib/actions/action-result.js +3 -0
  5. package/lib/actions/action-result.js.map +1 -1
  6. package/lib/actions/api/transform.js +36 -33
  7. package/lib/actions/api/transform.js.map +1 -1
  8. package/lib/actions/api/validate.d.ts +9 -6
  9. package/lib/actions/api/validate.js +44 -38
  10. package/lib/actions/api/validate.js.map +1 -1
  11. package/lib/actions/auth/login.js +7 -4
  12. package/lib/actions/auth/login.js.map +1 -1
  13. package/lib/actions/auth/logout.js +2 -1
  14. package/lib/actions/auth/logout.js.map +1 -1
  15. package/lib/actions/auth/status.js +5 -3
  16. package/lib/actions/auth/status.js.map +1 -1
  17. package/lib/actions/plugin/generate.d.ts +5 -1
  18. package/lib/actions/plugin/generate.js +83 -56
  19. package/lib/actions/plugin/generate.js.map +1 -1
  20. package/lib/actions/plugin/publish.d.ts +2 -1
  21. package/lib/actions/plugin/publish.js +34 -37
  22. package/lib/actions/plugin/publish.js.map +1 -1
  23. package/lib/actions/plugin/record-metadata.d.ts +3 -2
  24. package/lib/actions/plugin/record-metadata.js +33 -30
  25. package/lib/actions/plugin/record-metadata.js.map +1 -1
  26. package/lib/actions/portal/generate.d.ts +8 -6
  27. package/lib/actions/portal/generate.js +50 -61
  28. package/lib/actions/portal/generate.js.map +1 -1
  29. package/lib/actions/portal/prepare-project.d.ts +25 -0
  30. package/lib/actions/portal/prepare-project.js +68 -0
  31. package/lib/actions/portal/prepare-project.js.map +1 -0
  32. package/lib/actions/portal/serve.d.ts +21 -6
  33. package/lib/actions/portal/serve.js +170 -153
  34. package/lib/actions/portal/serve.js.map +1 -1
  35. package/lib/actions/publishing/profile/list.js +4 -2
  36. package/lib/actions/publishing/profile/list.js.map +1 -1
  37. package/lib/actions/quickstart.d.ts +23 -5
  38. package/lib/actions/quickstart.js +222 -21
  39. package/lib/actions/quickstart.js.map +1 -1
  40. package/lib/actions/sdk/generate.d.ts +4 -7
  41. package/lib/actions/sdk/generate.js +53 -93
  42. package/lib/actions/sdk/generate.js.map +1 -1
  43. package/lib/actions/sdk/publish/interactive.d.ts +4 -3
  44. package/lib/actions/sdk/publish/interactive.js +96 -97
  45. package/lib/actions/sdk/publish/interactive.js.map +1 -1
  46. package/lib/actions/sdk/publish/non-interactive.d.ts +4 -2
  47. package/lib/actions/sdk/publish/non-interactive.js +91 -90
  48. package/lib/actions/sdk/publish/non-interactive.js.map +1 -1
  49. package/lib/actions/sdk/publish.d.ts +3 -2
  50. package/lib/actions/sdk/publish.js +55 -53
  51. package/lib/actions/sdk/publish.js.map +1 -1
  52. package/lib/actions/sdk/record-published-sdk.d.ts +14 -0
  53. package/lib/actions/sdk/record-published-sdk.js +57 -0
  54. package/lib/actions/sdk/record-published-sdk.js.map +1 -0
  55. package/lib/client-utils/auth-manager.js +1 -1
  56. package/lib/client-utils/auth-manager.js.map +1 -1
  57. package/lib/commands/api/transform.d.ts +1 -1
  58. package/lib/commands/api/transform.js +44 -40
  59. package/lib/commands/api/transform.js.map +1 -1
  60. package/lib/commands/api/validate.js +16 -16
  61. package/lib/commands/api/validate.js.map +1 -1
  62. package/lib/commands/auth/login.js +14 -15
  63. package/lib/commands/auth/login.js.map +1 -1
  64. package/lib/commands/auth/logout.js +5 -6
  65. package/lib/commands/auth/logout.js.map +1 -1
  66. package/lib/commands/auth/status.js +4 -5
  67. package/lib/commands/auth/status.js.map +1 -1
  68. package/lib/commands/plugin/generate.d.ts +3 -3
  69. package/lib/commands/plugin/generate.js +20 -20
  70. package/lib/commands/plugin/generate.js.map +1 -1
  71. package/lib/commands/plugin/publish.js +18 -18
  72. package/lib/commands/plugin/publish.js.map +1 -1
  73. package/lib/commands/portal/generate.d.ts +9 -8
  74. package/lib/commands/portal/generate.js +36 -27
  75. package/lib/commands/portal/generate.js.map +1 -1
  76. package/lib/commands/portal/serve.d.ts +7 -9
  77. package/lib/commands/portal/serve.js +41 -44
  78. package/lib/commands/portal/serve.js.map +1 -1
  79. package/lib/commands/publishing/profile/list.js +8 -12
  80. package/lib/commands/publishing/profile/list.js.map +1 -1
  81. package/lib/commands/quickstart.d.ts +5 -5
  82. package/lib/commands/quickstart.js +18 -24
  83. package/lib/commands/quickstart.js.map +1 -1
  84. package/lib/commands/sdk/generate.d.ts +5 -7
  85. package/lib/commands/sdk/generate.js +58 -70
  86. package/lib/commands/sdk/generate.js.map +1 -1
  87. package/lib/commands/sdk/publish.d.ts +6 -7
  88. package/lib/commands/sdk/publish.js +66 -60
  89. package/lib/commands/sdk/publish.js.map +1 -1
  90. package/lib/hooks/node-version.d.ts +3 -0
  91. package/lib/hooks/node-version.js +12 -0
  92. package/lib/hooks/node-version.js.map +1 -0
  93. package/lib/hooks/not-found.js +2 -3
  94. package/lib/hooks/not-found.js.map +1 -1
  95. package/lib/hooks/utils.d.ts +4 -2
  96. package/lib/hooks/utils.js +2 -2
  97. package/lib/hooks/utils.js.map +1 -1
  98. package/lib/infrastructure/env-info.d.ts +3 -0
  99. package/lib/infrastructure/env-info.js +13 -6
  100. package/lib/infrastructure/env-info.js.map +1 -1
  101. package/lib/infrastructure/file-service.d.ts +35 -8
  102. package/lib/infrastructure/file-service.js +149 -53
  103. package/lib/infrastructure/file-service.js.map +1 -1
  104. package/lib/infrastructure/file-watch-service.d.ts +40 -0
  105. package/lib/infrastructure/file-watch-service.js +167 -0
  106. package/lib/infrastructure/file-watch-service.js.map +1 -0
  107. package/lib/infrastructure/generation-status-poller.d.ts +8 -7
  108. package/lib/infrastructure/generation-status-poller.js +20 -12
  109. package/lib/infrastructure/generation-status-poller.js.map +1 -1
  110. package/lib/infrastructure/launcher-service.js +6 -6
  111. package/lib/infrastructure/launcher-service.js.map +1 -1
  112. package/lib/infrastructure/network-service.d.ts +3 -0
  113. package/lib/infrastructure/network-service.js +15 -1
  114. package/lib/infrastructure/network-service.js.map +1 -1
  115. package/lib/infrastructure/portal-build-service.d.ts +19 -0
  116. package/lib/infrastructure/portal-build-service.js +58 -0
  117. package/lib/infrastructure/portal-build-service.js.map +1 -0
  118. package/lib/infrastructure/portal-dev-server-service.d.ts +29 -0
  119. package/lib/infrastructure/portal-dev-server-service.js +135 -0
  120. package/lib/infrastructure/portal-dev-server-service.js.map +1 -0
  121. package/lib/infrastructure/portal-pages-service.d.ts +17 -0
  122. package/lib/infrastructure/portal-pages-service.js +103 -0
  123. package/lib/infrastructure/portal-pages-service.js.map +1 -0
  124. package/lib/infrastructure/portal-project-service.d.ts +77 -0
  125. package/lib/infrastructure/portal-project-service.js +309 -0
  126. package/lib/infrastructure/portal-project-service.js.map +1 -0
  127. package/lib/infrastructure/service-error.d.ts +1 -0
  128. package/lib/infrastructure/service-error.js +39 -41
  129. package/lib/infrastructure/service-error.js.map +1 -1
  130. package/lib/infrastructure/services/api-client-factory.js +15 -13
  131. package/lib/infrastructure/services/api-client-factory.js.map +1 -1
  132. package/lib/infrastructure/services/api-service.d.ts +7 -5
  133. package/lib/infrastructure/services/api-service.js +28 -20
  134. package/lib/infrastructure/services/api-service.js.map +1 -1
  135. package/lib/infrastructure/services/auth-service.js +4 -9
  136. package/lib/infrastructure/services/auth-service.js.map +1 -1
  137. package/lib/infrastructure/services/file-download-service.js +3 -3
  138. package/lib/infrastructure/services/file-download-service.js.map +1 -1
  139. package/lib/infrastructure/services/plugin-service.d.ts +1 -8
  140. package/lib/infrastructure/services/plugin-service.js +11 -22
  141. package/lib/infrastructure/services/plugin-service.js.map +1 -1
  142. package/lib/infrastructure/services/portal-artifacts-service.d.ts +44 -0
  143. package/lib/infrastructure/services/portal-artifacts-service.js +268 -0
  144. package/lib/infrastructure/services/portal-artifacts-service.js.map +1 -0
  145. package/lib/infrastructure/services/portal-authorization-service.d.ts +22 -0
  146. package/lib/infrastructure/services/portal-authorization-service.js +23 -0
  147. package/lib/infrastructure/services/portal-authorization-service.js.map +1 -0
  148. package/lib/infrastructure/services/publishing-api-service.d.ts +1 -1
  149. package/lib/infrastructure/services/publishing-api-service.js +11 -15
  150. package/lib/infrastructure/services/publishing-api-service.js.map +1 -1
  151. package/lib/infrastructure/services/sdk-generation-service.d.ts +21 -0
  152. package/lib/infrastructure/services/sdk-generation-service.js +118 -0
  153. package/lib/infrastructure/services/sdk-generation-service.js.map +1 -0
  154. package/lib/infrastructure/services/telemetry-service.js +5 -4
  155. package/lib/infrastructure/services/telemetry-service.js.map +1 -1
  156. package/lib/infrastructure/services/transformation-service.js +29 -32
  157. package/lib/infrastructure/services/transformation-service.js.map +1 -1
  158. package/lib/infrastructure/services/validation-service.d.ts +12 -53
  159. package/lib/infrastructure/services/validation-service.js +24 -199
  160. package/lib/infrastructure/services/validation-service.js.map +1 -1
  161. package/lib/infrastructure/timer-extensions.d.ts +2 -0
  162. package/lib/infrastructure/timer-extensions.js +10 -0
  163. package/lib/infrastructure/timer-extensions.js.map +1 -0
  164. package/lib/infrastructure/tmp-extensions.d.ts +31 -1
  165. package/lib/infrastructure/tmp-extensions.js +86 -3
  166. package/lib/infrastructure/tmp-extensions.js.map +1 -1
  167. package/lib/infrastructure/zip-service.js +2 -2
  168. package/lib/infrastructure/zip-service.js.map +1 -1
  169. package/lib/prompts/api/validate.d.ts +6 -7
  170. package/lib/prompts/api/validate.js +12 -12
  171. package/lib/prompts/api/validate.js.map +1 -1
  172. package/lib/prompts/format.d.ts +4 -0
  173. package/lib/prompts/format.js +5 -0
  174. package/lib/prompts/format.js.map +1 -1
  175. package/lib/prompts/plugin/generate.d.ts +17 -12
  176. package/lib/prompts/plugin/generate.js +94 -44
  177. package/lib/prompts/plugin/generate.js.map +1 -1
  178. package/lib/prompts/plugin/publish.d.ts +2 -1
  179. package/lib/prompts/plugin/publish.js +8 -7
  180. package/lib/prompts/plugin/publish.js.map +1 -1
  181. package/lib/prompts/plugin/record-metadata.d.ts +1 -0
  182. package/lib/prompts/plugin/record-metadata.js +10 -7
  183. package/lib/prompts/plugin/record-metadata.js.map +1 -1
  184. package/lib/prompts/portal/artifacts.d.ts +8 -0
  185. package/lib/prompts/portal/artifacts.js +26 -0
  186. package/lib/prompts/portal/artifacts.js.map +1 -0
  187. package/lib/prompts/portal/authorization.d.ts +6 -0
  188. package/lib/prompts/portal/authorization.js +29 -0
  189. package/lib/prompts/portal/authorization.js.map +1 -0
  190. package/lib/prompts/portal/code-samples.d.ts +1 -0
  191. package/lib/prompts/portal/code-samples.js +9 -0
  192. package/lib/prompts/portal/code-samples.js.map +1 -0
  193. package/lib/prompts/portal/generate.d.ts +14 -9
  194. package/lib/prompts/portal/generate.js +48 -26
  195. package/lib/prompts/portal/generate.js.map +1 -1
  196. package/lib/prompts/portal/prepare-project.d.ts +20 -0
  197. package/lib/prompts/portal/prepare-project.js +36 -0
  198. package/lib/prompts/portal/prepare-project.js.map +1 -0
  199. package/lib/prompts/portal/serve.d.ts +32 -12
  200. package/lib/prompts/portal/serve.js +102 -39
  201. package/lib/prompts/portal/serve.js.map +1 -1
  202. package/lib/prompts/portal/source.d.ts +26 -0
  203. package/lib/prompts/portal/source.js +253 -0
  204. package/lib/prompts/portal/source.js.map +1 -0
  205. package/lib/prompts/prompt.d.ts +11 -3
  206. package/lib/prompts/prompt.js +39 -15
  207. package/lib/prompts/prompt.js.map +1 -1
  208. package/lib/prompts/quickstart.d.ts +46 -3
  209. package/lib/prompts/quickstart.js +199 -12
  210. package/lib/prompts/quickstart.js.map +1 -1
  211. package/lib/prompts/sdk/generate.d.ts +15 -13
  212. package/lib/prompts/sdk/generate.js +29 -32
  213. package/lib/prompts/sdk/generate.js.map +1 -1
  214. package/lib/prompts/sdk/publish/interactive.d.ts +10 -6
  215. package/lib/prompts/sdk/publish/interactive.js +26 -24
  216. package/lib/prompts/sdk/publish/interactive.js.map +1 -1
  217. package/lib/prompts/sdk/publish/non-interactive.d.ts +2 -1
  218. package/lib/prompts/sdk/publish/non-interactive.js +5 -4
  219. package/lib/prompts/sdk/publish/non-interactive.js.map +1 -1
  220. package/lib/prompts/sdk/publish.d.ts +3 -3
  221. package/lib/prompts/sdk/publish.js +13 -17
  222. package/lib/prompts/sdk/publish.js.map +1 -1
  223. package/lib/prompts/sdk/record-published-sdk.d.ts +7 -0
  224. package/lib/prompts/sdk/record-published-sdk.js +26 -0
  225. package/lib/prompts/sdk/record-published-sdk.js.map +1 -0
  226. package/lib/types/apimatic-config/document.d.ts +70 -0
  227. package/lib/types/apimatic-config/document.js +167 -0
  228. package/lib/types/apimatic-config/document.js.map +1 -0
  229. package/lib/types/apimatic-config/languages-block.d.ts +39 -0
  230. package/lib/types/apimatic-config/languages-block.js +58 -0
  231. package/lib/types/apimatic-config/languages-block.js.map +1 -0
  232. package/lib/types/apimatic-config-context.d.ts +48 -0
  233. package/lib/types/apimatic-config-context.js +121 -0
  234. package/lib/types/apimatic-config-context.js.map +1 -0
  235. package/lib/types/build/build.d.ts +1 -89
  236. package/lib/types/build/build.js +6 -161
  237. package/lib/types/build/build.js.map +1 -1
  238. package/lib/types/events/domain-event.js +3 -0
  239. package/lib/types/events/domain-event.js.map +1 -1
  240. package/lib/types/events/quickstart-completed.js +3 -3
  241. package/lib/types/events/quickstart-completed.js.map +1 -1
  242. package/lib/types/events/quickstart-initiated.js +3 -3
  243. package/lib/types/events/quickstart-initiated.js.map +1 -1
  244. package/lib/types/events/sdk-publish-validation-failed.js +1 -1
  245. package/lib/types/events/sdk-publish-validation-failed.js.map +1 -1
  246. package/lib/types/file/directory.d.ts +4 -9
  247. package/lib/types/file/directory.js +17 -65
  248. package/lib/types/file/directory.js.map +1 -1
  249. package/lib/types/file/directoryPath.d.ts +17 -0
  250. package/lib/types/file/directoryPath.js +47 -2
  251. package/lib/types/file/directoryPath.js.map +1 -1
  252. package/lib/types/file/fileName.d.ts +8 -0
  253. package/lib/types/file/fileName.js +28 -6
  254. package/lib/types/file/fileName.js.map +1 -1
  255. package/lib/types/file/filePath.d.ts +18 -2
  256. package/lib/types/file/filePath.js +39 -4
  257. package/lib/types/file/filePath.js.map +1 -1
  258. package/lib/types/file/resource-input.js +1 -2
  259. package/lib/types/file/resource-input.js.map +1 -1
  260. package/lib/types/file/urlPath.js +2 -1
  261. package/lib/types/file/urlPath.js.map +1 -1
  262. package/lib/types/flags-provider.js +22 -22
  263. package/lib/types/flags-provider.js.map +1 -1
  264. package/lib/types/package-settings-context.js +2 -1
  265. package/lib/types/package-settings-context.js.map +1 -1
  266. package/lib/types/plugin/plugin-config.d.ts +10 -50
  267. package/lib/types/plugin/plugin-config.js +7 -1
  268. package/lib/types/plugin/plugin-config.js.map +1 -1
  269. package/lib/types/plugin-config-context.d.ts +30 -37
  270. package/lib/types/plugin-config-context.js +108 -139
  271. package/lib/types/plugin-config-context.js.map +1 -1
  272. package/lib/types/plugin-context.js +3 -2
  273. package/lib/types/plugin-context.js.map +1 -1
  274. package/lib/types/portal/code-samples.d.ts +27 -0
  275. package/lib/types/portal/code-samples.js +67 -0
  276. package/lib/types/portal/code-samples.js.map +1 -0
  277. package/lib/types/portal/config/ai-config.d.ts +15 -0
  278. package/lib/types/portal/config/ai-config.js +26 -0
  279. package/lib/types/portal/config/ai-config.js.map +1 -0
  280. package/lib/types/portal/config/brand-config.d.ts +55 -0
  281. package/lib/types/portal/config/brand-config.js +105 -0
  282. package/lib/types/portal/config/brand-config.js.map +1 -0
  283. package/lib/types/portal/config/color.d.ts +19 -0
  284. package/lib/types/portal/config/color.js +43 -0
  285. package/lib/types/portal/config/color.js.map +1 -0
  286. package/lib/types/portal/config/fields.d.ts +23 -0
  287. package/lib/types/portal/config/fields.js +67 -0
  288. package/lib/types/portal/config/fields.js.map +1 -0
  289. package/lib/types/portal/config/link.d.ts +18 -0
  290. package/lib/types/portal/config/link.js +72 -0
  291. package/lib/types/portal/config/link.js.map +1 -0
  292. package/lib/types/portal/config/navigation-config.d.ts +13 -0
  293. package/lib/types/portal/config/navigation-config.js +30 -0
  294. package/lib/types/portal/config/navigation-config.js.map +1 -0
  295. package/lib/types/portal/config/site-config.d.ts +32 -0
  296. package/lib/types/portal/config/site-config.js +88 -0
  297. package/lib/types/portal/config/site-config.js.map +1 -0
  298. package/lib/types/portal/config/static-asset.d.ts +25 -0
  299. package/lib/types/portal/config/static-asset.js +77 -0
  300. package/lib/types/portal/config/static-asset.js.map +1 -0
  301. package/lib/types/portal/content-notices.d.ts +20 -0
  302. package/lib/types/portal/content-notices.js +2 -0
  303. package/lib/types/portal/content-notices.js.map +1 -0
  304. package/lib/types/portal/content-tree.d.ts +103 -0
  305. package/lib/types/portal/content-tree.js +344 -0
  306. package/lib/types/portal/content-tree.js.map +1 -0
  307. package/lib/types/portal/endpoint.d.ts +6 -0
  308. package/lib/types/portal/endpoint.js +12 -0
  309. package/lib/types/portal/endpoint.js.map +1 -0
  310. package/lib/types/portal/generated-pages.d.ts +68 -0
  311. package/lib/types/portal/generated-pages.js +111 -0
  312. package/lib/types/portal/generated-pages.js.map +1 -0
  313. package/lib/types/portal/generation-status.d.ts +31 -0
  314. package/lib/types/portal/generation-status.js +26 -0
  315. package/lib/types/portal/generation-status.js.map +1 -0
  316. package/lib/types/portal/openapi-document.d.ts +48 -0
  317. package/lib/types/portal/openapi-document.js +138 -0
  318. package/lib/types/portal/openapi-document.js.map +1 -0
  319. package/lib/types/portal/page-fragments.d.ts +13 -0
  320. package/lib/types/portal/page-fragments.js +24 -0
  321. package/lib/types/portal/page-fragments.js.map +1 -0
  322. package/lib/types/portal/page-template.d.ts +15 -0
  323. package/lib/types/portal/page-template.js +64 -0
  324. package/lib/types/portal/page-template.js.map +1 -0
  325. package/lib/types/portal/page.d.ts +24 -0
  326. package/lib/types/portal/page.js +100 -0
  327. package/lib/types/portal/page.js.map +1 -0
  328. package/lib/types/portal/portal-artifacts.d.ts +25 -0
  329. package/lib/types/portal/portal-artifacts.js +30 -0
  330. package/lib/types/portal/portal-artifacts.js.map +1 -0
  331. package/lib/types/portal/portal-config.d.ts +69 -0
  332. package/lib/types/portal/portal-config.js +105 -0
  333. package/lib/types/portal/portal-config.js.map +1 -0
  334. package/lib/types/portal/portal-downloads.d.ts +8 -0
  335. package/lib/types/portal/portal-downloads.js +14 -0
  336. package/lib/types/portal/portal-downloads.js.map +1 -0
  337. package/lib/types/portal/portal-languages.d.ts +15 -0
  338. package/lib/types/portal/portal-languages.js +45 -0
  339. package/lib/types/portal/portal-languages.js.map +1 -0
  340. package/lib/types/portal/portal-navigation.d.ts +65 -0
  341. package/lib/types/portal/portal-navigation.js +217 -0
  342. package/lib/types/portal/portal-navigation.js.map +1 -0
  343. package/lib/types/portal/portal-sdk.d.ts +15 -0
  344. package/lib/types/portal/portal-sdk.js +28 -0
  345. package/lib/types/portal/portal-sdk.js.map +1 -0
  346. package/lib/types/portal/portal-source.d.ts +129 -0
  347. package/lib/types/portal/portal-source.js +2 -0
  348. package/lib/types/portal/portal-source.js.map +1 -0
  349. package/lib/types/portal/portal-stylesheet.d.ts +19 -0
  350. package/lib/types/portal/portal-stylesheet.js +40 -0
  351. package/lib/types/portal/portal-stylesheet.js.map +1 -0
  352. package/lib/types/portal/portal-tabs.d.ts +33 -0
  353. package/lib/types/portal/portal-tabs.js +38 -0
  354. package/lib/types/portal/portal-tabs.js.map +1 -0
  355. package/lib/types/portal/preview-config.d.ts +20 -0
  356. package/lib/types/portal/preview-config.js +32 -0
  357. package/lib/types/portal/preview-config.js.map +1 -0
  358. package/lib/types/portal/preview-content.d.ts +18 -0
  359. package/lib/types/portal/preview-content.js +50 -0
  360. package/lib/types/portal/preview-content.js.map +1 -0
  361. package/lib/types/portal/published-package.d.ts +12 -0
  362. package/lib/types/portal/published-package.js +35 -0
  363. package/lib/types/portal/published-package.js.map +1 -0
  364. package/lib/types/portal/unknown-fields.d.ts +5 -0
  365. package/lib/types/portal/unknown-fields.js +10 -0
  366. package/lib/types/portal/unknown-fields.js.map +1 -0
  367. package/lib/types/portal-context.d.ts +38 -6
  368. package/lib/types/portal-context.js +71 -24
  369. package/lib/types/portal-context.js.map +1 -1
  370. package/lib/types/portal-source-context.d.ts +77 -0
  371. package/lib/types/portal-source-context.js +408 -0
  372. package/lib/types/portal-source-context.js.map +1 -0
  373. package/lib/types/project-context.d.ts +49 -0
  374. package/lib/types/project-context.js +151 -0
  375. package/lib/types/project-context.js.map +1 -0
  376. package/lib/types/project-layout.d.ts +9 -0
  377. package/lib/types/project-layout.js +10 -0
  378. package/lib/types/project-layout.js.map +1 -0
  379. package/lib/types/publish/package-settings-configuration.d.ts +2 -0
  380. package/lib/types/publish/profile-id.js +1 -0
  381. package/lib/types/publish/profile-id.js.map +1 -1
  382. package/lib/types/publish/publishing-profile.d.ts +3 -1
  383. package/lib/types/publish/publishing-profile.js +33 -15
  384. package/lib/types/publish/publishing-profile.js.map +1 -1
  385. package/lib/types/publish/publishing-profiles.js +2 -1
  386. package/lib/types/publish/publishing-profiles.js.map +1 -1
  387. package/lib/types/publish/version.js +1 -0
  388. package/lib/types/publish/version.js.map +1 -1
  389. package/lib/types/resource-context.js +3 -2
  390. package/lib/types/resource-context.js.map +1 -1
  391. package/lib/types/sdk/generate.d.ts +22 -16
  392. package/lib/types/sdk/generate.js +64 -41
  393. package/lib/types/sdk/generate.js.map +1 -1
  394. package/lib/types/sdk/stability-choice.d.ts +12 -0
  395. package/lib/types/sdk/stability-choice.js +24 -0
  396. package/lib/types/sdk/stability-choice.js.map +1 -0
  397. package/lib/types/sdk-context.d.ts +4 -5
  398. package/lib/types/sdk-context.js +10 -18
  399. package/lib/types/sdk-context.js.map +1 -1
  400. package/lib/types/spec-context.d.ts +5 -4
  401. package/lib/types/spec-context.js +9 -8
  402. package/lib/types/spec-context.js.map +1 -1
  403. package/lib/types/temp-context.d.ts +1 -1
  404. package/lib/types/temp-context.js +5 -4
  405. package/lib/types/temp-context.js.map +1 -1
  406. package/lib/types/transform-context.d.ts +9 -5
  407. package/lib/types/transform-context.js +21 -18
  408. package/lib/types/transform-context.js.map +1 -1
  409. package/lib/utils/error-utils.d.ts +2 -0
  410. package/lib/utils/error-utils.js +5 -0
  411. package/lib/utils/error-utils.js.map +1 -0
  412. package/lib/utils/json-utils.d.ts +2 -0
  413. package/lib/utils/json-utils.js +4 -0
  414. package/lib/utils/json-utils.js.map +1 -0
  415. package/lib/utils/string-utils.d.ts +8 -1
  416. package/lib/utils/string-utils.js +13 -26
  417. package/lib/utils/string-utils.js.map +1 -1
  418. package/lib/utils/utils.d.ts +1 -3
  419. package/lib/utils/utils.js +12 -40
  420. package/lib/utils/utils.js.map +1 -1
  421. package/oclif.manifest.json +69 -357
  422. package/package.json +47 -25
  423. package/portal-pages/context-plugin.mdx +26 -0
  424. package/portal-pages/sdk.mdx +8 -0
  425. package/portal-pages/sdks.mdx +11 -0
  426. package/portal-template/NOTICE +37 -0
  427. package/portal-template/downloads.ts +41 -0
  428. package/portal-template/generated-pages-reload.ts +51 -0
  429. package/portal-template/package.json +11 -0
  430. package/portal-template/portal-config.ts +32 -0
  431. package/portal-template/prerender-pages.ts +81 -0
  432. package/portal-template/spec-reload.ts +26 -0
  433. package/portal-template/src/components/api-page.tsx +15 -0
  434. package/portal-template/src/components/code-block.tsx +9 -0
  435. package/portal-template/src/components/command-block.tsx +50 -0
  436. package/portal-template/src/components/example-layout.tsx +99 -0
  437. package/portal-template/src/components/logos.tsx +127 -0
  438. package/portal-template/src/components/mdx.tsx +28 -0
  439. package/portal-template/src/components/not-found.tsx +11 -0
  440. package/portal-template/src/components/plugin-install.tsx +22 -0
  441. package/portal-template/src/components/plugin-support.tsx +53 -0
  442. package/portal-template/src/components/sdk-actions.tsx +79 -0
  443. package/portal-template/src/components/sdk-cards.tsx +100 -0
  444. package/portal-template/src/components/search.tsx +41 -0
  445. package/portal-template/src/components/usage-tabs.tsx +92 -0
  446. package/portal-template/src/lib/code-samples.server.ts +40 -0
  447. package/portal-template/src/lib/code-samples.ts +43 -0
  448. package/portal-template/src/lib/code-titles.ts +29 -0
  449. package/portal-template/src/lib/install-command.ts +13 -0
  450. package/portal-template/src/lib/json.ts +5 -0
  451. package/portal-template/src/lib/layout.shared.tsx +41 -0
  452. package/portal-template/src/lib/layout.tsx +16 -0
  453. package/portal-template/src/lib/llms.server.ts +54 -0
  454. package/portal-template/src/lib/media-adapters.ts +34 -0
  455. package/portal-template/src/lib/navigation.ts +406 -0
  456. package/portal-template/src/lib/openapi-bundle.server.ts +343 -0
  457. package/portal-template/src/lib/openapi-filter.ts +191 -0
  458. package/portal-template/src/lib/openapi-labels.ts +15 -0
  459. package/portal-template/src/lib/openapi-methods.ts +12 -0
  460. package/portal-template/src/lib/openapi-section.server.ts +280 -0
  461. package/portal-template/src/lib/openapi-slim.ts +202 -0
  462. package/portal-template/src/lib/openapi.server.ts +16 -0
  463. package/portal-template/src/lib/portal-types.ts +36 -0
  464. package/portal-template/src/lib/portal.server.ts +13 -0
  465. package/portal-template/src/lib/portal.ts +11 -0
  466. package/portal-template/src/lib/rehype-code-titles.ts +53 -0
  467. package/portal-template/src/lib/request-examples.ts +72 -0
  468. package/portal-template/src/lib/seo.ts +21 -0
  469. package/portal-template/src/lib/shared.ts +51 -0
  470. package/portal-template/src/lib/shiki-bundle.ts +104 -0
  471. package/portal-template/src/lib/sitemap.server.ts +20 -0
  472. package/portal-template/src/lib/source.server.ts +27 -0
  473. package/portal-template/src/lib/source.ts +49 -0
  474. package/portal-template/src/lib/tabs.ts +37 -0
  475. package/portal-template/src/router.tsx +12 -0
  476. package/portal-template/src/routes/$.tsx +194 -0
  477. package/portal-template/src/routes/__root.tsx +56 -0
  478. package/portal-template/src/routes/api/search[.]json.ts +9 -0
  479. package/portal-template/src/routes/llms-full[.]txt.ts +10 -0
  480. package/portal-template/src/routes/llms[.]txt.ts +10 -0
  481. package/portal-template/src/routes/robots[.]txt.ts +10 -0
  482. package/portal-template/src/routes/sitemap[.]xml.ts +10 -0
  483. package/portal-template/src/routes/spa-shell.tsx +7 -0
  484. package/portal-template/src/routes/{$}[.]md.ts +21 -0
  485. package/portal-template/src/styles/app.css +33 -0
  486. package/portal-template/tsconfig.json +26 -0
  487. package/portal-template/vite.config.ts +68 -0
  488. package/lib/actions/plugin/record-sdk.d.ts +0 -14
  489. package/lib/actions/plugin/record-sdk.js +0 -60
  490. package/lib/actions/plugin/record-sdk.js.map +0 -1
  491. package/lib/actions/portal/copilot.d.ts +0 -17
  492. package/lib/actions/portal/copilot.js +0 -89
  493. package/lib/actions/portal/copilot.js.map +0 -1
  494. package/lib/actions/portal/quickstart.d.ts +0 -18
  495. package/lib/actions/portal/quickstart.js +0 -238
  496. package/lib/actions/portal/quickstart.js.map +0 -1
  497. package/lib/actions/portal/recipe/new-recipe.d.ts +0 -15
  498. package/lib/actions/portal/recipe/new-recipe.js +0 -177
  499. package/lib/actions/portal/recipe/new-recipe.js.map +0 -1
  500. package/lib/actions/portal/toc/new-toc.d.ts +0 -21
  501. package/lib/actions/portal/toc/new-toc.js +0 -95
  502. package/lib/actions/portal/toc/new-toc.js.map +0 -1
  503. package/lib/actions/sdk/merge-source-tree.d.ts +0 -12
  504. package/lib/actions/sdk/merge-source-tree.js +0 -78
  505. package/lib/actions/sdk/merge-source-tree.js.map +0 -1
  506. package/lib/actions/sdk/quickstart.d.ts +0 -18
  507. package/lib/actions/sdk/quickstart.js +0 -188
  508. package/lib/actions/sdk/quickstart.js.map +0 -1
  509. package/lib/actions/sdk/save-changes.d.ts +0 -8
  510. package/lib/actions/sdk/save-changes.js +0 -93
  511. package/lib/actions/sdk/save-changes.js.map +0 -1
  512. package/lib/application/portal/recipe/portal-recipe.d.ts +0 -8
  513. package/lib/application/portal/recipe/portal-recipe.js +0 -33
  514. package/lib/application/portal/recipe/portal-recipe.js.map +0 -1
  515. package/lib/application/portal/recipe/recipe-generator.d.ts +0 -21
  516. package/lib/application/portal/recipe/recipe-generator.js +0 -130
  517. package/lib/application/portal/recipe/recipe-generator.js.map +0 -1
  518. package/lib/application/portal/toc/toc-content-parser.d.ts +0 -5
  519. package/lib/application/portal/toc/toc-content-parser.js +0 -44
  520. package/lib/application/portal/toc/toc-content-parser.js.map +0 -1
  521. package/lib/application/portal/toc/toc-structure-generator.d.ts +0 -11
  522. package/lib/application/portal/toc/toc-structure-generator.js +0 -165
  523. package/lib/application/portal/toc/toc-structure-generator.js.map +0 -1
  524. package/lib/commands/portal/copilot.d.ts +0 -13
  525. package/lib/commands/portal/copilot.js +0 -34
  526. package/lib/commands/portal/copilot.js.map +0 -1
  527. package/lib/commands/portal/recipe/new.d.ts +0 -12
  528. package/lib/commands/portal/recipe/new.js +0 -45
  529. package/lib/commands/portal/recipe/new.js.map +0 -1
  530. package/lib/commands/portal/toc/new.d.ts +0 -16
  531. package/lib/commands/portal/toc/new.js +0 -68
  532. package/lib/commands/portal/toc/new.js.map +0 -1
  533. package/lib/commands/sdk/save-changes.d.ts +0 -14
  534. package/lib/commands/sdk/save-changes.js +0 -51
  535. package/lib/commands/sdk/save-changes.js.map +0 -1
  536. package/lib/infrastructure/debounce-service.d.ts +0 -10
  537. package/lib/infrastructure/debounce-service.js +0 -55
  538. package/lib/infrastructure/debounce-service.js.map +0 -1
  539. package/lib/infrastructure/services/portal-service.d.ts +0 -43
  540. package/lib/infrastructure/services/portal-service.js +0 -337
  541. package/lib/infrastructure/services/portal-service.js.map +0 -1
  542. package/lib/prompts/plugin/record-sdk.d.ts +0 -9
  543. package/lib/prompts/plugin/record-sdk.js +0 -40
  544. package/lib/prompts/plugin/record-sdk.js.map +0 -1
  545. package/lib/prompts/portal/copilot.d.ts +0 -18
  546. package/lib/prompts/portal/copilot.js +0 -82
  547. package/lib/prompts/portal/copilot.js.map +0 -1
  548. package/lib/prompts/portal/quickstart.d.ts +0 -42
  549. package/lib/prompts/portal/quickstart.js +0 -243
  550. package/lib/prompts/portal/quickstart.js.map +0 -1
  551. package/lib/prompts/portal/recipe/new-recipe.d.ts +0 -29
  552. package/lib/prompts/portal/recipe/new-recipe.js +0 -165
  553. package/lib/prompts/portal/recipe/new-recipe.js.map +0 -1
  554. package/lib/prompts/portal/toc/new-toc.d.ts +0 -16
  555. package/lib/prompts/portal/toc/new-toc.js +0 -50
  556. package/lib/prompts/portal/toc/new-toc.js.map +0 -1
  557. package/lib/prompts/sdk/merge-source-tree.d.ts +0 -22
  558. package/lib/prompts/sdk/merge-source-tree.js +0 -90
  559. package/lib/prompts/sdk/merge-source-tree.js.map +0 -1
  560. package/lib/prompts/sdk/quickstart.d.ts +0 -38
  561. package/lib/prompts/sdk/quickstart.js +0 -196
  562. package/lib/prompts/sdk/quickstart.js.map +0 -1
  563. package/lib/prompts/sdk/save-changes.d.ts +0 -21
  564. package/lib/prompts/sdk/save-changes.js +0 -84
  565. package/lib/prompts/sdk/save-changes.js.map +0 -1
  566. package/lib/types/build-context.d.ts +0 -26
  567. package/lib/types/build-context.js +0 -111
  568. package/lib/types/build-context.js.map +0 -1
  569. package/lib/types/events/recipe-creation-failed.d.ts +0 -5
  570. package/lib/types/events/recipe-creation-failed.js +0 -8
  571. package/lib/types/events/recipe-creation-failed.js.map +0 -1
  572. package/lib/types/events/sdk-changes-saved.d.ts +0 -8
  573. package/lib/types/events/sdk-changes-saved.js +0 -11
  574. package/lib/types/events/sdk-changes-saved.js.map +0 -1
  575. package/lib/types/events/sdk-changes-tracked.d.ts +0 -8
  576. package/lib/types/events/sdk-changes-tracked.js +0 -11
  577. package/lib/types/events/sdk-changes-tracked.js.map +0 -1
  578. package/lib/types/events/sdk-conflicts-resolved.d.ts +0 -8
  579. package/lib/types/events/sdk-conflicts-resolved.js +0 -11
  580. package/lib/types/events/sdk-conflicts-resolved.js.map +0 -1
  581. package/lib/types/events/toc-creation-failed.d.ts +0 -5
  582. package/lib/types/events/toc-creation-failed.js +0 -8
  583. package/lib/types/events/toc-creation-failed.js.map +0 -1
  584. package/lib/types/merge-source-tree-context.d.ts +0 -28
  585. package/lib/types/merge-source-tree-context.js +0 -63
  586. package/lib/types/merge-source-tree-context.js.map +0 -1
  587. package/lib/types/plugin/language-entry.d.ts +0 -9
  588. package/lib/types/plugin/language-entry.js +0 -64
  589. package/lib/types/plugin/language-entry.js.map +0 -1
  590. package/lib/types/recipe/recipe.d.ts +0 -22
  591. package/lib/types/recipe/recipe.js +0 -6
  592. package/lib/types/recipe/recipe.js.map +0 -1
  593. package/lib/types/recipe-context.d.ts +0 -9
  594. package/lib/types/recipe-context.js +0 -26
  595. package/lib/types/recipe-context.js.map +0 -1
  596. package/lib/types/save-changes-context.d.ts +0 -17
  597. package/lib/types/save-changes-context.js +0 -42
  598. package/lib/types/save-changes-context.js.map +0 -1
  599. package/lib/types/sdl/sdl.d.ts +0 -10
  600. package/lib/types/sdl/sdl.js +0 -18
  601. package/lib/types/sdl/sdl.js.map +0 -1
  602. package/lib/types/toc/toc-components.d.ts +0 -36
  603. package/lib/types/toc/toc-components.js +0 -94
  604. package/lib/types/toc/toc-components.js.map +0 -1
  605. package/lib/types/toc/toc.d.ts +0 -67
  606. package/lib/types/toc/toc.js +0 -2
  607. package/lib/types/toc/toc.js.map +0 -1
  608. package/lib/types/toc-context.d.ts +0 -12
  609. package/lib/types/toc-context.js +0 -26
  610. package/lib/types/toc-context.js.map +0 -1
@@ -1,35 +1,44 @@
1
- var _a;
2
- import { Command, Flags } from "@oclif/core";
3
- import { DirectoryPath } from "../../types/file/directoryPath.js";
4
- import { GenerateAction } from "../../actions/portal/generate.js";
5
- import { FlagsProvider } from "../../types/flags-provider.js";
6
- import { format, intro, outro } from "../../prompts/format.js";
7
- export class PortalGenerate extends Command {
1
+ import { Command, Flags } from '@oclif/core';
2
+ import { DirectoryPath } from '../../types/file/directoryPath.js';
3
+ import { GenerateAction } from '../../actions/portal/generate.js';
4
+ import { FlagsProvider } from '../../types/flags-provider.js';
5
+ import { format, intro, outro } from '../../prompts/format.js';
6
+ import { ProjectContext } from '../../types/project-context.js';
7
+ export default class PortalGenerate extends Command {
8
+ static summary = 'Generate a static API Documentation Portal.';
9
+ static description = `Builds a documentation portal from the OpenAPI documents and Markdown pages in your 'src' directory.
10
+
11
+ The portal is built on your machine and written as static files you can host anywhere. Configure it with 'src/apimatic.json', whose 'languages' block gives the portal a page for each SDK language, and whose 'plugin' block, or a 'pluginUrl' in its 'portal' block for a plugin hosted elsewhere, a page for the context plugin.`;
12
+ static cmdTxt = format.cmd('apimatic', 'portal', 'generate');
13
+ static examples = [
14
+ PortalGenerate.cmdTxt,
15
+ `${PortalGenerate.cmdTxt} ${format.flag('input', './')} ${format.flag('destination', './portal')}`,
16
+ `${PortalGenerate.cmdTxt} ${format.flag('zip')}`
17
+ ];
18
+ static flags = {
19
+ zip: Flags.boolean({
20
+ default: false,
21
+ description: 'write the generated portal as a .zip archive.'
22
+ }),
23
+ ...FlagsProvider.input,
24
+ ...FlagsProvider.destination('portal', 'portal'),
25
+ ...FlagsProvider.force,
26
+ ...FlagsProvider.authKey
27
+ };
8
28
  async run() {
9
- const { flags: { input, destination, force, zip: zipPortal, "auth-key": authKey } } = await this.parse(_a);
10
- const workingDirectory = DirectoryPath.createInput(input);
11
- const buildDirectory = input ? new DirectoryPath(input, "src") : workingDirectory.join("src");
12
- const portalDirectory = destination ? new DirectoryPath(destination) : workingDirectory.join("portal");
29
+ const { flags: { input, destination, force, zip: zipPortal, 'auth-key': authKey } } = await this.parse(PortalGenerate);
30
+ const project = ProjectContext.at(input);
13
31
  const commandMetadata = {
14
- commandName: _a.id,
32
+ commandName: PortalGenerate.id,
15
33
  shell: this.config.shell
16
34
  };
17
- intro("Generate Portal");
18
- const action = new GenerateAction(new DirectoryPath(this.config.configDir), commandMetadata, authKey);
19
- const result = await action.execute(buildDirectory, portalDirectory, force, zipPortal);
35
+ intro('Generate Portal');
36
+ const action = new GenerateAction(this.getConfigDir(), commandMetadata, authKey);
37
+ const result = await action.execute(project, project.portalDirectory(destination), force, zipPortal);
20
38
  outro(result);
21
39
  }
40
+ getConfigDir = () => {
41
+ return new DirectoryPath(this.config.configDir);
42
+ };
22
43
  }
23
- _a = PortalGenerate;
24
- PortalGenerate.summary = "Generate Context Plugins and API Documentation Portal with AI Assist Features.";
25
- PortalGenerate.description = "Generate an API Documentation portal. Requires an input directory containing API specifications, a config file and optionally, markdown guides. For details, refer to the [documentation](https://docs.apimatic.io/platform-api/#/http/guides/generating-on-prem-api-portal/build-file-reference)";
26
- PortalGenerate.flags = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, FlagsProvider.input), FlagsProvider.destination("portal", "portal")), FlagsProvider.force), { zip: Flags.boolean({
27
- default: false,
28
- description: "Download the generated portal as a .zip archive"
29
- }) }), FlagsProvider.authKey);
30
- PortalGenerate.cmdTxt = format.cmd("apimatic", "portal", "generate");
31
- PortalGenerate.examples = [
32
- _a.cmdTxt,
33
- `${_a.cmdTxt} ${format.flag("input", '"./"')} ${format.flag("destination", '"./portal"')}`
34
- ];
35
44
  //# sourceMappingURL=generate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/commands/portal/generate.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAG/D,MAAM,OAAO,cAAe,SAAQ,OAAO;IAuBzC,KAAK,CAAC,GAAG;QACP,MAAM,EACJ,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,EAC1E,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,EAAc,CAAC,CAAC;QAErC,MAAM,gBAAgB,GAAG,aAAa,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC1D,MAAM,cAAc,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC,KAAK,EAAE,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,EAAE,QAAQ,CAAC;QAChD,GAAG,aAAa,CAAC,KAAK;QACtB,GAAG,aAAa,CAAC,OAAO;KACzB,CAAC;IAEF,KAAK,CAAC,GAAG;QACP,MAAM,EACJ,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,EAC1E,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAErC,MAAM,OAAO,GAAG,cAAc,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;QACzC,MAAM,eAAe,GAAoB;YACvC,WAAW,EAAE,cAAc,CAAC,EAAE;YAC9B,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK;SACzB,CAAC;QAEF,KAAK,CAAC,iBAAiB,CAAC,CAAC;QACzB,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;QACjF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QACrG,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAEgB,YAAY,GAAG,GAAG,EAAE;QACnC,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAClD,CAAC,CAAC;CACH"}
@@ -1,16 +1,14 @@
1
- import { Command } from "@oclif/core";
1
+ import { Command } from '@oclif/core';
2
2
  export default class PortalServe extends Command {
3
- static summary: string;
4
- static description: string;
3
+ static readonly summary = "Preview your API Documentation Portal with live reload.";
4
+ static readonly description = "Serves the portal described by 'src/apimatic.json' from your machine, reloading the browser as you edit the Markdown pages in 'src/content', reorder them in a 'nav.json', or change the 'portal', 'languages' or 'plugin' block of 'apimatic.json'.\n\nAdding a language or a 'plugin' block, adding or removing a page in 'src/content', creating 'src/static', or changing which documents are in 'src/spec', needs the preview restarted.\n\nNothing is written to disk; run 'apimatic portal generate' to produce the static files.";
5
+ static readonly cmdTxt: string;
6
+ static readonly examples: string[];
5
7
  static flags: {
6
8
  "auth-key": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
- open: import("@oclif/core/interfaces").BooleanFlag<boolean>;
8
- "no-reload": import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
- destination: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
9
  port: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
10
+ open: import("@oclif/core/interfaces").BooleanFlag<boolean>;
11
11
  };
12
- static cmdTxt: string;
13
- static examples: string[];
14
12
  run(): Promise<void>;
15
- private getConfigDir;
13
+ private readonly getConfigDir;
16
14
  }
@@ -1,53 +1,50 @@
1
- var _a;
2
- import { Command, Flags } from "@oclif/core";
3
- import { PortalServeAction } from "../../actions/portal/serve.js";
4
- import { DirectoryPath } from "../../types/file/directoryPath.js";
5
- import { FlagsProvider } from "../../types/flags-provider.js";
6
- import { format, intro, outro } from "../../prompts/format.js";
7
- class PortalServe extends Command {
1
+ import { Command, Flags } from '@oclif/core';
2
+ import { DEFAULT_PORTAL_PORT, PortalServeAction } from '../../actions/portal/serve.js';
3
+ import { DirectoryPath } from '../../types/file/directoryPath.js';
4
+ import { FlagsProvider } from '../../types/flags-provider.js';
5
+ import { ProjectContext } from '../../types/project-context.js';
6
+ import { format, intro, outro } from '../../prompts/format.js';
7
+ const defaultPortText = String(DEFAULT_PORTAL_PORT);
8
+ export default class PortalServe extends Command {
9
+ static summary = 'Preview your API Documentation Portal with live reload.';
10
+ static description = `Serves the portal described by 'src/apimatic.json' from your machine, reloading the browser as you edit the Markdown pages in 'src/content', reorder them in a 'nav.json', or change the 'portal', 'languages' or 'plugin' block of 'apimatic.json'.
11
+
12
+ Adding a language or a 'plugin' block, adding or removing a page in 'src/content', creating 'src/static', or changing which documents are in 'src/spec', needs the preview restarted.
13
+
14
+ Nothing is written to disk; run 'apimatic portal generate' to produce the static files.`;
15
+ static cmdTxt = format.cmd('apimatic', 'portal', 'serve');
16
+ static examples = [
17
+ PortalServe.cmdTxt,
18
+ `${PortalServe.cmdTxt} ${format.flag('input', './')} ${format.flag('port', defaultPortText)} ${format.flag('open')}`
19
+ ];
20
+ static flags = {
21
+ port: Flags.integer({
22
+ char: 'p',
23
+ description: 'port to serve the portal on.',
24
+ default: DEFAULT_PORTAL_PORT,
25
+ helpValue: defaultPortText
26
+ }),
27
+ open: Flags.boolean({
28
+ char: 'o',
29
+ description: 'open the portal in the default browser.',
30
+ default: false
31
+ }),
32
+ ...FlagsProvider.input,
33
+ ...FlagsProvider.authKey
34
+ };
8
35
  async run() {
9
- const { flags: { input, destination, port, open, "no-reload": noReload, "auth-key": authKey } } = await this.parse(_a);
10
- const workingDirectory = DirectoryPath.createInput(input);
11
- const buildDirectory = input ? new DirectoryPath(input, "src") : workingDirectory.join("src");
12
- const portalDirectory = destination ? new DirectoryPath(destination) : workingDirectory.join("portal");
36
+ const { flags: { input, port, open, 'auth-key': authKey } } = await this.parse(PortalServe);
13
37
  const commandMetadata = {
14
- commandName: _a.id,
38
+ commandName: PortalServe.id,
15
39
  shell: this.config.shell
16
40
  };
17
- intro("Portal Serve");
18
- const portalServeAction = new PortalServeAction(this.getConfigDir(), commandMetadata, authKey);
19
- const result = await portalServeAction.execute(buildDirectory, portalDirectory, port, open, !noReload);
41
+ intro('Portal Serve');
42
+ const action = new PortalServeAction(this.getConfigDir(), commandMetadata, authKey);
43
+ const result = await action.execute(ProjectContext.at(input), port, open);
20
44
  outro(result);
21
45
  }
22
- getConfigDir() {
46
+ getConfigDir = () => {
23
47
  return new DirectoryPath(this.config.configDir);
24
- }
48
+ };
25
49
  }
26
- _a = PortalServe;
27
- PortalServe.summary = "Generate and serve an API Documentation Portal with hot reload.";
28
- PortalServe.description = "Requires an input directory with API specifications, a config file, and optionally markdown guides. Supports disabling hot reload and opening the portal in the default browser.";
29
- PortalServe.flags = Object.assign(Object.assign(Object.assign(Object.assign({ port: Flags.integer({
30
- char: "p",
31
- description: "port to serve the portal.",
32
- default: 23513,
33
- helpValue: "23513"
34
- }) }, FlagsProvider.input), FlagsProvider.destination("portal", "portal")), { open: Flags.boolean({
35
- char: "o",
36
- description: "open the portal in the default browser.",
37
- default: false
38
- }), "no-reload": Flags.boolean({
39
- description: "disable hot reload.",
40
- default: false
41
- }) }), FlagsProvider.authKey);
42
- PortalServe.cmdTxt = format.cmd("apimatic", "portal", "serve");
43
- PortalServe.examples = [
44
- _a.cmdTxt,
45
- `${_a.cmdTxt} ` +
46
- `${format.flag("input", './')} ` +
47
- `${format.flag("destination", './portal')} ` +
48
- `${format.flag("port", "23513")} ` +
49
- `${format.flag("open")} ` +
50
- `${format.flag("no-reload")}`
51
- ];
52
- export default PortalServe;
53
50
  //# sourceMappingURL=serve.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"serve.js","sourceRoot":"","sources":["../../../src/commands/portal/serve.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAE/D,MAAqB,WAAY,SAAQ,OAAO;IAsCvC,KAAK,CAAC,GAAG;QACd,MAAM,EACJ,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,EACtF,GAAG,MAAM,IA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,MAAM,CAAC,KAAK;SACzB,CAAC;QAEF,KAAK,CAAC,cAAc,CAAC,CAAC;QACtB,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;QACpF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC1E,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAEgB,YAAY,GAAG,GAAG,EAAE;QACnC,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAClD,CAAC,CAAC;CACH"}
@@ -2,13 +2,11 @@ import { Command } from '@oclif/core';
2
2
  import { DirectoryPath } from '../../../types/file/directoryPath.js';
3
3
  import { format, intro, outro } from '../../../prompts/format.js';
4
4
  import { PublishingProfileListAction } from '../../../actions/publishing/profile/list.js';
5
- class PublishingProfileList extends Command {
6
- constructor() {
7
- super(...arguments);
8
- this.getConfigDir = () => {
9
- return new DirectoryPath(this.config.configDir);
10
- };
11
- }
5
+ export default class PublishingProfileList extends Command {
6
+ static summary = 'List all publishing profiles';
7
+ static description = `Display all publishing profiles associated with your account, including each profile's name, ID and enabled languages.`;
8
+ static cmdTxt = format.cmd('apimatic', 'publishing', 'profile', 'list');
9
+ static examples = [PublishingProfileList.cmdTxt];
12
10
  async run() {
13
11
  const commandMetadata = {
14
12
  commandName: PublishingProfileList.id,
@@ -19,10 +17,8 @@ class PublishingProfileList extends Command {
19
17
  const result = await action.execute();
20
18
  outro(result);
21
19
  }
20
+ getConfigDir = () => {
21
+ return new DirectoryPath(this.config.configDir);
22
+ };
22
23
  }
23
- PublishingProfileList.summary = 'List all publishing profiles';
24
- PublishingProfileList.description = `Display all publishing profiles associated with your account, including each profile's name, ID and enabled languages.`;
25
- PublishingProfileList.cmdTxt = format.cmd('apimatic', 'publishing', 'profile', 'list');
26
- PublishingProfileList.examples = [PublishingProfileList.cmdTxt];
27
- export default PublishingProfileList;
28
24
  //# sourceMappingURL=list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/publishing/profile/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAErE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAE1F,MAAqB,qBAAsB,SAAQ,OAAO;IAA1D;;QAqBmB,iBAAY,GAAG,GAAG,EAAE;YACnC,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAClD,CAAC,CAAC;IACJ,CAAC;IAfC,KAAK,CAAC,GAAG;QACP,MAAM,eAAe,GAAoB;YACvC,WAAW,EAAE,qBAAqB,CAAC,EAAE;YACrC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK;SACzB,CAAC;QAEF,KAAK,CAAC,yBAAyB,CAAC,CAAC;QACjC,MAAM,MAAM,GAAG,IAAI,2BAA2B,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,eAAe,CAAC,CAAC;QACrF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;QACtC,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;;AAlBe,6BAAO,GAAG,8BAA8B,AAAjC,CAAkC;AAEzC,iCAAW,GAAG,wHAAwH,AAA3H,CAA4H;AAE/H,4BAAM,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,CAAC,AAA1D,CAA2D;AAElF,8BAAQ,GAAG,CAAC,qBAAqB,CAAC,MAAM,CAAC,AAAjC,CAAkC;eAP9B,qBAAqB"}
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/publishing/profile/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAErE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAE1F,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,OAAO;IACxD,MAAM,CAAU,OAAO,GAAG,8BAA8B,CAAC;IAEzD,MAAM,CAAU,WAAW,GAAG,wHAAwH,CAAC;IAE/I,MAAM,CAAU,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAEzF,MAAM,CAAC,QAAQ,GAAG,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAEjD,KAAK,CAAC,GAAG;QACP,MAAM,eAAe,GAAoB;YACvC,WAAW,EAAE,qBAAqB,CAAC,EAAE;YACrC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK;SACzB,CAAC;QAEF,KAAK,CAAC,yBAAyB,CAAC,CAAC;QACjC,MAAM,MAAM,GAAG,IAAI,2BAA2B,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,eAAe,CAAC,CAAC;QACrF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;QACtC,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAEgB,YAAY,GAAG,GAAG,EAAE;QACnC,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAClD,CAAC,CAAC;CACH"}
@@ -1,9 +1,9 @@
1
- import { Command } from "@oclif/core";
1
+ import { Command } from '@oclif/core';
2
2
  export default class Quickstart extends Command {
3
- static description: string;
4
- static summary: string;
5
- static cmdTxt: string;
6
- static examples: string[];
3
+ static readonly description = "Point the CLI at your API specification and it builds a documentation portal, SDKs, and a context plugin that teaches an AI coding assistant to use them.";
4
+ static readonly summary = "Create your first API Documentation Portal, SDKs and Context Plugins.";
5
+ static readonly cmdTxt: string;
6
+ static readonly examples: string[];
7
7
  run(): Promise<void>;
8
8
  private readonly getConfigDir;
9
9
  }
@@ -1,37 +1,31 @@
1
- var _a;
2
- import { Command } from "@oclif/core";
3
- import { format, intro, outro } from "../prompts/format.js";
4
- import { TelemetryService } from "../infrastructure/services/telemetry-service.js";
5
- import { DirectoryPath } from "../types/file/directoryPath.js";
6
- import { QuickstartInitiatedEvent } from "../types/events/quickstart-initiated.js";
7
- import { QuickstartAction } from "../actions/quickstart.js";
8
- import { QuickstartCompletedEvent } from "../types/events/quickstart-completed.js";
9
- class Quickstart extends Command {
10
- constructor() {
11
- super(...arguments);
12
- this.getConfigDir = () => {
13
- return new DirectoryPath(this.config.configDir);
14
- };
15
- }
1
+ import { Command } from '@oclif/core';
2
+ import { format, intro, outro } from '../prompts/format.js';
3
+ import { TelemetryService } from '../infrastructure/services/telemetry-service.js';
4
+ import { DirectoryPath } from '../types/file/directoryPath.js';
5
+ import { QuickstartInitiatedEvent } from '../types/events/quickstart-initiated.js';
6
+ import { QuickstartAction } from '../actions/quickstart.js';
7
+ import { QuickstartCompletedEvent } from '../types/events/quickstart-completed.js';
8
+ export default class Quickstart extends Command {
9
+ static description = 'Point the CLI at your API specification and it builds a documentation portal, SDKs, and a context plugin that teaches an AI coding assistant to use them.';
10
+ static summary = 'Create your first API Documentation Portal, SDKs and Context Plugins.';
11
+ static cmdTxt = format.cmd('apimatic', 'quickstart');
12
+ static examples = [Quickstart.cmdTxt];
16
13
  async run() {
17
14
  const telemetryService = new TelemetryService(this.getConfigDir());
18
15
  const commandMetadata = {
19
- commandName: _a.id,
16
+ commandName: Quickstart.id,
20
17
  shell: this.config.shell
21
18
  };
22
19
  await telemetryService.trackEvent(new QuickstartInitiatedEvent(), commandMetadata.shell);
23
- intro("Quickstart");
20
+ intro('Quickstart');
24
21
  const action = new QuickstartAction(this.getConfigDir(), commandMetadata);
25
- const result = await action.execute();
22
+ const result = await action.execute(DirectoryPath.default);
26
23
  outro(result);
27
24
  // TODO: Remove this, find a solution for tracking.
28
25
  await result.mapAll(async () => await telemetryService.trackEvent(new QuickstartCompletedEvent(), commandMetadata.shell), async () => { }, async () => { });
29
26
  }
27
+ getConfigDir = () => {
28
+ return new DirectoryPath(this.config.configDir);
29
+ };
30
30
  }
31
- _a = Quickstart;
32
- Quickstart.description = "Get started with your first SDK or API Portal in four easy steps.";
33
- Quickstart.summary = "Create your first API Portal, Context Plugins and SDKs, or a standalone SDK, using APIMatic.";
34
- Quickstart.cmdTxt = format.cmd("apimatic", "quickstart");
35
- Quickstart.examples = [_a.cmdTxt];
36
- export default Quickstart;
37
31
  //# sourceMappingURL=quickstart.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"quickstart.js","sourceRoot":"","sources":["../../src/commands/quickstart.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AAEnF,MAAqB,UAAW,SAAQ,OAAO;IAA/C;;QA+BmB,iBAAY,GAAG,GAAG,EAAE;YACnC,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,MAAM,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MAAM,MAAM,CAAC,MAAM,CACjB,KAAK,IAAI,EAAE,CAAC,MAAM,gBAAgB,CAAC,UAAU,CAAC,IAAI,wBAAwB,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,EACpG,KAAK,IAAI,EAAE,GAAE,CAAC,EACd,KAAK,IAAI,EAAE,GAAE,CAAC,CACf,CAAC;IACJ,CAAC;IAEgB,YAAY,GAAG,GAAG,EAAE;QACnC,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAClD,CAAC,CAAC;CACH"}
@@ -1,19 +1,17 @@
1
- import { Command } from "@oclif/core";
1
+ import { Command } from '@oclif/core';
2
2
  export default class SdkGenerate extends Command {
3
3
  static readonly summary = "Generate an SDK for your API";
4
- static readonly description = "Generate Software Development Kits (SDKs) from API specifications.\nSupports multiple programming languages including Java, C#, Python, JavaScript, and more.";
4
+ static readonly description = "Generate a Software Development Kit (SDK) from an API specification.\nC#, TypeScript and Python are available; Java, Ruby, Go and PHP are on their way.";
5
5
  static readonly cmdTxt: string;
6
6
  static flags: {
7
7
  "auth-key": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
8
  force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
9
  language: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
10
10
  destination: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
- "skip-changes": import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
- "api-version": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ 'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
12
  zip: import("@oclif/core/interfaces").BooleanFlag<boolean>;
14
- "track-changes": import("@oclif/core/interfaces").BooleanFlag<boolean>;
15
- "codegen-version": import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
16
- stability: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
13
+ 'codegen-version': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
14
+ stability: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
15
  };
18
16
  static examples: string[];
19
17
  run(): Promise<void>;
@@ -1,80 +1,68 @@
1
- import { Command, Flags } from "@oclif/core";
2
- import { DirectoryPath } from "../../types/file/directoryPath.js";
3
- import { FlagsProvider } from "../../types/flags-provider.js";
4
- import { GenerateAction } from "../../actions/sdk/generate.js";
5
- import { CodeGenerationVersion, CodegenOption, Language, Stability } from "../../types/sdk/generate.js";
6
- import { format, intro, outro } from "../../prompts/format.js";
7
- import { SdkChangesTrackedEvent } from "../../types/events/sdk-changes-tracked.js";
8
- import { TelemetryService } from "../../infrastructure/services/telemetry-service.js";
9
- import { SdkConflictsResolvedEvent } from "../../types/events/sdk-conflicts-resolved.js";
10
- class SdkGenerate extends Command {
11
- constructor() {
12
- super(...arguments);
13
- this.getConfigDir = () => {
14
- return new DirectoryPath(this.config.configDir);
15
- };
16
- }
1
+ import { Command, Flags } from '@oclif/core';
2
+ import { DirectoryPath } from '../../types/file/directoryPath.js';
3
+ import { FlagsProvider } from '../../types/flags-provider.js';
4
+ import { GenerateAction } from '../../actions/sdk/generate.js';
5
+ import { CodeGenerationVersion, Language, Stability } from '../../types/sdk/generate.js';
6
+ import { StabilityChoice } from '../../types/sdk/stability-choice.js';
7
+ import { ProjectContext } from '../../types/project-context.js';
8
+ import { format, intro, outro } from '../../prompts/format.js';
9
+ export default class SdkGenerate extends Command {
10
+ static summary = 'Generate an SDK for your API';
11
+ static description = `Generate a Software Development Kit (SDK) from an API specification.
12
+ C#, TypeScript and Python are available; Java, Ruby, Go and PHP are on their way.`;
13
+ static cmdTxt = format.cmd('apimatic', 'sdk', 'generate');
14
+ static flags = {
15
+ // Every language stays here so one that is coming back is answered by the command rather than
16
+ // rejected as an unknown value; the action says which are available.
17
+ language: Flags.string({
18
+ char: 'l',
19
+ required: true,
20
+ description: 'Programming language for SDK generation',
21
+ options: Object.values(Language).map((p) => p.valueOf())
22
+ }),
23
+ destination: Flags.string({
24
+ char: 'd',
25
+ description: '[default: <input>/sdk/<language> | <input>/sdk/<api-version>/<language>] path where the SDK will be generated'
26
+ }),
27
+ 'api-version': Flags.string({
28
+ description: 'Version of the API to use for SDK generation (if multiple versions exist)'
29
+ }),
30
+ zip: Flags.boolean({
31
+ default: false,
32
+ description: 'Download the generated SDK as a .zip archive'
33
+ }),
34
+ 'codegen-version': Flags.string({
35
+ description: 'Version of the code generator to use',
36
+ options: Object.values(CodeGenerationVersion).map((v) => v.valueOf()),
37
+ default: CodeGenerationVersion.V4
38
+ }),
39
+ stability: Flags.string({
40
+ description: 'Stability level of the generated SDK. Defaults to the level the language offers.',
41
+ options: Object.values(Stability).map((s) => s.valueOf())
42
+ }),
43
+ ...FlagsProvider.input,
44
+ ...FlagsProvider.force,
45
+ ...FlagsProvider.authKey
46
+ };
47
+ static examples = [
48
+ `${SdkGenerate.cmdTxt} ${format.flag('language', 'typescript')}`,
49
+ `${SdkGenerate.cmdTxt} ${format.flag('language', 'csharp')} ${format.flag('input', './')}`,
50
+ `${SdkGenerate.cmdTxt} ${format.flag('language', 'python')} ${format.flag('destination', './sdk')} ${format.flag('zip')}`
51
+ ];
17
52
  async run() {
18
- var _a;
19
- const { flags: { language, input, destination, force, zip: zipSdk, "auth-key": authKey, "skip-changes": skipChanges, "track-changes": trackChanges, "api-version": apiVersion, "codegen-version": codegenVersion, stability }, metadata } = await this.parse(SdkGenerate);
20
- const workingDirectory = DirectoryPath.createInput(input);
21
- const buildDirectory = input ? new DirectoryPath(input, "src") : workingDirectory.join("src");
22
- const sdkDirectory = destination ? new DirectoryPath(destination) : workingDirectory.join("sdk");
53
+ const { flags: { language, input, destination, force, zip: zipSdk, stability, 'auth-key': authKey, 'api-version': apiVersion } } = await this.parse(SdkGenerate);
54
+ const project = ProjectContext.at(input);
23
55
  const commandMetadata = {
24
56
  commandName: SdkGenerate.id,
25
57
  shell: this.config.shell
26
58
  };
27
- const telemetryService = new TelemetryService(this.getConfigDir());
28
- intro("Generate SDK");
59
+ intro('Generate SDK');
29
60
  const action = new GenerateAction(this.getConfigDir(), commandMetadata, authKey);
30
- const result = await action.execute(buildDirectory, sdkDirectory, language, force, zipSdk, skipChanges, trackChanges, CodegenOption.create(codegenVersion, stability), ((_a = metadata.flags.stability) === null || _a === void 0 ? void 0 : _a.setFromDefault) !== true, apiVersion);
61
+ const result = await action.execute(project, project.sdkDirectory(destination), language, StabilityChoice.for(language, stability).stabilityLevel(), force, zipSdk, apiVersion);
31
62
  outro(result);
32
- await result.mapAll(async (res) => {
33
- if (res === null || res === void 0 ? void 0 : res.sourceTreeTrackingInitiated) {
34
- await telemetryService.trackEvent(new SdkChangesTrackedEvent(language), commandMetadata.shell);
35
- }
36
- if (res === null || res === void 0 ? void 0 : res.conflictsResolved) {
37
- await telemetryService.trackEvent(new SdkConflictsResolvedEvent(language), commandMetadata.shell);
38
- }
39
- }, async () => { }, async () => { });
40
63
  }
64
+ getConfigDir = () => {
65
+ return new DirectoryPath(this.config.configDir);
66
+ };
41
67
  }
42
- SdkGenerate.summary = "Generate an SDK for your API";
43
- SdkGenerate.description = `Generate Software Development Kits (SDKs) from API specifications.
44
- Supports multiple programming languages including Java, C#, Python, JavaScript, and more.`;
45
- SdkGenerate.cmdTxt = format.cmd("apimatic", "sdk", "generate");
46
- SdkGenerate.flags = Object.assign(Object.assign(Object.assign({ language: Flags.string({
47
- char: "l",
48
- required: true,
49
- description: "Programming language for SDK generation",
50
- options: Object.values(Language).map((p) => p.valueOf()),
51
- }), destination: Flags.string({
52
- char: "d",
53
- description: "[default: <input>/sdk/<language> | <input>/sdk/<api-version>/<language>] path where the SDK will be generated"
54
- }), "skip-changes": Flags.boolean({
55
- default: false,
56
- description: "Do not apply the saved changes to the generated SDK"
57
- }), "api-version": Flags.string({
58
- description: "Version of the API to use for SDK generation (if multiple versions exist)"
59
- }), zip: Flags.boolean({
60
- default: false,
61
- description: "Download the generated SDK as a .zip archive"
62
- }), "track-changes": Flags.boolean({
63
- default: false,
64
- description: "Enable change tracking for SDK generation (only required for initial setup)"
65
- }), "codegen-version": Flags.string({
66
- description: "Version of the code generator to use",
67
- options: Object.values(CodeGenerationVersion).map((v) => v.valueOf()),
68
- default: CodeGenerationVersion.V3
69
- }), "stability": Flags.string({
70
- description: "Stability level of the generated SDK",
71
- options: Object.values(Stability).map((s) => s.valueOf()),
72
- default: Stability.STABLE
73
- }) }, FlagsProvider.input), FlagsProvider.force), FlagsProvider.authKey);
74
- SdkGenerate.examples = [
75
- `${SdkGenerate.cmdTxt} ${format.flag("language", "java")}`,
76
- `${SdkGenerate.cmdTxt} ${format.flag("language", "csharp")} ${format.flag("input", "./")}`,
77
- `${SdkGenerate.cmdTxt} ${format.flag("language", "python")} ${format.flag("destination", "./sdk")} ${format.flag("zip")}`
78
- ];
79
- export default SdkGenerate;
80
68
  //# sourceMappingURL=generate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/commands/sdk/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExG,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,2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,EAAE,SAAS,CAAC,CAAC,cAAc,EAAE,EACrE,KAAK,EACL,MAAM,EACN,UAAU,CACX,CAAC;QACF,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAEgB,YAAY,GAAG,GAAG,EAAE;QACnC,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAClD,CAAC,CAAC;CACH"}
@@ -4,16 +4,15 @@ export default class SdkPublish extends Command {
4
4
  static readonly description = "Generate and publish an SDK using a publishing profile configured in the APIMatic App. Requires an input directory containing the API specification. Run without flags for a step-by-step interactive experience, or pass all required flags for CI/CD automation.";
5
5
  static readonly cmdTxt: string;
6
6
  static flags: {
7
- 'publish-type': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
- 'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
- 'codegen-version': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
10
- stability: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
11
- 'update-plugin-config': import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
- force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
- language: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
7
  destination: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
+ force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
15
9
  'profile-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
10
  version: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ language: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ 'publish-type': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ 'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
14
+ 'codegen-version': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
15
+ stability: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
16
  };
18
17
  static examples: string[];
19
18
  run(): Promise<void>;