@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
@@ -0,0 +1,29 @@
1
+ import { log } from '@clack/prompts';
2
+ import { format as f } from '../format.js';
3
+ const PRICING_URL = 'https://www.apimatic.io/pricing';
4
+ /**
5
+ * Shared by `portal generate` and `portal serve` so the same refusal always reads the
6
+ * same way, whichever command hit it.
7
+ */
8
+ export function reportAuthorizationFailure(failure) {
9
+ switch (failure.kind) {
10
+ case 'unauthenticated': {
11
+ const message = `You need to be signed in to generate a portal. ` +
12
+ `Run ${f.cmdAlt('apimatic', 'auth', 'login')}, ` +
13
+ `or pass a key with ${f.flag('auth-key')}.`;
14
+ log.error(message);
15
+ return;
16
+ }
17
+ case 'unverifiable': {
18
+ const message = `Could not verify your subscription with ${f.var(failure.host)}. ${failure.error.errorMessage}`;
19
+ log.error(message);
20
+ return;
21
+ }
22
+ case 'notEntitled': {
23
+ const message = `Your subscription does not include portal generation. ` + `See ${f.link(PRICING_URL)} to upgrade.`;
24
+ log.error(message);
25
+ return;
26
+ }
27
+ }
28
+ }
29
+ //# sourceMappingURL=authorization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authorization.js","sourceRoot":"","sources":["../../../src/prompts/portal/authorization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAErC,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,WAAW,GAAG,iCAAiC,CAAC;AAEtD;;;GAGG;AACH,MAAM,UAAU,0BAA0B,CAAC,OAAmC;IAC5E,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;QACrB,KAAK,iBAAiB,EAAE,CAAC;YACvB,MAAM,OAAO,GACX,iDAAiD;gBACjD,OAAO,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,IAAI;gBAChD,sBAAsB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;YAC9C,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACnB,OAAO;QACT,CAAC;QACD,KAAK,cAAc,EAAE,CAAC;YACpB,MAAM,OAAO,GAAG,2CAA2C,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;YAChH,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACnB,OAAO;QACT,CAAC;QACD,KAAK,aAAa,EAAE,CAAC;YACnB,MAAM,OAAO,GACX,wDAAwD,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC;YACtG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACnB,OAAO;QACT,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function reportUnplacedSamples(endpoints: string[]): void;
@@ -0,0 +1,9 @@
1
+ import { log } from '@clack/prompts';
2
+ import { format as f } from '../format.js';
3
+ export function reportUnplacedSamples(endpoints) {
4
+ if (endpoints.length === 0) {
5
+ return;
6
+ }
7
+ log.warn(`No operation in ${f.var('spec')} takes the code samples for ${endpoints.join(', ')}.`);
8
+ }
9
+ //# sourceMappingURL=code-samples.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-samples.js","sourceRoot":"","sources":["../../../src/prompts/portal/code-samples.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,UAAU,qBAAqB,CAAC,SAAmB;IACvD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,OAAO;IACT,CAAC;IACD,GAAG,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,+BAA+B,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnG,CAAC"}
@@ -1,15 +1,20 @@
1
- import { DirectoryPath } from "../../types/file/directoryPath.js";
2
- import { Result } from "neverthrow";
3
- import { FilePath } from "../../types/file/filePath.js";
4
- import { ServiceError } from "../../infrastructure/service-error.js";
1
+ import { DirectoryPath } from '../../types/file/directoryPath.js';
2
+ import { FilePath } from '../../types/file/filePath.js';
3
+ import { PortalBuildFailure, PortalBuildResult } from '../../infrastructure/portal-build-service.js';
4
+ import { PortalSaveProblem } from '../../types/portal-context.js';
5
+ import { Result } from 'neverthrow';
5
6
  export declare class PortalGeneratePrompts {
6
7
  overwritePortal(directory: DirectoryPath): Promise<boolean>;
7
8
  directoryCannotBeSame(directory: DirectoryPath): void;
8
- srcDirectoryEmpty(directory: DirectoryPath): void;
9
9
  portalDirectoryNotEmpty(): void;
10
- generatePortal(fn: Promise<Result<NodeJS.ReadableStream, ServiceError | NodeJS.ReadableStream>>): Promise<Result<NodeJS.ReadableStream, NodeJS.ReadableStream | ServiceError>>;
11
- portalGenerationError(error: string): void;
12
- portalGenerationSdkMergeFailed(sdkMergeFailedErrors: string[]): void;
13
- portalGenerationErrorWithReport(reportPath: FilePath): void;
10
+ destinationContainsSource(sourceDirectory: DirectoryPath, portalDirectory: DirectoryPath): void;
11
+ /**
12
+ * A portal build runs for tens of seconds with no output of its own, so the spinner
13
+ * carries an elapsed timer rather than a static message.
14
+ */
15
+ buildPortal(fn: Promise<Result<PortalBuildResult, PortalBuildFailure>>): Promise<Result<PortalBuildResult, PortalBuildFailure>>;
16
+ buildFailed(output: string, logPath: FilePath | null): void;
17
+ savePortal(fn: Promise<Result<void, PortalSaveProblem>>): Promise<Result<void, PortalSaveProblem>>;
14
18
  portalGenerated(portal: DirectoryPath): void;
19
+ nextSteps(portal: DirectoryPath, zipped: boolean): void;
15
20
  }
