@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.
- package/dist/api/client.d.ts +362 -5
- package/dist/api/client.js +559 -44
- package/dist/api/client.js.map +1 -1
- package/dist/api/factory.js +5 -2
- package/dist/api/factory.js.map +1 -1
- package/dist/api/types.d.ts +892 -3
- package/dist/apps-support/deploy.d.ts +197 -0
- package/dist/apps-support/deploy.js +639 -0
- package/dist/apps-support/deploy.js.map +1 -0
- package/dist/apps-support/dotenv.d.ts +67 -0
- package/dist/apps-support/dotenv.js +136 -0
- package/dist/apps-support/dotenv.js.map +1 -0
- package/dist/apps-support/env-rollout.d.ts +18 -0
- package/dist/apps-support/env-rollout.js +52 -0
- package/dist/apps-support/env-rollout.js.map +1 -0
- package/dist/apps-support/git.d.ts +14 -0
- package/dist/apps-support/git.js +25 -0
- package/dist/apps-support/git.js.map +1 -0
- package/dist/apps-support/link.d.ts +25 -0
- package/dist/apps-support/link.js +39 -0
- package/dist/apps-support/link.js.map +1 -0
- package/dist/apps-support/log-stream.d.ts +25 -0
- package/dist/apps-support/log-stream.js +85 -0
- package/dist/apps-support/log-stream.js.map +1 -0
- package/dist/apps-support/paid-app.d.ts +64 -0
- package/dist/apps-support/paid-app.js +195 -0
- package/dist/apps-support/paid-app.js.map +1 -0
- package/dist/apps-support/plans.d.ts +44 -0
- package/dist/apps-support/plans.js +43 -0
- package/dist/apps-support/plans.js.map +1 -0
- package/dist/apps-support/resolve.d.ts +10 -0
- package/dist/apps-support/resolve.js +53 -0
- package/dist/apps-support/resolve.js.map +1 -0
- package/dist/apps-support/time.d.ts +20 -0
- package/dist/apps-support/time.js +82 -0
- package/dist/apps-support/time.js.map +1 -0
- package/dist/auth/scope.js +4 -0
- package/dist/auth/scope.js.map +1 -1
- package/dist/auth/tokens.d.ts +3 -0
- package/dist/auth/tokens.js +6 -4
- package/dist/auth/tokens.js.map +1 -1
- package/dist/base/command.d.ts +35 -0
- package/dist/base/command.js +87 -4
- package/dist/base/command.js.map +1 -1
- package/dist/commands/agents.d.ts +10 -0
- package/dist/commands/agents.js +53 -0
- package/dist/commands/agents.js.map +1 -0
- package/dist/commands/api.d.ts +0 -1
- package/dist/commands/api.js +6 -5
- package/dist/commands/api.js.map +1 -1
- package/dist/commands/app/deployment/list.d.ts +14 -0
- package/dist/commands/app/deployment/list.js +45 -0
- package/dist/commands/app/deployment/list.js.map +1 -0
- package/dist/commands/app/deployment/rollback.d.ts +18 -0
- package/dist/commands/app/deployment/rollback.js +57 -0
- package/dist/commands/app/deployment/rollback.js.map +1 -0
- package/dist/commands/app/deployment/show.d.ts +26 -0
- package/dist/commands/app/deployment/show.js +98 -0
- package/dist/commands/app/deployment/show.js.map +1 -0
- package/dist/commands/app/domain/add.d.ts +17 -0
- package/dist/commands/app/domain/add.js +59 -0
- package/dist/commands/app/domain/add.js.map +1 -0
- package/dist/commands/app/domain/list.d.ts +14 -0
- package/dist/commands/app/domain/list.js +42 -0
- package/dist/commands/app/domain/list.js.map +1 -0
- package/dist/commands/app/domain/remove.d.ts +16 -0
- package/dist/commands/app/domain/remove.js +51 -0
- package/dist/commands/app/domain/remove.js.map +1 -0
- package/dist/commands/app/domain/verify.d.ts +15 -0
- package/dist/commands/app/domain/verify.js +39 -0
- package/dist/commands/app/domain/verify.js.map +1 -0
- package/dist/commands/app/env/add.d.ts +22 -0
- package/dist/commands/app/env/add.js +103 -0
- package/dist/commands/app/env/add.js.map +1 -0
- package/dist/commands/app/env/list.d.ts +17 -0
- package/dist/commands/app/env/list.js +40 -0
- package/dist/commands/app/env/list.js.map +1 -0
- package/dist/commands/app/env/reveal.d.ts +17 -0
- package/dist/commands/app/env/reveal.js +40 -0
- package/dist/commands/app/env/reveal.js.map +1 -0
- package/dist/commands/app/env/rm.d.ts +16 -0
- package/dist/commands/app/env/rm.js +48 -0
- package/dist/commands/app/env/rm.js.map +1 -0
- package/dist/commands/app/health.d.ts +14 -0
- package/dist/commands/app/health.js +40 -0
- package/dist/commands/app/health.js.map +1 -0
- package/dist/commands/app/index.d.ts +6 -0
- package/dist/commands/app/index.js +7 -0
- package/dist/commands/app/index.js.map +1 -0
- package/dist/commands/app/link.d.ts +22 -0
- package/dist/commands/app/link.js +31 -0
- package/dist/commands/app/link.js.map +1 -0
- package/dist/commands/app/logs.d.ts +25 -0
- package/dist/commands/app/logs.js +121 -0
- package/dist/commands/app/logs.js.map +1 -0
- package/dist/commands/app/metrics.d.ts +21 -0
- package/dist/commands/app/metrics.js +123 -0
- package/dist/commands/app/metrics.js.map +1 -0
- package/dist/commands/app/plan/change.d.ts +18 -0
- package/dist/commands/app/plan/change.js +79 -0
- package/dist/commands/app/plan/change.js.map +1 -0
- package/dist/commands/app/plan/show.d.ts +14 -0
- package/dist/commands/app/plan/show.js +40 -0
- package/dist/commands/app/plan/show.js.map +1 -0
- package/dist/commands/app/settings/set.d.ts +25 -0
- package/dist/commands/app/settings/set.js +96 -0
- package/dist/commands/app/settings/set.js.map +1 -0
- package/dist/commands/app/settings/show.d.ts +14 -0
- package/dist/commands/app/settings/show.js +48 -0
- package/dist/commands/app/settings/show.js.map +1 -0
- package/dist/commands/app/unlink.d.ts +8 -0
- package/dist/commands/app/unlink.js +25 -0
- package/dist/commands/app/unlink.js.map +1 -0
- package/dist/commands/apps/create.d.ts +26 -0
- package/dist/commands/apps/create.js +91 -0
- package/dist/commands/apps/create.js.map +1 -0
- package/dist/commands/apps/list.d.ts +17 -0
- package/dist/commands/apps/list.js +56 -0
- package/dist/commands/apps/list.js.map +1 -0
- package/dist/commands/baremetal/activity.d.ts +14 -0
- package/dist/commands/baremetal/activity.js +53 -0
- package/dist/commands/baremetal/activity.js.map +1 -0
- package/dist/commands/baremetal/bandwidth.d.ts +10 -0
- package/dist/commands/baremetal/bandwidth.js +86 -0
- package/dist/commands/baremetal/bandwidth.js.map +1 -0
- package/dist/commands/baremetal/console.d.ts +20 -0
- package/dist/commands/baremetal/console.js +72 -0
- package/dist/commands/baremetal/console.js.map +1 -0
- package/dist/commands/baremetal/details.d.ts +11 -0
- package/dist/commands/baremetal/details.js +116 -0
- package/dist/commands/baremetal/details.js.map +1 -0
- package/dist/commands/baremetal/index.d.ts +5 -0
- package/dist/commands/baremetal/index.js +6 -0
- package/dist/commands/baremetal/index.js.map +1 -0
- package/dist/commands/baremetal/install-password.d.ts +14 -0
- package/dist/commands/baremetal/install-password.js +80 -0
- package/dist/commands/baremetal/install-password.js.map +1 -0
- package/dist/commands/baremetal/list.d.ts +11 -0
- package/dist/commands/baremetal/list.js +59 -0
- package/dist/commands/baremetal/list.js.map +1 -0
- package/dist/commands/baremetal/order.d.ts +34 -0
- package/dist/commands/baremetal/order.js +394 -0
- package/dist/commands/baremetal/order.js.map +1 -0
- package/dist/commands/baremetal/power.d.ts +18 -0
- package/dist/commands/baremetal/power.js +168 -0
- package/dist/commands/baremetal/power.js.map +1 -0
- package/dist/commands/baremetal/reinstall.d.ts +21 -0
- package/dist/commands/baremetal/reinstall.js +168 -0
- package/dist/commands/baremetal/reinstall.js.map +1 -0
- package/dist/commands/config/profile/add.d.ts +11 -0
- package/dist/commands/config/profile/add.js +51 -0
- package/dist/commands/config/profile/add.js.map +1 -0
- package/dist/commands/config/profile/list.d.ts +7 -0
- package/dist/commands/config/profile/list.js +29 -0
- package/dist/commands/config/profile/list.js.map +1 -0
- package/dist/commands/config/profile/remove.d.ts +11 -0
- package/dist/commands/config/profile/remove.js +35 -0
- package/dist/commands/config/profile/remove.js.map +1 -0
- package/dist/commands/config/profile/use.d.ts +10 -0
- package/dist/commands/config/profile/use.js +44 -0
- package/dist/commands/config/profile/use.js.map +1 -0
- package/dist/commands/config/show.js +4 -1
- package/dist/commands/config/show.js.map +1 -1
- package/dist/commands/credits/add.js +2 -2
- package/dist/commands/credits/add.js.map +1 -1
- package/dist/commands/credits/index.js +5 -1
- package/dist/commands/credits/index.js.map +1 -1
- package/dist/commands/deploy.d.ts +51 -0
- package/dist/commands/deploy.js +515 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/function/create.d.ts +29 -0
- package/dist/commands/function/create.js +113 -0
- package/dist/commands/function/create.js.map +1 -0
- package/dist/commands/function/credits/add.d.ts +29 -0
- package/dist/commands/function/credits/add.js +209 -0
- package/dist/commands/function/credits/add.js.map +1 -0
- package/dist/commands/function/credits/auto-reload.d.ts +27 -0
- package/dist/commands/function/credits/auto-reload.js +107 -0
- package/dist/commands/function/credits/auto-reload.js.map +1 -0
- package/dist/commands/function/credits/index.d.ts +22 -0
- package/dist/commands/function/credits/index.js +80 -0
- package/dist/commands/function/credits/index.js.map +1 -0
- package/dist/commands/function/cron/add.d.ts +19 -0
- package/dist/commands/function/cron/add.js +74 -0
- package/dist/commands/function/cron/add.js.map +1 -0
- package/dist/commands/function/cron/list.d.ts +12 -0
- package/dist/commands/function/cron/list.js +55 -0
- package/dist/commands/function/cron/list.js.map +1 -0
- package/dist/commands/function/cron/rm.d.ts +17 -0
- package/dist/commands/function/cron/rm.js +73 -0
- package/dist/commands/function/cron/rm.js.map +1 -0
- package/dist/commands/function/cron/run.d.ts +16 -0
- package/dist/commands/function/cron/run.js +59 -0
- package/dist/commands/function/cron/run.js.map +1 -0
- package/dist/commands/function/cron/update.d.ts +21 -0
- package/dist/commands/function/cron/update.js +87 -0
- package/dist/commands/function/cron/update.js.map +1 -0
- package/dist/commands/function/delete.d.ts +23 -0
- package/dist/commands/function/delete.js +90 -0
- package/dist/commands/function/delete.js.map +1 -0
- package/dist/commands/function/deploy.d.ts +64 -0
- package/dist/commands/function/deploy.js +616 -0
- package/dist/commands/function/deploy.js.map +1 -0
- package/dist/commands/function/env/list.d.ts +12 -0
- package/dist/commands/function/env/list.js +46 -0
- package/dist/commands/function/env/list.js.map +1 -0
- package/dist/commands/function/env/reveal.d.ts +21 -0
- package/dist/commands/function/env/reveal.js +54 -0
- package/dist/commands/function/env/reveal.js.map +1 -0
- package/dist/commands/function/env/rm.d.ts +17 -0
- package/dist/commands/function/env/rm.js +62 -0
- package/dist/commands/function/env/rm.js.map +1 -0
- package/dist/commands/function/env/set.d.ts +28 -0
- package/dist/commands/function/env/set.js +124 -0
- package/dist/commands/function/env/set.js.map +1 -0
- package/dist/commands/function/index.d.ts +14 -0
- package/dist/commands/function/index.js +11 -0
- package/dist/commands/function/index.js.map +1 -0
- package/dist/commands/function/init.d.ts +48 -0
- package/dist/commands/function/init.js +277 -0
- package/dist/commands/function/init.js.map +1 -0
- package/dist/commands/function/invoke.d.ts +29 -0
- package/dist/commands/function/invoke.js +138 -0
- package/dist/commands/function/invoke.js.map +1 -0
- package/dist/commands/function/link.d.ts +23 -0
- package/dist/commands/function/link.js +80 -0
- package/dist/commands/function/link.js.map +1 -0
- package/dist/commands/function/list.d.ts +16 -0
- package/dist/commands/function/list.js +55 -0
- package/dist/commands/function/list.js.map +1 -0
- package/dist/commands/function/logs.d.ts +29 -0
- package/dist/commands/function/logs.js +171 -0
- package/dist/commands/function/logs.js.map +1 -0
- package/dist/commands/function/pause.d.ts +19 -0
- package/dist/commands/function/pause.js +50 -0
- package/dist/commands/function/pause.js.map +1 -0
- package/dist/commands/function/releases.d.ts +15 -0
- package/dist/commands/function/releases.js +62 -0
- package/dist/commands/function/releases.js.map +1 -0
- package/dist/commands/function/resume.d.ts +16 -0
- package/dist/commands/function/resume.js +47 -0
- package/dist/commands/function/resume.js.map +1 -0
- package/dist/commands/function/rollback.d.ts +18 -0
- package/dist/commands/function/rollback.js +69 -0
- package/dist/commands/function/rollback.js.map +1 -0
- package/dist/commands/function/settings/set.d.ts +23 -0
- package/dist/commands/function/settings/set.js +119 -0
- package/dist/commands/function/settings/set.js.map +1 -0
- package/dist/commands/function/show.d.ts +15 -0
- package/dist/commands/function/show.js +80 -0
- package/dist/commands/function/show.js.map +1 -0
- package/dist/commands/function/unlink.d.ts +9 -0
- package/dist/commands/function/unlink.js +34 -0
- package/dist/commands/function/unlink.js.map +1 -0
- package/dist/commands/link.d.ts +82 -0
- package/dist/commands/link.js +532 -0
- package/dist/commands/link.js.map +1 -0
- package/dist/commands/login.js +9 -0
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/order.js +3 -1
- package/dist/commands/order.js.map +1 -1
- package/dist/commands/payments/methods/delete.js +2 -2
- package/dist/commands/payments/methods/delete.js.map +1 -1
- package/dist/commands/resources.js +50 -7
- package/dist/commands/resources.js.map +1 -1
- package/dist/commands/status.d.ts +12 -0
- package/dist/commands/status.js +71 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/storage/detach.js +1 -1
- package/dist/commands/storage/detach.js.map +1 -1
- package/dist/commands/storage/list.js +6 -2
- package/dist/commands/storage/list.js.map +1 -1
- package/dist/commands/storage/order.d.ts +2 -0
- package/dist/commands/storage/order.js +100 -18
- package/dist/commands/storage/order.js.map +1 -1
- package/dist/commands/storage/resize.js +19 -6
- package/dist/commands/storage/resize.js.map +1 -1
- package/dist/commands/tickets/create.d.ts +2 -0
- package/dist/commands/tickets/create.js +40 -1
- package/dist/commands/tickets/create.js.map +1 -1
- package/dist/commands/tickets/download.d.ts +18 -0
- package/dist/commands/tickets/download.js +138 -0
- package/dist/commands/tickets/download.js.map +1 -0
- package/dist/commands/tickets/list.js +13 -7
- package/dist/commands/tickets/list.js.map +1 -1
- package/dist/commands/tickets/reply.d.ts +2 -0
- package/dist/commands/tickets/reply.js +33 -4
- package/dist/commands/tickets/reply.js.map +1 -1
- package/dist/commands/vds/order.js +72 -7
- package/dist/commands/vds/order.js.map +1 -1
- package/dist/commands/vps/console.js +14 -6
- package/dist/commands/vps/console.js.map +1 -1
- package/dist/commands/vps/details.js +7 -1
- package/dist/commands/vps/details.js.map +1 -1
- package/dist/commands/vps/ip/add.js +76 -9
- package/dist/commands/vps/ip/add.js.map +1 -1
- package/dist/commands/vps/list.js +13 -4
- package/dist/commands/vps/list.js.map +1 -1
- package/dist/commands/vps/order.d.ts +19 -0
- package/dist/commands/vps/order.js +179 -23
- package/dist/commands/vps/order.js.map +1 -1
- package/dist/commands/vps/power.js +2 -2
- package/dist/commands/vps/power.js.map +1 -1
- package/dist/commands/vps/reinstall.js +2 -2
- package/dist/commands/vps/reinstall.js.map +1 -1
- package/dist/commands/vps/resize.js +36 -13
- package/dist/commands/vps/resize.js.map +1 -1
- package/dist/commands/whoami.d.ts +5 -0
- package/dist/commands/whoami.js +8 -3
- package/dist/commands/whoami.js.map +1 -1
- package/dist/config/paths.d.ts +1 -1
- package/dist/config/paths.js +6 -1
- package/dist/config/paths.js.map +1 -1
- package/dist/config/store.d.ts +58 -0
- package/dist/config/store.js +84 -2
- package/dist/config/store.js.map +1 -1
- package/dist/functions-support/credits.d.ts +64 -0
- package/dist/functions-support/credits.js +181 -0
- package/dist/functions-support/credits.js.map +1 -0
- package/dist/functions-support/cron.d.ts +17 -0
- package/dist/functions-support/cron.js +99 -0
- package/dist/functions-support/cron.js.map +1 -0
- package/dist/functions-support/env.d.ts +23 -0
- package/dist/functions-support/env.js +44 -0
- package/dist/functions-support/env.js.map +1 -0
- package/dist/functions-support/link.d.ts +25 -0
- package/dist/functions-support/link.js +51 -0
- package/dist/functions-support/link.js.map +1 -0
- package/dist/functions-support/poll.d.ts +40 -0
- package/dist/functions-support/poll.js +109 -0
- package/dist/functions-support/poll.js.map +1 -0
- package/dist/functions-support/resolve.d.ts +3 -0
- package/dist/functions-support/resolve.js +31 -0
- package/dist/functions-support/resolve.js.map +1 -0
- package/dist/functions-support/runtime.d.ts +30 -0
- package/dist/functions-support/runtime.js +52 -0
- package/dist/functions-support/runtime.js.map +1 -0
- package/dist/functions-support/source.d.ts +92 -0
- package/dist/functions-support/source.js +343 -0
- package/dist/functions-support/source.js.map +1 -0
- package/dist/help/scope-aware-help.js +10 -1
- package/dist/help/scope-aware-help.js.map +1 -1
- package/dist/tui/App.js +10 -25
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/components/Menu.d.ts +3 -1
- package/dist/tui/components/Menu.js +7 -3
- package/dist/tui/components/Menu.js.map +1 -1
- package/dist/tui/router.d.ts +1 -1
- package/dist/tui/router.js.map +1 -1
- package/dist/tui/screens/Billing.js +56 -4
- package/dist/tui/screens/Billing.js.map +1 -1
- package/dist/tui/screens/Dashboard.js +8 -7
- package/dist/tui/screens/Dashboard.js.map +1 -1
- package/dist/tui/screens/Deploy.d.ts +2 -0
- package/dist/tui/screens/Deploy.js +912 -0
- package/dist/tui/screens/Deploy.js.map +1 -0
- package/dist/tui/screens/Order.js +359 -26
- package/dist/tui/screens/Order.js.map +1 -1
- package/dist/tui/screens/Resources.js +273 -31
- package/dist/tui/screens/Resources.js.map +1 -1
- package/dist/tui/screens/Tickets.js +18 -6
- package/dist/tui/screens/Tickets.js.map +1 -1
- package/dist/tui/screens/deployPreset.d.ts +20 -0
- package/dist/tui/screens/deployPreset.js +11 -0
- package/dist/tui/screens/deployPreset.js.map +1 -0
- package/dist/tui/screens/resources/AppDetail.d.ts +7 -0
- package/dist/tui/screens/resources/AppDetail.js +810 -0
- package/dist/tui/screens/resources/AppDetail.js.map +1 -0
- package/dist/tui/screens/resources/FunctionDetail.d.ts +7 -0
- package/dist/tui/screens/resources/FunctionDetail.js +751 -0
- package/dist/tui/screens/resources/FunctionDetail.js.map +1 -0
- package/dist/ui/attach.d.ts +15 -0
- package/dist/ui/attach.js +63 -0
- package/dist/ui/attach.js.map +1 -0
- package/dist/ui/baremetal-resolve.d.ts +10 -0
- package/dist/ui/baremetal-resolve.js +50 -0
- package/dist/ui/baremetal-resolve.js.map +1 -0
- package/dist/ui/confirm.js +1 -1
- package/dist/ui/confirm.js.map +1 -1
- package/dist/ui/cycle.d.ts +66 -0
- package/dist/ui/cycle.js +96 -0
- package/dist/ui/cycle.js.map +1 -0
- package/dist/ui/deploy-ui.d.ts +75 -0
- package/dist/ui/deploy-ui.js +243 -0
- package/dist/ui/deploy-ui.js.map +1 -0
- package/dist/ui/order-result.d.ts +4 -0
- package/dist/ui/order-result.js +32 -0
- package/dist/ui/order-result.js.map +1 -0
- package/dist/ui/payment-gate.d.ts +26 -0
- package/dist/ui/payment-gate.js +70 -0
- package/dist/ui/payment-gate.js.map +1 -0
- package/dist/ui/payment.js +10 -3
- package/dist/ui/payment.js.map +1 -1
- package/dist/ui/portal.d.ts +1 -1
- package/dist/ui/portal.js +7 -2
- package/dist/ui/portal.js.map +1 -1
- package/dist/ui/project-resolve.d.ts +25 -0
- package/dist/ui/project-resolve.js +31 -0
- package/dist/ui/project-resolve.js.map +1 -0
- package/dist/ui/render-mode.d.ts +5 -0
- package/dist/ui/render-mode.js +1 -1
- package/dist/ui/render-mode.js.map +1 -1
- package/dist/ui/resource-detail.js +0 -3
- package/dist/ui/resource-detail.js.map +1 -1
- package/dist/ui/resource-resolve.d.ts +9 -2
- package/dist/ui/resource-resolve.js +11 -4
- package/dist/ui/resource-resolve.js.map +1 -1
- package/dist/ui/spinner.d.ts +10 -1
- package/dist/ui/spinner.js +12 -3
- package/dist/ui/spinner.js.map +1 -1
- package/dist/ui/table.d.ts +7 -0
- package/dist/ui/table.js +11 -0
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/tax.d.ts +10 -0
- package/dist/ui/tax.js +31 -0
- package/dist/ui/tax.js.map +1 -0
- package/dist/ui/ticket-resolve.d.ts +9 -1
- package/dist/ui/ticket-resolve.js +13 -2
- package/dist/ui/ticket-resolve.js.map +1 -1
- package/dist/ui/volume-resolve.js +4 -1
- package/dist/ui/volume-resolve.js.map +1 -1
- package/dist/ui/wait.d.ts +4 -0
- package/dist/ui/wait.js +7 -2
- package/dist/ui/wait.js.map +1 -1
- package/dist/ui/wizard.d.ts +2 -1
- package/dist/ui/wizard.js +1 -1
- package/dist/ui/wizard.js.map +1 -1
- package/dist/version-check-bin.js +2 -2
- package/dist/version-check-bin.js.map +1 -1
- package/dist/version-check.d.ts +5 -0
- package/dist/version-check.js +6 -1
- package/dist/version-check.js.map +1 -1
- 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,CAAC;YACpB,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC;YACtB,WAAW,EAAE,oBAAoB,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG;SAC1D,CAAC;QACF,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC;YACzB,WAA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ACH,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.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.js","sourceRoot":"","sources":["../../../src/commands/function/show.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAgB,MAAM,oCAAoC,CAAC;AAElF;gFACgF;AAChF,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,WAAW;IACnD,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC;IAC5B,MAAM,CAAC,WAAW,GAAG,8DAA8D,CAAC;IACpF,MAAM,CAAC,QAAQ,GAAG;QAChB,yFAAyF;QACzF,uCAAuC;QACvC,+CAA+C;KAChD,CAAC;IACF,MAAM,CAAC,IAAI,GAAG;QACZ,IAAI,EAAE,IAA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CAAC,GAAG,WAAW,CAAC,EAAE,CAAC,YAAY,CAAC,GAC7B,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC,eAAe,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EACpE,EAAE;4BACJ,CAAC,CAAC,SAAS;qBACd;oBACD,CAAC,SAAS,EAAE,GAAG,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;iBAC/B,CAAC,CACH,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,9 @@
|
|
|
1
|
+
import { BaseCommand } from "../../base/command.js";
|
|
2
|
+
/** `synteq function unlink` — forget 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
|
+
}
|