@synteq/cli 0.2.0 → 1.1.2

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 (433) hide show
  1. package/dist/api/client.d.ts +362 -5
  2. package/dist/api/client.js +559 -44
  3. package/dist/api/client.js.map +1 -1
  4. package/dist/api/factory.js +5 -2
  5. package/dist/api/factory.js.map +1 -1
  6. package/dist/api/types.d.ts +892 -3
  7. package/dist/apps-support/deploy.d.ts +197 -0
  8. package/dist/apps-support/deploy.js +639 -0
  9. package/dist/apps-support/deploy.js.map +1 -0
  10. package/dist/apps-support/dotenv.d.ts +67 -0
  11. package/dist/apps-support/dotenv.js +136 -0
  12. package/dist/apps-support/dotenv.js.map +1 -0
  13. package/dist/apps-support/env-rollout.d.ts +18 -0
  14. package/dist/apps-support/env-rollout.js +52 -0
  15. package/dist/apps-support/env-rollout.js.map +1 -0
  16. package/dist/apps-support/git.d.ts +14 -0
  17. package/dist/apps-support/git.js +25 -0
  18. package/dist/apps-support/git.js.map +1 -0
  19. package/dist/apps-support/link.d.ts +25 -0
  20. package/dist/apps-support/link.js +39 -0
  21. package/dist/apps-support/link.js.map +1 -0
  22. package/dist/apps-support/log-stream.d.ts +25 -0
  23. package/dist/apps-support/log-stream.js +85 -0
  24. package/dist/apps-support/log-stream.js.map +1 -0
  25. package/dist/apps-support/paid-app.d.ts +64 -0
  26. package/dist/apps-support/paid-app.js +195 -0
  27. package/dist/apps-support/paid-app.js.map +1 -0
  28. package/dist/apps-support/plans.d.ts +44 -0
  29. package/dist/apps-support/plans.js +43 -0
  30. package/dist/apps-support/plans.js.map +1 -0
  31. package/dist/apps-support/resolve.d.ts +10 -0
  32. package/dist/apps-support/resolve.js +53 -0
  33. package/dist/apps-support/resolve.js.map +1 -0
  34. package/dist/apps-support/time.d.ts +20 -0
  35. package/dist/apps-support/time.js +82 -0
  36. package/dist/apps-support/time.js.map +1 -0
  37. package/dist/auth/scope.js +4 -0
  38. package/dist/auth/scope.js.map +1 -1
  39. package/dist/auth/tokens.d.ts +3 -0
  40. package/dist/auth/tokens.js +6 -4
  41. package/dist/auth/tokens.js.map +1 -1
  42. package/dist/base/command.d.ts +35 -0
  43. package/dist/base/command.js +87 -4
  44. package/dist/base/command.js.map +1 -1
  45. package/dist/commands/agents.d.ts +10 -0
  46. package/dist/commands/agents.js +53 -0
  47. package/dist/commands/agents.js.map +1 -0
  48. package/dist/commands/api.d.ts +0 -1
  49. package/dist/commands/api.js +6 -5
  50. package/dist/commands/api.js.map +1 -1
  51. package/dist/commands/app/deployment/list.d.ts +14 -0
  52. package/dist/commands/app/deployment/list.js +45 -0
  53. package/dist/commands/app/deployment/list.js.map +1 -0
  54. package/dist/commands/app/deployment/rollback.d.ts +18 -0
  55. package/dist/commands/app/deployment/rollback.js +57 -0
  56. package/dist/commands/app/deployment/rollback.js.map +1 -0
  57. package/dist/commands/app/deployment/show.d.ts +26 -0
  58. package/dist/commands/app/deployment/show.js +98 -0
  59. package/dist/commands/app/deployment/show.js.map +1 -0
  60. package/dist/commands/app/domain/add.d.ts +17 -0
  61. package/dist/commands/app/domain/add.js +59 -0
  62. package/dist/commands/app/domain/add.js.map +1 -0
  63. package/dist/commands/app/domain/list.d.ts +14 -0
  64. package/dist/commands/app/domain/list.js +42 -0
  65. package/dist/commands/app/domain/list.js.map +1 -0
  66. package/dist/commands/app/domain/remove.d.ts +16 -0
  67. package/dist/commands/app/domain/remove.js +51 -0
  68. package/dist/commands/app/domain/remove.js.map +1 -0
  69. package/dist/commands/app/domain/verify.d.ts +15 -0
  70. package/dist/commands/app/domain/verify.js +39 -0
  71. package/dist/commands/app/domain/verify.js.map +1 -0
  72. package/dist/commands/app/env/add.d.ts +22 -0
  73. package/dist/commands/app/env/add.js +103 -0
  74. package/dist/commands/app/env/add.js.map +1 -0
  75. package/dist/commands/app/env/list.d.ts +17 -0
  76. package/dist/commands/app/env/list.js +40 -0
  77. package/dist/commands/app/env/list.js.map +1 -0
  78. package/dist/commands/app/env/reveal.d.ts +17 -0
  79. package/dist/commands/app/env/reveal.js +40 -0
  80. package/dist/commands/app/env/reveal.js.map +1 -0
  81. package/dist/commands/app/env/rm.d.ts +16 -0
  82. package/dist/commands/app/env/rm.js +48 -0
  83. package/dist/commands/app/env/rm.js.map +1 -0
  84. package/dist/commands/app/health.d.ts +14 -0
  85. package/dist/commands/app/health.js +40 -0
  86. package/dist/commands/app/health.js.map +1 -0
  87. package/dist/commands/app/index.d.ts +6 -0
  88. package/dist/commands/app/index.js +7 -0
  89. package/dist/commands/app/index.js.map +1 -0
  90. package/dist/commands/app/link.d.ts +22 -0
  91. package/dist/commands/app/link.js +31 -0
  92. package/dist/commands/app/link.js.map +1 -0
  93. package/dist/commands/app/logs.d.ts +25 -0
  94. package/dist/commands/app/logs.js +121 -0
  95. package/dist/commands/app/logs.js.map +1 -0
  96. package/dist/commands/app/metrics.d.ts +21 -0
  97. package/dist/commands/app/metrics.js +123 -0
  98. package/dist/commands/app/metrics.js.map +1 -0
  99. package/dist/commands/app/plan/change.d.ts +18 -0
  100. package/dist/commands/app/plan/change.js +79 -0
  101. package/dist/commands/app/plan/change.js.map +1 -0
  102. package/dist/commands/app/plan/show.d.ts +14 -0
  103. package/dist/commands/app/plan/show.js +40 -0
  104. package/dist/commands/app/plan/show.js.map +1 -0
  105. package/dist/commands/app/settings/set.d.ts +25 -0
  106. package/dist/commands/app/settings/set.js +96 -0
  107. package/dist/commands/app/settings/set.js.map +1 -0
  108. package/dist/commands/app/settings/show.d.ts +14 -0
  109. package/dist/commands/app/settings/show.js +48 -0
  110. package/dist/commands/app/settings/show.js.map +1 -0
  111. package/dist/commands/app/unlink.d.ts +8 -0
  112. package/dist/commands/app/unlink.js +25 -0
  113. package/dist/commands/app/unlink.js.map +1 -0
  114. package/dist/commands/apps/create.d.ts +26 -0
  115. package/dist/commands/apps/create.js +91 -0
  116. package/dist/commands/apps/create.js.map +1 -0
  117. package/dist/commands/apps/list.d.ts +17 -0
  118. package/dist/commands/apps/list.js +56 -0
  119. package/dist/commands/apps/list.js.map +1 -0
  120. package/dist/commands/baremetal/activity.d.ts +14 -0
  121. package/dist/commands/baremetal/activity.js +53 -0
  122. package/dist/commands/baremetal/activity.js.map +1 -0
  123. package/dist/commands/baremetal/bandwidth.d.ts +10 -0
  124. package/dist/commands/baremetal/bandwidth.js +86 -0
  125. package/dist/commands/baremetal/bandwidth.js.map +1 -0
  126. package/dist/commands/baremetal/console.d.ts +20 -0
  127. package/dist/commands/baremetal/console.js +72 -0
  128. package/dist/commands/baremetal/console.js.map +1 -0
  129. package/dist/commands/baremetal/details.d.ts +11 -0
  130. package/dist/commands/baremetal/details.js +116 -0
  131. package/dist/commands/baremetal/details.js.map +1 -0
  132. package/dist/commands/baremetal/index.d.ts +5 -0
  133. package/dist/commands/baremetal/index.js +6 -0
  134. package/dist/commands/baremetal/index.js.map +1 -0
  135. package/dist/commands/baremetal/install-password.d.ts +14 -0
  136. package/dist/commands/baremetal/install-password.js +80 -0
  137. package/dist/commands/baremetal/install-password.js.map +1 -0
  138. package/dist/commands/baremetal/list.d.ts +11 -0
  139. package/dist/commands/baremetal/list.js +59 -0
  140. package/dist/commands/baremetal/list.js.map +1 -0
  141. package/dist/commands/baremetal/order.d.ts +34 -0
  142. package/dist/commands/baremetal/order.js +394 -0
  143. package/dist/commands/baremetal/order.js.map +1 -0
  144. package/dist/commands/baremetal/power.d.ts +18 -0
  145. package/dist/commands/baremetal/power.js +168 -0
  146. package/dist/commands/baremetal/power.js.map +1 -0
  147. package/dist/commands/baremetal/reinstall.d.ts +21 -0
  148. package/dist/commands/baremetal/reinstall.js +168 -0
  149. package/dist/commands/baremetal/reinstall.js.map +1 -0
  150. package/dist/commands/config/profile/add.d.ts +11 -0
  151. package/dist/commands/config/profile/add.js +51 -0
  152. package/dist/commands/config/profile/add.js.map +1 -0
  153. package/dist/commands/config/profile/list.d.ts +7 -0
  154. package/dist/commands/config/profile/list.js +29 -0
  155. package/dist/commands/config/profile/list.js.map +1 -0
  156. package/dist/commands/config/profile/remove.d.ts +11 -0
  157. package/dist/commands/config/profile/remove.js +35 -0
  158. package/dist/commands/config/profile/remove.js.map +1 -0
  159. package/dist/commands/config/profile/use.d.ts +10 -0
  160. package/dist/commands/config/profile/use.js +44 -0
  161. package/dist/commands/config/profile/use.js.map +1 -0
  162. package/dist/commands/config/show.js +4 -1
  163. package/dist/commands/config/show.js.map +1 -1
  164. package/dist/commands/credits/add.js +2 -2
  165. package/dist/commands/credits/add.js.map +1 -1
  166. package/dist/commands/credits/index.js +5 -1
  167. package/dist/commands/credits/index.js.map +1 -1
  168. package/dist/commands/deploy.d.ts +51 -0
  169. package/dist/commands/deploy.js +515 -0
  170. package/dist/commands/deploy.js.map +1 -0
  171. package/dist/commands/function/create.d.ts +29 -0
  172. package/dist/commands/function/create.js +113 -0
  173. package/dist/commands/function/create.js.map +1 -0
  174. package/dist/commands/function/credits/add.d.ts +29 -0
  175. package/dist/commands/function/credits/add.js +209 -0
  176. package/dist/commands/function/credits/add.js.map +1 -0
  177. package/dist/commands/function/credits/auto-reload.d.ts +27 -0
  178. package/dist/commands/function/credits/auto-reload.js +107 -0
  179. package/dist/commands/function/credits/auto-reload.js.map +1 -0
  180. package/dist/commands/function/credits/index.d.ts +22 -0
  181. package/dist/commands/function/credits/index.js +80 -0
  182. package/dist/commands/function/credits/index.js.map +1 -0
  183. package/dist/commands/function/cron/add.d.ts +19 -0
  184. package/dist/commands/function/cron/add.js +74 -0
  185. package/dist/commands/function/cron/add.js.map +1 -0
  186. package/dist/commands/function/cron/list.d.ts +12 -0
  187. package/dist/commands/function/cron/list.js +55 -0
  188. package/dist/commands/function/cron/list.js.map +1 -0
  189. package/dist/commands/function/cron/rm.d.ts +17 -0
  190. package/dist/commands/function/cron/rm.js +73 -0
  191. package/dist/commands/function/cron/rm.js.map +1 -0
  192. package/dist/commands/function/cron/run.d.ts +16 -0
  193. package/dist/commands/function/cron/run.js +59 -0
  194. package/dist/commands/function/cron/run.js.map +1 -0
  195. package/dist/commands/function/cron/update.d.ts +21 -0
  196. package/dist/commands/function/cron/update.js +87 -0
  197. package/dist/commands/function/cron/update.js.map +1 -0
  198. package/dist/commands/function/delete.d.ts +23 -0
  199. package/dist/commands/function/delete.js +90 -0
  200. package/dist/commands/function/delete.js.map +1 -0
  201. package/dist/commands/function/deploy.d.ts +64 -0
  202. package/dist/commands/function/deploy.js +616 -0
  203. package/dist/commands/function/deploy.js.map +1 -0
  204. package/dist/commands/function/env/list.d.ts +12 -0
  205. package/dist/commands/function/env/list.js +46 -0
  206. package/dist/commands/function/env/list.js.map +1 -0
  207. package/dist/commands/function/env/reveal.d.ts +21 -0
  208. package/dist/commands/function/env/reveal.js +54 -0
  209. package/dist/commands/function/env/reveal.js.map +1 -0
  210. package/dist/commands/function/env/rm.d.ts +17 -0
  211. package/dist/commands/function/env/rm.js +62 -0
  212. package/dist/commands/function/env/rm.js.map +1 -0
  213. package/dist/commands/function/env/set.d.ts +28 -0
  214. package/dist/commands/function/env/set.js +124 -0
  215. package/dist/commands/function/env/set.js.map +1 -0
  216. package/dist/commands/function/index.d.ts +14 -0
  217. package/dist/commands/function/index.js +11 -0
  218. package/dist/commands/function/index.js.map +1 -0
  219. package/dist/commands/function/init.d.ts +48 -0
  220. package/dist/commands/function/init.js +277 -0
  221. package/dist/commands/function/init.js.map +1 -0
  222. package/dist/commands/function/invoke.d.ts +29 -0
  223. package/dist/commands/function/invoke.js +138 -0
  224. package/dist/commands/function/invoke.js.map +1 -0
  225. package/dist/commands/function/link.d.ts +23 -0
  226. package/dist/commands/function/link.js +80 -0
  227. package/dist/commands/function/link.js.map +1 -0
  228. package/dist/commands/function/list.d.ts +16 -0
  229. package/dist/commands/function/list.js +55 -0
  230. package/dist/commands/function/list.js.map +1 -0
  231. package/dist/commands/function/logs.d.ts +29 -0
  232. package/dist/commands/function/logs.js +171 -0
  233. package/dist/commands/function/logs.js.map +1 -0
  234. package/dist/commands/function/pause.d.ts +19 -0
  235. package/dist/commands/function/pause.js +50 -0
  236. package/dist/commands/function/pause.js.map +1 -0
  237. package/dist/commands/function/releases.d.ts +15 -0
  238. package/dist/commands/function/releases.js +62 -0
  239. package/dist/commands/function/releases.js.map +1 -0
  240. package/dist/commands/function/resume.d.ts +16 -0
  241. package/dist/commands/function/resume.js +47 -0
  242. package/dist/commands/function/resume.js.map +1 -0
  243. package/dist/commands/function/rollback.d.ts +18 -0
  244. package/dist/commands/function/rollback.js +69 -0
  245. package/dist/commands/function/rollback.js.map +1 -0
  246. package/dist/commands/function/settings/set.d.ts +23 -0
  247. package/dist/commands/function/settings/set.js +119 -0
  248. package/dist/commands/function/settings/set.js.map +1 -0
  249. package/dist/commands/function/show.d.ts +15 -0
  250. package/dist/commands/function/show.js +80 -0
  251. package/dist/commands/function/show.js.map +1 -0
  252. package/dist/commands/function/unlink.d.ts +9 -0
  253. package/dist/commands/function/unlink.js +34 -0
  254. package/dist/commands/function/unlink.js.map +1 -0
  255. package/dist/commands/link.d.ts +82 -0
  256. package/dist/commands/link.js +532 -0
  257. package/dist/commands/link.js.map +1 -0
  258. package/dist/commands/login.js +9 -0
  259. package/dist/commands/login.js.map +1 -1
  260. package/dist/commands/order.js +3 -1
  261. package/dist/commands/order.js.map +1 -1
  262. package/dist/commands/payments/methods/delete.js +2 -2
  263. package/dist/commands/payments/methods/delete.js.map +1 -1
  264. package/dist/commands/resources.js +50 -7
  265. package/dist/commands/resources.js.map +1 -1
  266. package/dist/commands/status.d.ts +12 -0
  267. package/dist/commands/status.js +71 -0
  268. package/dist/commands/status.js.map +1 -0
  269. package/dist/commands/storage/detach.js +1 -1
  270. package/dist/commands/storage/detach.js.map +1 -1
  271. package/dist/commands/storage/list.js +6 -2
  272. package/dist/commands/storage/list.js.map +1 -1
  273. package/dist/commands/storage/order.d.ts +2 -0
  274. package/dist/commands/storage/order.js +100 -18
  275. package/dist/commands/storage/order.js.map +1 -1
  276. package/dist/commands/storage/resize.js +19 -6
  277. package/dist/commands/storage/resize.js.map +1 -1
  278. package/dist/commands/tickets/create.d.ts +2 -0
  279. package/dist/commands/tickets/create.js +40 -1
  280. package/dist/commands/tickets/create.js.map +1 -1
  281. package/dist/commands/tickets/download.d.ts +18 -0
  282. package/dist/commands/tickets/download.js +138 -0
  283. package/dist/commands/tickets/download.js.map +1 -0
  284. package/dist/commands/tickets/list.js +13 -7
  285. package/dist/commands/tickets/list.js.map +1 -1
  286. package/dist/commands/tickets/reply.d.ts +2 -0
  287. package/dist/commands/tickets/reply.js +33 -4
  288. package/dist/commands/tickets/reply.js.map +1 -1
  289. package/dist/commands/vds/order.js +72 -7
  290. package/dist/commands/vds/order.js.map +1 -1
  291. package/dist/commands/vps/console.js +14 -6
  292. package/dist/commands/vps/console.js.map +1 -1
  293. package/dist/commands/vps/details.js +7 -1
  294. package/dist/commands/vps/details.js.map +1 -1
  295. package/dist/commands/vps/ip/add.js +76 -9
  296. package/dist/commands/vps/ip/add.js.map +1 -1
  297. package/dist/commands/vps/list.js +13 -4
  298. package/dist/commands/vps/list.js.map +1 -1
  299. package/dist/commands/vps/order.d.ts +19 -0
  300. package/dist/commands/vps/order.js +179 -23
  301. package/dist/commands/vps/order.js.map +1 -1
  302. package/dist/commands/vps/power.js +2 -2
  303. package/dist/commands/vps/power.js.map +1 -1
  304. package/dist/commands/vps/reinstall.js +2 -2
  305. package/dist/commands/vps/reinstall.js.map +1 -1
  306. package/dist/commands/vps/resize.js +36 -13
  307. package/dist/commands/vps/resize.js.map +1 -1
  308. package/dist/commands/whoami.d.ts +5 -0
  309. package/dist/commands/whoami.js +8 -3
  310. package/dist/commands/whoami.js.map +1 -1
  311. package/dist/config/paths.d.ts +1 -1
  312. package/dist/config/paths.js +6 -1
  313. package/dist/config/paths.js.map +1 -1
  314. package/dist/config/store.d.ts +58 -0
  315. package/dist/config/store.js +84 -2
  316. package/dist/config/store.js.map +1 -1
  317. package/dist/functions-support/credits.d.ts +64 -0
  318. package/dist/functions-support/credits.js +181 -0
  319. package/dist/functions-support/credits.js.map +1 -0
  320. package/dist/functions-support/cron.d.ts +17 -0
  321. package/dist/functions-support/cron.js +99 -0
  322. package/dist/functions-support/cron.js.map +1 -0
  323. package/dist/functions-support/env.d.ts +23 -0
  324. package/dist/functions-support/env.js +44 -0
  325. package/dist/functions-support/env.js.map +1 -0
  326. package/dist/functions-support/link.d.ts +25 -0
  327. package/dist/functions-support/link.js +51 -0
  328. package/dist/functions-support/link.js.map +1 -0
  329. package/dist/functions-support/poll.d.ts +40 -0
  330. package/dist/functions-support/poll.js +109 -0
  331. package/dist/functions-support/poll.js.map +1 -0
  332. package/dist/functions-support/resolve.d.ts +3 -0
  333. package/dist/functions-support/resolve.js +31 -0
  334. package/dist/functions-support/resolve.js.map +1 -0
  335. package/dist/functions-support/runtime.d.ts +30 -0
  336. package/dist/functions-support/runtime.js +52 -0
  337. package/dist/functions-support/runtime.js.map +1 -0
  338. package/dist/functions-support/source.d.ts +92 -0
  339. package/dist/functions-support/source.js +343 -0
  340. package/dist/functions-support/source.js.map +1 -0
  341. package/dist/help/scope-aware-help.js +10 -1
  342. package/dist/help/scope-aware-help.js.map +1 -1
  343. package/dist/tui/App.js +10 -25
  344. package/dist/tui/App.js.map +1 -1
  345. package/dist/tui/components/Menu.d.ts +3 -1
  346. package/dist/tui/components/Menu.js +7 -3
  347. package/dist/tui/components/Menu.js.map +1 -1
  348. package/dist/tui/router.d.ts +1 -1
  349. package/dist/tui/router.js.map +1 -1
  350. package/dist/tui/screens/Billing.js +56 -4
  351. package/dist/tui/screens/Billing.js.map +1 -1
  352. package/dist/tui/screens/Dashboard.js +8 -7
  353. package/dist/tui/screens/Dashboard.js.map +1 -1
  354. package/dist/tui/screens/Deploy.d.ts +2 -0
  355. package/dist/tui/screens/Deploy.js +912 -0
  356. package/dist/tui/screens/Deploy.js.map +1 -0
  357. package/dist/tui/screens/Order.js +359 -26
  358. package/dist/tui/screens/Order.js.map +1 -1
  359. package/dist/tui/screens/Resources.js +273 -31
  360. package/dist/tui/screens/Resources.js.map +1 -1
  361. package/dist/tui/screens/Tickets.js +18 -6
  362. package/dist/tui/screens/Tickets.js.map +1 -1
  363. package/dist/tui/screens/deployPreset.d.ts +20 -0
  364. package/dist/tui/screens/deployPreset.js +11 -0
  365. package/dist/tui/screens/deployPreset.js.map +1 -0
  366. package/dist/tui/screens/resources/AppDetail.d.ts +7 -0
  367. package/dist/tui/screens/resources/AppDetail.js +810 -0
  368. package/dist/tui/screens/resources/AppDetail.js.map +1 -0
  369. package/dist/tui/screens/resources/FunctionDetail.d.ts +7 -0
  370. package/dist/tui/screens/resources/FunctionDetail.js +751 -0
  371. package/dist/tui/screens/resources/FunctionDetail.js.map +1 -0
  372. package/dist/ui/attach.d.ts +15 -0
  373. package/dist/ui/attach.js +63 -0
  374. package/dist/ui/attach.js.map +1 -0
  375. package/dist/ui/baremetal-resolve.d.ts +10 -0
  376. package/dist/ui/baremetal-resolve.js +50 -0
  377. package/dist/ui/baremetal-resolve.js.map +1 -0
  378. package/dist/ui/confirm.js +1 -1
  379. package/dist/ui/confirm.js.map +1 -1
  380. package/dist/ui/cycle.d.ts +66 -0
  381. package/dist/ui/cycle.js +96 -0
  382. package/dist/ui/cycle.js.map +1 -0
  383. package/dist/ui/deploy-ui.d.ts +75 -0
  384. package/dist/ui/deploy-ui.js +243 -0
  385. package/dist/ui/deploy-ui.js.map +1 -0
  386. package/dist/ui/order-result.d.ts +4 -0
  387. package/dist/ui/order-result.js +32 -0
  388. package/dist/ui/order-result.js.map +1 -0
  389. package/dist/ui/payment-gate.d.ts +26 -0
  390. package/dist/ui/payment-gate.js +70 -0
  391. package/dist/ui/payment-gate.js.map +1 -0
  392. package/dist/ui/payment.js +10 -3
  393. package/dist/ui/payment.js.map +1 -1
  394. package/dist/ui/portal.d.ts +1 -1
  395. package/dist/ui/portal.js +7 -2
  396. package/dist/ui/portal.js.map +1 -1
  397. package/dist/ui/project-resolve.d.ts +25 -0
  398. package/dist/ui/project-resolve.js +31 -0
  399. package/dist/ui/project-resolve.js.map +1 -0
  400. package/dist/ui/render-mode.d.ts +5 -0
  401. package/dist/ui/render-mode.js +1 -1
  402. package/dist/ui/render-mode.js.map +1 -1
  403. package/dist/ui/resource-detail.js +0 -3
  404. package/dist/ui/resource-detail.js.map +1 -1
  405. package/dist/ui/resource-resolve.d.ts +9 -2
  406. package/dist/ui/resource-resolve.js +11 -4
  407. package/dist/ui/resource-resolve.js.map +1 -1
  408. package/dist/ui/spinner.d.ts +10 -1
  409. package/dist/ui/spinner.js +12 -3
  410. package/dist/ui/spinner.js.map +1 -1
  411. package/dist/ui/table.d.ts +7 -0
  412. package/dist/ui/table.js +11 -0
  413. package/dist/ui/table.js.map +1 -1
  414. package/dist/ui/tax.d.ts +10 -0
  415. package/dist/ui/tax.js +31 -0
  416. package/dist/ui/tax.js.map +1 -0
  417. package/dist/ui/ticket-resolve.d.ts +9 -1
  418. package/dist/ui/ticket-resolve.js +13 -2
  419. package/dist/ui/ticket-resolve.js.map +1 -1
  420. package/dist/ui/volume-resolve.js +4 -1
  421. package/dist/ui/volume-resolve.js.map +1 -1
  422. package/dist/ui/wait.d.ts +4 -0
  423. package/dist/ui/wait.js +7 -2
  424. package/dist/ui/wait.js.map +1 -1
  425. package/dist/ui/wizard.d.ts +2 -1
  426. package/dist/ui/wizard.js +1 -1
  427. package/dist/ui/wizard.js.map +1 -1
  428. package/dist/version-check-bin.js +2 -2
  429. package/dist/version-check-bin.js.map +1 -1
  430. package/dist/version-check.d.ts +5 -0
  431. package/dist/version-check.js +6 -1
  432. package/dist/version-check.js.map +1 -1
  433. package/package.json +53 -6