@@ -1,6 +1,16 @@
1
- import { isCancel, confirm, log } from "@clack/prompts";
2
- import { format as f } from "../format.js";
3
- import { noteWrapped, withSpinner } from "../prompt.js";
1
+ import { isCancel, confirm, log } from '@clack/prompts';
2
+ import { NOT_FOUND_FILE_NAME, ZIP_FILE_NAME } from '../../types/portal-context.js';
3
+ import { format as f } from '../format.js';
4
+ import { logTail, noteWrapped, withSpinner } from '../prompt.js';
5
+ function describeSaveProblem(problem) {
6
+ switch (problem.kind) {
7
+ case 'stagingFailed':
8
+ return `The portal could not be written (${problem.reason}). The previous portal is unchanged.`;
9
+ case 'replaceFailed':
10
+ return (`The previous portal could not be replaced (${problem.reason}). ` +
11
+ `Whatever could not be moved into place is still at ${f.path(problem.stagedAt)}; move it up a level by hand.`);
12
+ }
13
+ }
4
14
  export class PortalGeneratePrompts {
5
15
  async overwritePortal(directory) {
6
16
  const overwrite = await confirm({
@@ -13,39 +23,51 @@ export class PortalGeneratePrompts {
13
23
  return overwrite;
14
24
  }
15
25
  directoryCannotBeSame(directory) {
16
- const message = `The ${f.var("src")} and ${f.var("portal")} directories must be different. Current value: ${f.path(directory)}`;
17
- log.error(message);
18
- }
19
- srcDirectoryEmpty(directory) {
20
- const message = `The ${f.var("src")} directory is either empty or invalid: ${f.path(directory)}`;
26
+ const message = `The ${f.var('src')} and ${f.var('portal')} directories must be different. Current value: ${f.path(directory)}`;
21
27
  log.error(message);
22
28
  }
23
29
  portalDirectoryNotEmpty() {
24
- const message = `Please enter a different destination folder or remove the existing files and try again.`;
25
- log.error(message);
30
+ log.error('Please enter a different destination folder or remove the existing files and try again.');
26
31
  }
27
- generatePortal(fn) {
28
- return withSpinner("Generating API Portal", "Portal generated successfully.", "Portal Generation failed.", fn);
32
+ destinationContainsSource(sourceDirectory, portalDirectory) {
33
+ const message = `The destination ${f.path(portalDirectory)} contains your source directory ` +
34
+ `${f.path(sourceDirectory)}, and everything in the destination is replaced by the ` +
35
+ `generated portal. Choose a destination outside it, such as ` +
36
+ `${f.flag('destination', './portal')}.`;
37
+ log.error(message);
29
38
  }
30
- portalGenerationError(error) {
31
- log.error(error);
39
+ /**
40
+ * A portal build runs for tens of seconds with no output of its own, so the spinner
41
+ * carries an elapsed timer rather than a static message.
42
+ */
43
+ buildPortal(fn) {
44
+ return withSpinner('Building the portal', ({ pageCount }) => `Built ${pageCount} ${pageCount === 1 ? 'page' : 'pages'}.`, (failure) => failure.message, fn, { indicator: 'timer' });
32
45
  }
33
- portalGenerationSdkMergeFailed(sdkMergeFailedErrors) {
34
- log.error(`Saved changes couldn't be applied to one or more SDKs.`);
35
- const language = sdkMergeFailedErrors.length === 1 ? sdkMergeFailedErrors[0] : "<language>";
36
- log.error(`Merge conflicts found in:\n- ${sdkMergeFailedErrors.join("\n- ")}`);
37
- const message = `Review and resolve the conflicts first by running:
38
- '${f.cmdAlt("apimatic", "sdk", "generate")} ${f.flag("language", language)}'
39
- After resolving merge conflicts, retry ${f.cmdAlt("apimatic", "portal", "generate")}.`;
40
- noteWrapped(message, "Next Steps");
46
+ buildFailed(output, logPath) {
47
+ const tail = logTail(output);
48
+ if (tail.length > 0) {
49
+ log.message(tail);
50
+ }
51
+ if (logPath === null) {
52
+ log.error('The full build log could not be written beside the portal.');
53
+ }
54
+ else {
55
+ log.error(`The full build log is at ${f.path(logPath)}.`);
56
+ }
41
57
  }
42
- portalGenerationErrorWithReport(reportPath) {
43
- const message = `An error occurred during portal generation.
44
- A report has been written at the destination path ${f.path(reportPath)}`;
45
- log.error(message);
58
+ savePortal(fn) {
59
+ return withSpinner('Writing the portal', 'Portal written.', describeSaveProblem, fn);
46
60
  }
47
61
  portalGenerated(portal) {
48
62
  log.info(`Portal artifacts can be found at ${f.path(portal)}.`);
49
63
  }
64
+ nextSteps(portal, zipped) {
65
+ const message = zipped
66
+ ? `Unpack ${f.var(ZIP_FILE_NAME)} in ${f.path(portal)} onto any static host.\n` +
67
+ `Configure ${f.var(NOT_FOUND_FILE_NAME)} as the error document so deep links resolve.`
68
+ : `Upload the contents of ${f.path(portal)} to any static host.\n` +
69
+ `Configure ${f.var(NOT_FOUND_FILE_NAME)} as the error document so deep links resolve.`;
70
+ noteWrapped(message, 'Next steps');
71
+ }
50
72
  }
51
73
  //# sourceMappingURL=generate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/prompts/portal/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,cAAc,CAAC;AAI3C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAExD,MAAM,OAAO,qBAAqB;IACzB,KAAK,CAAC,eAAe,CAAC,SAAwB;QACnD,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC;YAC9B,OAAO,EAAE,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,0CAA0C;YACvF,YAAY,EAAE,KAAK;SACpB,CAAC,CAAC;QAEH,IAAI,QAAQ,CAAC,SAAS,CAAC,EAAE,CAA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@@
1
+ import { Result } from 'neverthrow';
2
+ import { ServiceError } from '../../infrastructure/service-error.js';
3
+ import { PortalAuthorizationFailure } from '../../infrastructure/services/portal-authorization-service.js';
4
+ import { DirectoryPath } from '../../types/file/directoryPath.js';
5
+ import { FileName } from '../../types/file/fileName.js';
6
+ import { ContentNotices } from '../../types/portal/content-notices.js';
7
+ import { MissingArtifacts } from '../../types/portal/generated-pages.js';
8
+ import { PortalArtifacts } from '../../types/portal/portal-artifacts.js';
9
+ import { PortalSourceProblem } from '../../types/portal/portal-source.js';
10
+ /** What both `portal generate` and `portal serve` say while the project they share is prepared. */
11
+ export declare class PreparePortalProjectPrompts {
12
+ runtimeUnsupported(reason: string): void;
13
+ authorizationFailed(failure: PortalAuthorizationFailure): void;
14
+ generateArtifacts(fn: Promise<Result<PortalArtifacts, ServiceError>>): Promise<Result<PortalArtifacts, ServiceError>>;
15
+ sourceProblem(problem: PortalSourceProblem, sourceDirectory: DirectoryPath): void;
16
+ filesShadowedByStatic(shadowed: FileName[]): void;
17
+ contentNotices(notices: ContentNotices, sourceDirectory: DirectoryPath): void;
18
+ unplacedSamples(endpoints: string[]): void;
19
+ artifactsIncomplete(missing: MissingArtifacts): void;
20
+ }
@@ -0,0 +1,36 @@
1
+ import { log } from '@clack/prompts';
2
+ import { format as f } from '../format.js';
3
+ import { describeMissingArtifacts, generateArtifacts } from './artifacts.js';
4
+ import { reportAuthorizationFailure } from './authorization.js';
5
+ import { reportUnplacedSamples } from './code-samples.js';
6
+ import { reportContentNotices, reportShadowedFiles, reportSourceProblem } from './source.js';
7
+ /** What both `portal generate` and `portal serve` say while the project they share is prepared. */
8
+ export class PreparePortalProjectPrompts {
9
+ runtimeUnsupported(reason) {
10
+ log.error(reason);
11
+ }
12
+ authorizationFailed(failure) {
13
+ reportAuthorizationFailure(failure);
14
+ }
15
+ generateArtifacts(fn) {
16
+ return generateArtifacts(fn);
17
+ }
18
+ sourceProblem(problem, sourceDirectory) {
19
+ reportSourceProblem(problem, sourceDirectory);
20
+ }
21
+ filesShadowedByStatic(shadowed) {
22
+ reportShadowedFiles(shadowed);
23
+ }
24
+ contentNotices(notices, sourceDirectory) {
25
+ reportContentNotices(notices, sourceDirectory);
26
+ }
27
+ unplacedSamples(endpoints) {
28
+ reportUnplacedSamples(endpoints);
29
+ }
30
+ // A run delivers everything or nothing, so a gap is the server's, and trying again is the fix.
31
+ artifactsIncomplete(missing) {
32
+ log.error(`The portal artifacts did not include ${describeMissingArtifacts(missing)}, which the portal's pages ` +
33
+ `need. Try again, and if it keeps happening, reach out to our team at ${f.var('support@apimatic.io')}.`);
34
+ }
35
+ }
36
+ //# sourceMappingURL=prepare-project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepare-project.js","sourceRoot":"","sources":["../../../src/prompts/portal/prepare-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAUrC,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAE7F,mGAAmG;AACnG,MAAM,OAAO,2BAA2B;IAC/B,kBAAkB,CAAC,MAAc;QACtC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;IAEM,mBAAmB,CAAC,OAAmC;QAC5D,0BAA0B,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IAEM,iBAAiB,CAAC,EAAkD;QACzE,OAAO,iBAAiB,CAAC,EAAE,CAAC,CAAC;IAC/B,CAAC;IAEM,aAAa,CAAC,OAA4B,EAAE,eAA8B;QAC/E,mBAAmB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IAChD,CAAC;IAEM,qBAAqB,CAAC,QAAoB;QAC/C,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;IAEM,cAAc,CAAC,OAAuB,EAAE,eAA8B;QAC3E,oBAAoB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IACjD,CAAC;IAEM,eAAe,CAAC,SAAmB;QACxC,qBAAqB,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC;IAED,+FAA+F;IACxF,mBAAmB,CAAC,OAAyB;QAClD,GAAG,CAAC,KAAK,CACP,wCAAwC,wBAAwB,CAAC,OAAO,CAAC,6BAA6B;YACpG,wEAAwE,CAAC,CAAC,GAAG,CAAC,qBAAqB,CAAC,GAAG,CAC1G,CAAC;IACJ,CAAC;CACF"}
@@ -1,15 +1,35 @@
1
- import { UrlPath } from "../../types/file/urlPath.js";
2
- import { DirectoryPath } from "../../types/file/directoryPath.js";
1
+ import { DirectoryPath } from '../../types/file/directoryPath.js';
2
+ import { UrlPath } from '../../types/file/urlPath.js';
3
+ import { ContentNotices } from '../../types/portal/content-notices.js';
4
+ import { MissingArtifacts } from '../../types/portal/generated-pages.js';
5
+ import { ContentProblem, PortalSourceProblem } from '../../types/portal/portal-source.js';
6
+ import { PortalDevServer, PortalDevServerFailure } from '../../infrastructure/portal-dev-server-service.js';
7
+ import { Result } from 'neverthrow';
3
8
  export declare class PortalServePrompts {
4
- usingFallbackPort(currentPort: number, availablePort: number): void;
5
- serverStartFailed(port: number): void;
6
- noPortalSource(buildDirectory: DirectoryPath): void;
7
- invalidBuildConfig(buildDirectory: DirectoryPath): void;
8
- baseUrlPortUpdated(updatedUrl: UrlPath): void;
9
- portalServed(urlPath: UrlPath): void;
10
- promptForExit(): void;
11
- changesDetected(): void;
12
- watcherError(): void;
9
+ usingFallbackPort(requestedPort: number, availablePort: number): void;
10
+ /** The first start of a project pre-bundles dependencies and can take a minute. */
11
+ startPreview(fn: Promise<Result<PortalDevServer, PortalDevServerFailure>>): Promise<Result<PortalDevServer, PortalDevServerFailure>>;
12
+ startFailed(output: string): void;
13
+ portalServed(url: UrlPath, sourceDirectory: DirectoryPath): void;
14
+ configApplied(): void;
15
+ /** Explained as `portal generate` would explain it, since the same rules refused it. */
16
+ configRejected(problem: PortalSourceProblem, sourceDirectory: DirectoryPath): void;
17
+ editNeedsRestart(missing: MissingArtifacts): void;
18
+ configNotApplied(reason: string): void;
19
+ /** Vite reads its public directory once, and a missing one is served as none. */
20
+ staticDirectoryNotServed(sourceDirectory: DirectoryPath): void;
21
+ configNotWatched(reason: string): void;
22
+ configWatchFailed(reason: string): void;
23
+ /** Explained as `portal generate` would explain it, since the same rules refused it. */
24
+ contentRejected(problems: ContentProblem[], sourceDirectory: DirectoryPath): void;
25
+ contentNotApplied(reason: string, sourceDirectory: DirectoryPath): void;
26
+ contentNotChecked(reason: string, sourceDirectory: DirectoryPath): void;
27
+ contentAccepted(sourceDirectory: DirectoryPath): void;
28
+ contentNotices(notices: ContentNotices, sourceDirectory: DirectoryPath): void;
29
+ contentNotWatched(reason: string, sourceDirectory: DirectoryPath): void;
30
+ contentWatchFailed(reason: string, sourceDirectory: DirectoryPath): void;
31
+ stopping(): void;
32
+ /** The preview stopped on its own: whatever it printed on the way out is the explanation. */
33
+ previewStopped(output: string): void;
13
34
  blockExecution(): Promise<void>;
14
- hotReloadEnabled(srcDirectory: DirectoryPath): void;
15
35
  }
@@ -1,54 +1,117 @@
1
- import { log } from "@clack/prompts";
2
- import { format as f } from "../format.js";
3
- import { once } from "events";
4
- import { noteWrapped } from "../prompt.js";
1
+ import { log } from '@clack/prompts';
2
+ import { once } from 'node:events';
3
+ import { APIMATIC_CONFIG_FILE_NAME } from '../../types/apimatic-config/document.js';
4
+ import { NAVIGATION_FILE_NAME } from '../../types/portal/portal-navigation.js';
5
+ import { format as f } from '../format.js';
6
+ import { logTail, noteWrapped, withSpinner } from '../prompt.js';
7
+ import { describeMissingArtifacts } from './artifacts.js';
8
+ import { contentPath, reportContentNotices, reportContentProblems, reportSourceProblem, specPath, staticPath } from './source.js';
5
9
  export class PortalServePrompts {
6
- usingFallbackPort(currentPort, availablePort) {
7
- const message = `Port ${f.var(currentPort.toString())} is already in use. The portal will use port ${f.var(availablePort.toString())} instead.`;
10
+ usingFallbackPort(requestedPort, availablePort) {
11
+ const message = `Port ${f.var(requestedPort.toString())} is already in use. ` +
12
+ `The portal will use port ${f.var(availablePort.toString())} instead.`;
8
13
  log.step(message);
9
14
  }
10
- serverStartFailed(port) {
11
- const message = `Could not start the portal server on port ${f.var(port.toString())}; ` +
12
- `it may have just been taken by another process. Please try again.`;
13
- log.error(message);
15
+ /** The first start of a project pre-bundles dependencies and can take a minute. */
16
+ startPreview(fn) {
17
+ return withSpinner('Starting the portal preview', 'Portal preview ready.', (failure) => failure.message, fn, {
18
+ indicator: 'timer'
19
+ });
14
20
  }
15
- noPortalSource(buildDirectory) {
16
- const message = `No portal source found at ${f.path(buildDirectory)}. ` +
17
- `Run ${f.cmdAlt("apimatic", "portal", "quickstart")} to set one up.`;
18
- log.error(message);
21
+ startFailed(output) {
22
+ const tail = logTail(output);
23
+ if (tail.length > 0) {
24
+ log.message(tail);
25
+ }
19
26
  }
20
- invalidBuildConfig(buildDirectory) {
21
- const message = `Could not read the build configuration in ${f.path(buildDirectory)}. ` +
22
- `Ensure ${f.var("APIMATIC-BUILD.json")} exists and is valid JSON.`;
23
- log.error(message);
27
+ portalServed(url, sourceDirectory) {
28
+ log.message(`The portal is running at ${f.link(url.toString())}`);
29
+ noteWrapped([
30
+ `Edits to the Markdown pages in ${contentPath(sourceDirectory)}, to the order, tabs and titles in a ` +
31
+ `${f.var(NAVIGATION_FILE_NAME)}, and to the ${f.var('portal')} block of ` +
32
+ `${f.var(APIMATIC_CONFIG_FILE_NAME)} appear in the browser automatically, and so does a language ` +
33
+ `removed from its ${f.var('languages')} block, which updates the SDK pages, or its ${f.var('plugin')} ` +
34
+ `block removed, which removes the Context Plugin tab. A mistake in ${f.var(APIMATIC_CONFIG_FILE_NAME)}, ` +
35
+ `a page or a ${f.var(NAVIGATION_FILE_NAME)} is reported when you save it, and the preview keeps what it ` +
36
+ `last accepted.`,
37
+ '',
38
+ `Adding a language or a ${f.var('plugin')} block, whose SDK or plugin is fetched when the preview ` +
39
+ `starts, adding or removing a page in ${contentPath(sourceDirectory)}, creating ` +
40
+ `${staticPath(sourceDirectory)}, or changing which documents are in ${specPath(sourceDirectory)} ` +
41
+ `needs the preview restarted.`,
42
+ '',
43
+ 'Press CTRL+C to stop the server.'
44
+ ].join('\n'), 'Live preview');
24
45
  }
25
- baseUrlPortUpdated(updatedUrl) {
26
- const message = `Updated the base URL in ${f.var("APIMATIC-BUILD.json")} to ${f.var(updatedUrl.toString())} to match the serve port.`;
27
- log.info(message);
46
+ configApplied() {
47
+ log.success(`Applied the changes to ${f.var(APIMATIC_CONFIG_FILE_NAME)}.`);
28
48
  }
29
- portalServed(urlPath) {
30
- const message = `The portal is running at ${f.link(urlPath.toString())}`;
31
- log.message(message);
49
+ /** Explained as `portal generate` would explain it, since the same rules refused it. */
50
+ configRejected(problem, sourceDirectory) {
51
+ reportSourceProblem(problem, sourceDirectory, { offerQuickstart: false });
52
+ log.message('The preview keeps showing what it last accepted until the file is fixed.');
32
53
  }
33
- promptForExit() {
34
- const message = "Press CTRL+C to stop the server.";
35
- log.message(message);
54
+ // The artifacts are fetched once, before the preview starts.
55
+ editNeedsRestart(missing) {
56
+ log.warn(`This edit to ${f.var(APIMATIC_CONFIG_FILE_NAME)} needs ${describeMissingArtifacts(missing)}, which the ` +
57
+ `preview was started without. Restart the preview to fetch them; until then it keeps showing what ` +
58
+ `it last accepted.`);
36
59
  }
37
- changesDetected() {
38
- const message = "Changes detected...";
39
- log.info(message);
60
+ configNotApplied(reason) {
61
+ log.warn(`The changes to ${f.var(APIMATIC_CONFIG_FILE_NAME)} could not be applied to the preview: ${reason}`);
40
62
  }
41
- watcherError() {
42
- const message = `An unexpected error occurred while watching your build folder for changes. Please try again later. If the issue persists, contact our team at ${f.var("support@apimatic.io")}`;
43
- log.error(message);
63
+ /** Vite reads its public directory once, and a missing one is served as none. */
64
+ staticDirectoryNotServed(sourceDirectory) {
65
+ const message = `${staticPath(sourceDirectory)} did not exist when the preview started, so the files ` +
66
+ `in it are not served. Restart the preview to show them.`;
67
+ log.warn(message);
44
68
  }
45
- async blockExecution() {
46
- await Promise.race([once(process, "SIGINT"), once(process, "SIGTERM")]);
69
+ configNotWatched(reason) {
70
+ log.warn(`${f.var(APIMATIC_CONFIG_FILE_NAME)} cannot be watched (${reason}), so edits to it need the preview restarted.`);
71
+ }
72
+ configWatchFailed(reason) {
73
+ log.warn(`${f.var(APIMATIC_CONFIG_FILE_NAME)} is no longer watched (${reason}), so further edits to it need the ` +
74
+ `preview restarted.`);
75
+ }
76
+ /** Explained as `portal generate` would explain it, since the same rules refused it. */
77
+ contentRejected(problems, sourceDirectory) {
78
+ reportContentProblems(problems, sourceDirectory);
79
+ log.message(`The preview keeps showing what it last accepted until ${contentPath(sourceDirectory)} is ` +
80
+ `fixed; a build would stop here.`);
81
+ }
82
+ contentNotApplied(reason, sourceDirectory) {
83
+ log.warn(`The changes to ${contentPath(sourceDirectory)} could not be applied to the preview: ${reason}`);
84
+ }
85
+ contentNotChecked(reason, sourceDirectory) {
86
+ log.warn(`The changes to ${contentPath(sourceDirectory)} could not be checked: ${reason}`);
87
+ }
88
+ contentAccepted(sourceDirectory) {
89
+ log.success(`${contentPath(sourceDirectory)} is fixed; a build would accept it again.`);
47
90
  }
48
- hotReloadEnabled(srcDirectory) {
49
- noteWrapped(`Hot reload is enabled.
50
-
51
- Watching the directory ${f.path(srcDirectory)} for any changes`, `Note`);
91
+ contentNotices(notices, sourceDirectory) {
92
+ reportContentNotices(notices, sourceDirectory);
93
+ }
94
+ contentNotWatched(reason, sourceDirectory) {
95
+ log.warn(`${contentPath(sourceDirectory)} cannot be watched (${reason}), so a mistake in a page or a ` +
96
+ `${f.var(NAVIGATION_FILE_NAME)} is only reported when the preview is restarted.`);
97
+ }
98
+ contentWatchFailed(reason, sourceDirectory) {
99
+ log.warn(`${contentPath(sourceDirectory)} is no longer watched (${reason}), so a mistake in a page or ` +
100
+ `a ${f.var(NAVIGATION_FILE_NAME)} is only reported when the preview is restarted.`);
101
+ }
102
+ stopping() {
103
+ log.info('Stopping the portal preview.');
104
+ }
105
+ /** The preview stopped on its own: whatever it printed on the way out is the explanation. */
106
+ previewStopped(output) {
107
+ log.error('The portal preview stopped unexpectedly.');
108
+ const tail = logTail(output);
109
+ if (tail.length > 0) {
110
+ log.message(tail);
111
+ }
112
+ }
113
+ async blockExecution() {
114
+ await Promise.race([once(process, 'SIGINT'), once(process, 'SIGTERM')]);
52
115
  }
53
116
  }
54
117
  //# sourceMappingURL=serve.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"serve.js","sourceRoot":"","sources":["../../../src/prompts/portal/serve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,OAAO,kBAAkB;IACtB,iBAAiB,CAAC,WAAmB,EAAE,aAAqB;QACjE,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,gDAAgD,CAAC,CAAC,GAAG,CACxG,aAAa,CAAC,QAAQ,EAAE,CACzB,WAAW,CAAC;QACb,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpB,CAAC;IAEM,iBAAiB,CAAC,IAAY;QACnC,MAAM,OAAO,GACX,6CAA6C,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,IAAI;YACvE,mEAAmE,CA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C,kDAAkD,CACrF,CAAC;IACJ,CAAC;IAEM,QAAQ;QACb,GAAG,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;IAC3C,CAAC;IAED,6FAA6F;IACtF,cAAc,CAAC,MAAc;QAClC,GAAG,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;QACtD,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;QAC7B,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpB,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,cAAc;QACzB,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IAC1E,CAAC;CACF"}
@@ -0,0 +1,26 @@
1
+ import { DirectoryPath } from '../../types/file/directoryPath.js';
2
+ import { ContentNotices } from '../../types/portal/content-notices.js';
3
+ import { ContentProblem, PortalSourceProblem } from '../../types/portal/portal-source.js';
4
+ import { SharedTabName } from '../../types/portal/portal-tabs.js';
5
+ import { FileName } from '../../types/file/fileName.js';
6
+ import { FilePath } from '../../types/file/filePath.js';
7
+ export declare const specPath: (sourceDirectory: DirectoryPath) => string;
8
+ export declare const contentPath: (sourceDirectory: DirectoryPath) => string;
9
+ export declare const staticPath: (sourceDirectory: DirectoryPath) => string;
10
+ export declare const convertToOpenApi3: () => string;
11
+ /**
12
+ * Shared by `portal generate` and `portal serve`: both read the same source directory, so
13
+ * a broken one has to be explained the same way in both. `offerQuickstart` is false once a
14
+ * preview of the directory is running: quickstart refuses a directory that is not empty.
15
+ */
16
+ export declare function reportSourceProblem(problem: PortalSourceProblem, sourceDirectory: DirectoryPath, { offerQuickstart }?: {
17
+ offerQuickstart?: boolean;
18
+ }): void;
19
+ /** Each problem in turn, so one run lists everything a build would refuse in `content/`. */
20
+ export declare function reportContentProblems(problems: ContentProblem[], sourceDirectory: DirectoryPath): void;
21
+ export declare function reportShadowedFiles(shadowed: FileName[]): void;
22
+ export declare function reportIgnoredNavigationFiles(files: FilePath[], sourceDirectory: DirectoryPath): void;
23
+ export declare function reportContentNotices(notices: ContentNotices, sourceDirectory: DirectoryPath): void;
24
+ export declare function reportFolderTabs(folders: DirectoryPath[]): void;
25
+ export declare function reportSharedTabNames(shared: SharedTabName[], sourceDirectory: DirectoryPath): void;
26
+ export declare function reportHiddenPages(files: FilePath[], sourceDirectory: DirectoryPath): void;