@@ -0,0 +1,119 @@
1
+ import { Args, Flags } from "@oclif/core";
2
+ import { BaseCommand } from "../../../base/command.js";
3
+ import { resolveLinkedFunction } from "../../../functions-support/link.js";
4
+ import { RUNTIMES } from "../../../functions-support/runtime.js";
5
+ import { withSpinner } from "../../../ui/spinner.js";
6
+ import { ok, dim } from "../../../ui/glyphs.js";
7
+ /** `synteq function settings set` — patch one or more of a function's
8
+ * runtime/scaling settings. Only the flags you pass are changed; the rest
9
+ * are left as they are. Backend: PATCH /functions/{id}. The bounds enforced
10
+ * here mirror the portal's Function detail editor so a change made from the
11
+ * terminal is accepted on exactly the same terms as one made in the TUI. */
12
+ export default class FunctionSettingsSet extends BaseCommand {
13
+ static apiKeyScope = "none";
14
+ static description = "Change a function's runtime and scaling settings. Only the flags you pass are updated; omit a flag to leave it unchanged.";
15
+ static examples = [
16
+ "<%= config.bin %> function settings set --concurrency 20 # bare: this directory's linked function",
17
+ "<%= config.bin %> function settings set my-fn --timeout 120 --max-instances 5",
18
+ "<%= config.bin %> function settings set --min-instances 1 --max-instances 10 --name my-fn",
19
+ "<%= config.bin %> function settings set --runtime python312 --name my-fn -o json",
20
+ ];
21
+ static args = {
22
+ name: Args.string({
23
+ description: "Function slug (or uuid). Omit to use this directory's linked function.",
24
+ }),
25
+ };
26
+ static flags = {
27
+ name: Flags.string({
28
+ description: "Function slug (or uuid) — the flag form of the positional arg.",
29
+ }),
30
+ runtime: Flags.string({
31
+ options: [...RUNTIMES],
32
+ description: `Handler runtime: ${RUNTIMES.join(" or ")}.`,
33
+ }),
34
+ concurrency: Flags.integer({
35
+ description: "Requests a single instance serves at once (1-100).",
36
+ }),
37
+ timeout: Flags.integer({
38
+ description: "Per-invocation timeout, in seconds (1-900).",
39
+ }),
40
+ "min-instances": Flags.integer({
41
+ description: "Instances kept warm at all times (0 = scale to zero). Can't exceed --max-instances.",
42
+ }),
43
+ "max-instances": Flags.integer({
44
+ description: "Ceiling on concurrently running instances (at least 1).",
45
+ }),
46
+ };
47
+ async run() {
48
+ await this.initClients();
49
+ const { args, flags } = await this.parse(FunctionSettingsSet);
50
+ try {
51
+ // Build and validate the patch BEFORE resolving the function, so a
52
+ // bad value fails fast without a network round-trip. The bounds match
53
+ // the portal's Function detail editor (conc 1..100, timeout 1..900,
54
+ // min <= max) so the CLI accepts exactly what the TUI does.
55
+ const patch = {};
56
+ if (flags.runtime !== undefined)
57
+ patch.runtime = flags.runtime;
58
+ if (flags.concurrency !== undefined) {
59
+ // Flags.integer already rejects non-integers at parse, so only the
60
+ // range needs checking here.
61
+ if (flags.concurrency < 1 || flags.concurrency > 100) {
62
+ this.error("Concurrency must be between 1 and 100.", { exit: 1 });
63
+ }
64
+ patch.concurrency = flags.concurrency;
65
+ }
66
+ if (flags.timeout !== undefined) {
67
+ if (flags.timeout < 1 || flags.timeout > 900) {
68
+ this.error("Timeout must be between 1 and 900 seconds.", { exit: 1 });
69
+ }
70
+ patch.timeoutSeconds = flags.timeout;
71
+ }
72
+ if (flags["min-instances"] !== undefined) {
73
+ if (flags["min-instances"] < 0) {
74
+ this.error("Min instances must be 0 or more.", { exit: 1 });
75
+ }
76
+ patch.minInstances = flags["min-instances"];
77
+ }
78
+ if (flags["max-instances"] !== undefined) {
79
+ if (flags["max-instances"] < 1) {
80
+ this.error("Max instances must be 1 or more.", { exit: 1 });
81
+ }
82
+ patch.maxInstances = flags["max-instances"];
83
+ }
84
+ if (patch.minInstances !== undefined &&
85
+ patch.maxInstances !== undefined &&
86
+ patch.minInstances > patch.maxInstances) {
87
+ this.error(`Min instances (${patch.minInstances}) can't exceed max instances (${patch.maxInstances}).`, { exit: 1 });
88
+ }
89
+ if (Object.keys(patch).length === 0) {
90
+ this.error("Nothing to change — pass at least one setting flag (see --help).", { exit: 1 });
91
+ }
92
+ const { fn, clients } = await resolveLinkedFunction(this.clients, {
93
+ ...flags,
94
+ name: args.name ?? flags.name,
95
+ });
96
+ this.clients = clients;
97
+ // When only one of min/max is given, the both-flags check above can't
98
+ // fire — compare the one passed against the function's current other
99
+ // bound, as the portal's Function detail editor does. (This needs the
100
+ // resolved fn, so it is the one check that runs after the fetch.)
101
+ if ((patch.minInstances !== undefined) !== (patch.maxInstances !== undefined)) {
102
+ const effMin = patch.minInstances ?? fn.minInstances;
103
+ const effMax = patch.maxInstances ?? fn.maxInstances;
104
+ if (effMin > effMax) {
105
+ this.error(`Min instances (${effMin}) can't exceed max instances (${effMax}).`, { exit: 1 });
106
+ }
107
+ }
108
+ const updated = await withSpinner("Saving settings", () => this.clients.api.functions.update(fn.id, patch));
109
+ this.emit(updated, () => {
110
+ this.log(ok(`Updated ${Object.keys(patch).length} setting(s) on ${fn.slug}.`));
111
+ this.log(dim("Run `synteq function show` to see the full config."));
112
+ });
113
+ }
114
+ catch (err) {
115
+ this.fail(err);
116
+ }
117
+ }
118
+ }
119
+ //# sourceMappingURL=set.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set.js","sourceRoot":"","sources":["../../../../src/commands/function/settings/set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAGhD;;;;6EAI6E;AAC7E,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IAC1D,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC;IAC5B,MAAM,CAAC,WAAW,GAChB,2HAA2H,CAAC;IAC9H,MAAM,CAAC,QAAQ,GAAG;QAChB,8GAA8G;QAC9G,+EAA+E;QAC/E,2FAA2F;QAC3F,kFAAkF;KACnF,CAAC;IACF,MAAM,CAAC,IAAI,GAAG;QACZ,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;YAChB,WAAW,EAAE,wEAAwE;SACtF,CAAC;KACH,CAAC;IACF,MAAM,CAAC,KAAK,GAAG;QACb,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE,gEAAgE;SAC9E,CAAC;QACF,OAAO,EAAE,KAAK,CAAC,MAAM,CAA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AC,GAAG,CAAC,GAAG,CAAC,oDAAoD,CAAC,CAAC,CAAC;YACtE,CAAC,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,CAAC;IACH,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { BaseCommand } from "../../base/command.js";
2
+ /** `synteq function show` — everything the Fn row carries, as a panel.
3
+ * Backend: GET /functions/{id} (or a slug lookup against the project list). */
4
+ export default class FunctionShow extends BaseCommand {
5
+ static apiKeyScope: string;
6
+ static description: string;
7
+ static examples: string[];
8
+ static args: {
9
+ name: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
10
+ };
11
+ static flags: {
12
+ name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ };
14
+ run(): Promise<void>;
15
+ }
@@ -0,0 +1,80 @@
1
+ import { Args, Flags } from "@oclif/core";
2
+ import { BaseCommand } from "../../base/command.js";
3
+ import { resolveLinkedFunction } from "../../functions-support/link.js";
4
+ import { panel } from "../../ui/wizard.js";
5
+ import { statusColor, dim, cyan } from "../../ui/glyphs.js";
6
+ import { RUNTIME_LABELS } from "../../functions-support/runtime.js";
7
+ /** `synteq function show` — everything the Fn row carries, as a panel.
8
+ * Backend: GET /functions/{id} (or a slug lookup against the project list). */
9
+ export default class FunctionShow extends BaseCommand {
10
+ static apiKeyScope = "none";
11
+ static description = "Show a function's configuration, current release and health.";
12
+ static examples = [
13
+ "<%= config.bin %> function show # bare: this directory's linked function",
14
+ "<%= config.bin %> function show my-fn",
15
+ "<%= config.bin %> function show my-fn -o json",
16
+ ];
17
+ static args = {
18
+ name: Args.string({
19
+ description: "Function slug (or uuid). Omit to use this directory's linked function.",
20
+ }),
21
+ };
22
+ static flags = {
23
+ name: Flags.string({
24
+ description: "Function slug (or uuid) — same as the positional arg, for symmetry with the other commands.",
25
+ }),
26
+ };
27
+ async run() {
28
+ await this.initClients();
29
+ const { args, flags } = await this.parse(this.ctor);
30
+ try {
31
+ const { fn, clients } = await resolveLinkedFunction(this.clients, {
32
+ ...flags,
33
+ name: args.name ?? flags.name,
34
+ }).catch((e) => {
35
+ if (e instanceof Error && !("status" in e))
36
+ this.error(e.message, { exit: 1 });
37
+ throw e;
38
+ });
39
+ this.clients = clients;
40
+ this.emit(fn, () => {
41
+ const label = RUNTIME_LABELS[fn.runtime];
42
+ this.log(panel(fn.slug, [
43
+ ["Hostname", cyan(`https://${fn.hostname}`)],
44
+ ["ID", dim(fn.id)],
45
+ ["Status", statusColor(fn.status)],
46
+ ["Runtime", label ? `${fn.runtime} ${dim(`(${label})`)}` : fn.runtime],
47
+ ["Plan", `${fn.planTier} ${dim(`${fn.memoryMib} MiB`)}`],
48
+ ["Region", fn.region],
49
+ [
50
+ "Release",
51
+ fn.currentReleaseNumber != null
52
+ ? `#${fn.currentReleaseNumber}${fn.currentReleaseDeployedAt ? ` ${dim(`deployed ${fn.currentReleaseDeployedAt}`)}` : ""}`
53
+ : dim("none yet — run `synteq function deploy`"),
54
+ ],
55
+ ["Concurrency", fn.concurrency],
56
+ ["Timeout", `${fn.timeoutSeconds}s`],
57
+ ["Instances", `min ${fn.minInstances} · max ${fn.maxInstances}`],
58
+ [
59
+ "Budget",
60
+ fn.monthlyBudgetUsd != null
61
+ ? `${statusColor(fn.budgetState)} ${dim(`$${fn.monthlyBudgetUsd}/mo cap`)}`
62
+ : statusColor(fn.budgetState),
63
+ ],
64
+ ["Paused", fn.pausedReason ?? undefined],
65
+ [
66
+ "Health",
67
+ fn.healthStatus
68
+ ? `${statusColor(fn.healthStatus)}${fn.healthCheckedAt ? ` ${dim(`checked ${fn.healthCheckedAt}`)}` : ""}`
69
+ : undefined,
70
+ ],
71
+ ["Created", dim(fn.createdAt)],
72
+ ]));
73
+ });
74
+ }
75
+ catch (err) {
76
+ this.fail(err);
77
+ }
78
+ }
79
+ }
80
+ //# sourceMappingURL=show.js.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this directory's `synteq function init`
3
+ * link. Refuses an APP link so `synteq app unlink` stays the command for those. */
4
+ export default class FunctionUnlink extends BaseCommand {
5
+ static apiKeyScope: string;
6
+ static description: string;
7
+ static examples: string[];
8
+ run(): Promise<void>;
9
+ }
@@ -0,0 +1,34 @@
1
+ import { BaseCommand } from "../../base/command.js";
2
+ import { linkKind } from "../../config/store.js";
3
+ import { ok, dim } from "../../ui/glyphs.js";
4
+ /** `synteq function unlink` — forget this directory's `synteq function init`
5
+ * link. Refuses an APP link so `synteq app unlink` stays the command for those. */
6
+ export default class FunctionUnlink extends BaseCommand {
7
+ static apiKeyScope = "none";
8
+ static description = "Unlink the current directory from its function (forgets the saved link).";
9
+ static examples = [
10
+ "<%= config.bin %> function unlink",
11
+ "<%= config.bin %> function unlink -o json",
12
+ ];
13
+ async run() {
14
+ await this.initClients();
15
+ try {
16
+ const cwd = process.cwd();
17
+ const link = this.clients.config.linkFor(cwd);
18
+ if (link && linkKind(link) === "app") {
19
+ this.error(`This directory is linked to the app "${link.app_slug}", not a function. ` +
20
+ "Use `synteq app unlink` to forget it.", { exit: 1 });
21
+ }
22
+ const removed = this.clients.config.removeLink(cwd);
23
+ this.emit({ directory: cwd, removed }, () => {
24
+ this.log(removed
25
+ ? ok(`Unlinked ${cwd}.`)
26
+ : `No function link stored for ${cwd}. ${dim("(A link on a parent directory still applies — unlink it there.)")}`);
27
+ });
28
+ }
29
+ catch (err) {
30
+ this.fail(err);
31
+ }
32
+ }
33
+ }
34
+ //# sourceMappingURL=unlink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unlink.js","sourceRoot":"","sources":["../../../src/commands/function/unlink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAE7C;oFACoF;AACpF,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW;IACrD,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC;IAC5B,MAAM,CAAC,WAAW,GAAG,0EAA0E,CAAC;IAChG,MAAM,CAAC,QAAQ,GAAG;QAChB,mCAAmC;QACnC,2CAA2C;KAC5C,CAAC;IAEF,KAAK,CAAC,GAAG;QACP,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QACzB,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;YAC1B,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAC9C,IAAI,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC;gBACrC,IAAI,CAAC,KAAK,CACR,wCAAwC,IAAI,CAAC,QAAQ,qBAAqB;oBACxE,uCAAuC,EACzC,EAAE,IAAI,EAAE,CAAC,EAAE,CACZ,CAAC;YACJ,CAAC;YACD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;YACpD,IAAI,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE;gBAC1C,IAAI,CAAC,GAAG,CACN,OAAO;oBACL,CAAC,CAAC,EAAE,CAAC,YAAY,GAAG,GAAG,CAAC;oBACxB,CAAC,CAAC,+BAA+B,GAAG,KAAK,GAAG,CAAC,iEAAiE,CAAC,EAAE,CACpH,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,CAAC;IACH,CAAC"}
@@ -0,0 +1,82 @@
1
+ import { BaseCommand } from "../base/command.js";
2
+ import type { App } from "../api/types.js";
3
+ import type { Clients } from "../api/factory.js";
4
+ import { planCapReason, planLine, type LocationOption } from "../apps-support/plans.js";
5
+ export { planCapReason, planLine };
6
+ /** Slugify a free-form name into a domain slug candidate, matching the web
7
+ * onboarding's slugify (lowercase, non-alnum → hyphen, trim edges). */
8
+ export declare function slugify(name: string): string;
9
+ /** Resolve a location code (dfw) to the region string POST /apps takes; a
10
+ * lone placeable location is taken when none is asked for. */
11
+ export declare function resolveAppRegion(clients: Clients, code: string | undefined, pick: (locations: LocationOption[]) => Promise<string>): Promise<string>;
12
+ /** The first-run team step `synteq deploy` and `synteq function deploy`
13
+ * share: auto-selects a lone team, else asks (default team preselected). */
14
+ export declare function pickTeamId(clients: Clients, log: (line: string) => void): Promise<string>;
15
+ /** The shared project step: the client must already be scoped to the team. */
16
+ export declare function pickProjectId(clients: Clients, log: (line: string) => void): Promise<string>;
17
+ /** Create an app with every input already decided — the scripted path that
18
+ * `synteq deploy --create` uses and the walkthrough ends on. Gates on a
19
+ * saved payment method first (every tier, free included) and refuses a tier
20
+ * the team is already at its cap on, so the create never 4xxs on either. */
21
+ export declare function createApp(clients: Clients, input: {
22
+ slug: string;
23
+ planTier: string;
24
+ region: string;
25
+ projectId?: string;
26
+ }, opts: {
27
+ interactive: boolean;
28
+ log: (line: string) => void;
29
+ paymentMethodId?: string;
30
+ applyCredits?: boolean;
31
+ yes?: boolean;
32
+ }): Promise<App>;
33
+ /**
34
+ * `synteq link` — associate the current directory with an app (the
35
+ * Vercel/Railway "link" model). First-time setup is a walkthrough:
36
+ * pick a team + project, pick or create an app, optionally seed env
37
+ * vars and connect a GitHub repo. The result is saved to the CLI
38
+ * config keyed by this directory, so from then on a bare
39
+ * `synteq deploy` / `synteq app logs` / `synteq app env list` targets the
40
+ * right app with no flags.
41
+ */
42
+ export default class Link extends BaseCommand {
43
+ static apiKeyScope: string;
44
+ static description: string;
45
+ static examples: string[];
46
+ static flags: {
47
+ app: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
48
+ project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
49
+ remove: import("@oclif/core/interfaces").BooleanFlag<boolean>;
50
+ "no-interactive": import("@oclif/core/interfaces").BooleanFlag<boolean>;
51
+ };
52
+ /** What GET /apps/by-repo said about this directory's git origin: the
53
+ * apps that deploy from it (any team), or `null` when the route is not
54
+ * there (an older portal 404s) and the project list has to be scanned
55
+ * instead. Filled by matchByOrigin, read by pickOrCreateApp. */
56
+ private originMatches;
57
+ run(): Promise<void>;
58
+ /** Full first-time setup: team → project → app. Picking an existing app
59
+ * ends there — it is linked, nothing else is asked. Only a NEW app goes
60
+ * on to env vars and GitHub, as part of setting it up. */
61
+ private walkthrough;
62
+ /** Step 0 — the app whose GitHub link is this directory's origin, across
63
+ * every team the user is in. One match asks yes/no; several ask which;
64
+ * none (or a "no") returns null and the full walkthrough runs. */
65
+ private matchByOrigin;
66
+ /** Step 1 — team. Auto-selects when there's only one; --team pre-answers. */
67
+ private pickTeam;
68
+ /** Step 2 — project within the team. Auto-selects a lone project. */
69
+ private pickProject;
70
+ /** Step 3 — pick an existing app in the project, or create a new one. */
71
+ private pickOrCreateApp;
72
+ /** The web /apps onboarding, in the terminal: name → domain slug → plan
73
+ * (free by default) → location. Mirrors NewAppSlideOver's four inputs so a
74
+ * CLI-created app is indistinguishable from a web-created one. */
75
+ private createAppInteractively;
76
+ /** Step 4 (optional) — seed initial env vars. Values are write-only. */
77
+ private offerEnvVars;
78
+ /** Step 5 (optional) — connect a GitHub repo for push-to-deploy. */
79
+ private offerGithub;
80
+ /** The deploy command's build wait, for the build a fresh link started. */
81
+ private waitForLinkBuild;
82
+ }