@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,197 @@
|
|
|
1
|
+
import { type ClientRequest, type IncomingMessage } from "node:http";
|
|
2
|
+
import type { ApiClient } from "../api/client.js";
|
|
3
|
+
import type { Build } from "../api/types.js";
|
|
4
|
+
/** Terminal build statuses — polling stops here. Mirrors the backend
|
|
5
|
+
* BuildStatus enum (pending | building | pushing | succeeded | failed). */
|
|
6
|
+
export declare const BUILD_TERMINAL: ReadonlySet<string>;
|
|
7
|
+
/** Terminal release outcomes a deploy can end in. */
|
|
8
|
+
export declare const RELEASE_TERMINAL: ReadonlySet<string>;
|
|
9
|
+
export type Frontend = "dockerfile" | "railpack";
|
|
10
|
+
/** An explicit choice wins; otherwise a Dockerfile in the source root means
|
|
11
|
+
* `dockerfile`, and its absence means `railpack` (zero-config). Without
|
|
12
|
+
* this a Dockerfile-less repo would fail with "open Dockerfile: no such
|
|
13
|
+
* file". */
|
|
14
|
+
export declare function pickFrontend(dir: string, explicit?: string | null): Frontend;
|
|
15
|
+
/**
|
|
16
|
+
* Tarball a directory to a temp .tgz using the system `tar`. Excludes
|
|
17
|
+
* dependency caches and VCS metadata ONLY — they are never build inputs and
|
|
18
|
+
* dominate the archive. Build OUTPUT directories (`dist`, `.next`) are
|
|
19
|
+
* deliberately kept: a Go app embedding its prebuilt frontend needs them,
|
|
20
|
+
* and anchoring an exclude to the root is not portable across GNU tar and
|
|
21
|
+
* bsdtar. Resolves to the archive path.
|
|
22
|
+
*/
|
|
23
|
+
/** Never build inputs: dependency caches and VCS metadata. */
|
|
24
|
+
export declare const TARBALL_EXCLUDES: readonly [".git", "node_modules", ".venv", "__pycache__"];
|
|
25
|
+
/**
|
|
26
|
+
* Is `name` (one path segment) a dotenv file: `.env` or `.env.<anything>`
|
|
27
|
+
* (`.env.local`, `.env.production`), but not `.env.example`, `.env.sample`
|
|
28
|
+
* or `.env.template`?
|
|
29
|
+
*
|
|
30
|
+
* A dotenv file holds the secrets of the machine you deploy FROM. It is never
|
|
31
|
+
* packed, on any intake path: the image goes to a registry and a `COPY . .`
|
|
32
|
+
* would bake it into every layer, so the orchestrator drops it at extraction
|
|
33
|
+
* too (apps `build.IsDotenvName`, the same rule). Variables for the deployed
|
|
34
|
+
* app are set with `synteq app env set` / `synteq function env set` or the
|
|
35
|
+
* Environment tab and injected at run time. There is no opt-in: `tar` has no
|
|
36
|
+
* negation, and a `!.env` line in `.synteqignore` is not honoured.
|
|
37
|
+
*/
|
|
38
|
+
export declare function isDotenvName(name: string): boolean;
|
|
39
|
+
/** Does any segment of a slash-separated relative path name a dotenv file? */
|
|
40
|
+
export declare function hasDotenvSegment(relPath: string): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The dotenv files `makeTarball` leaves out of `dir`, as root-relative
|
|
43
|
+
* paths: what git lists for a checkout, else a walk of the tree (skipping
|
|
44
|
+
* `TARBALL_EXCLUDES` and never following symlinks). Printed by the deploy so
|
|
45
|
+
* nobody wonders where their `.env` went.
|
|
46
|
+
*/
|
|
47
|
+
export declare function dotenvFiles(dir: string): string[];
|
|
48
|
+
/**
|
|
49
|
+
* The names at the root of what `makeTarball` would ship that are actual
|
|
50
|
+
* source: anything that is not an excluded cache, not build output, and not
|
|
51
|
+
* OS/editor noise. Empty means there is nothing for a builder to work from.
|
|
52
|
+
*/
|
|
53
|
+
export declare function sourceRootEntries(dir: string): string[];
|
|
54
|
+
/**
|
|
55
|
+
* The file list `makeTarball` ships when `dir` is a git checkout: what git
|
|
56
|
+
* itself considers tracked or untracked-but-not-ignored, so `.gitignore` is
|
|
57
|
+
* honoured exactly and build output such as `.next`, `.open-next` or
|
|
58
|
+
* `.wrangler` never ships (the 471 MB marketing-site pack, 2026-09-27). Null
|
|
59
|
+
* when `dir` is not a git checkout or git is unavailable; the caller then
|
|
60
|
+
* falls back to the static excludes plus `.synteqignore`. Paths are relative
|
|
61
|
+
* to `dir`. Dotenv files (`isDotenvName`) are left out even when git tracks
|
|
62
|
+
* them.
|
|
63
|
+
*/
|
|
64
|
+
export declare function gitSourceList(dir: string): string[] | null;
|
|
65
|
+
/** Extra `--exclude` patterns from a `.synteqignore` in `dir` (one per line,
|
|
66
|
+
* `#` comments) for folders that are not git checkouts. */
|
|
67
|
+
export declare function synteqIgnorePatterns(dir: string): string[];
|
|
68
|
+
/**
|
|
69
|
+
* Download a source tarball to a temp file — `synteq deploy --source-url`.
|
|
70
|
+
* The CLI fetches it and uploads it the way a packed directory goes up: the
|
|
71
|
+
* platform never dials a customer-supplied URL. Returns the file's path; the
|
|
72
|
+
* caller removes its directory, as with makeTarball.
|
|
73
|
+
*
|
|
74
|
+
* Errors name the host only: a pre-signed URL is a credential.
|
|
75
|
+
*/
|
|
76
|
+
export declare function fetchSourceTarball(rawUrl: string, opts?: {
|
|
77
|
+
maxBytes?: number;
|
|
78
|
+
fetchFn?: typeof fetch;
|
|
79
|
+
}): Promise<string>;
|
|
80
|
+
export declare function makeTarball(dir: string): Promise<string>;
|
|
81
|
+
export declare function humanSize(path: string): string;
|
|
82
|
+
export declare function sleep(ms: number): Promise<void>;
|
|
83
|
+
/** Packed-source cap the CLI falls back to the raw-body upload under, when
|
|
84
|
+
* the cluster doesn't support direct upload at all (D6 in the design doc). */
|
|
85
|
+
export declare const RAW_FALLBACK_MAX_BYTES = 95000000;
|
|
86
|
+
/** Thrown by `putFile` for a non-2xx response from the upload host, so
|
|
87
|
+
* `uploadSource` can tell a signature/size mismatch (403 — do not retry)
|
|
88
|
+
* apart from a transient 5xx (retry with a fresh URL) without parsing
|
|
89
|
+
* strings. */
|
|
90
|
+
export declare class UploadPutError extends Error {
|
|
91
|
+
status: number;
|
|
92
|
+
constructor(status: number, message: string);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* SHA-256 of a file, streamed — never loads the file into memory. The
|
|
96
|
+
* archive can be ~1 GB; `crypto.createHash` over `fs.createReadStream` is
|
|
97
|
+
* the only way to hash that without a huge Buffer.
|
|
98
|
+
*/
|
|
99
|
+
export declare function sha256File(path: string): Promise<string>;
|
|
100
|
+
/** Signature of `node:http`/`node:https`'s `request()` — narrowed to what
|
|
101
|
+
* `putFile` needs. Overridable via `opts.requestFn` so a test can assert on
|
|
102
|
+
* the options passed (e.g. `rejectUnauthorized`) without a real TLS server. */
|
|
103
|
+
export type PutRequestFn = (url: URL, options: Record<string, unknown>, callback: (res: IncomingMessage) => void) => ClientRequest;
|
|
104
|
+
/**
|
|
105
|
+
* PUT a file's exact bytes to a presigned URL, streamed (never buffers the
|
|
106
|
+
* whole file). Uses `node:http`/`node:https` directly rather than `fetch`
|
|
107
|
+
* with a stream body: a streamed fetch body can fall back to chunked
|
|
108
|
+
* transfer-encoding instead of sending an explicit `Content-Length`, and the
|
|
109
|
+
* signed URL's signature covers `Content-Length` — a request that arrives
|
|
110
|
+
* chunked (or with any other length) is refused with 403. `http.request`
|
|
111
|
+
* with the header set explicitly always sends exactly that Content-Length
|
|
112
|
+
* and never adds Transfer-Encoding (verified against a local test server —
|
|
113
|
+
* see test/apps-support/upload.test.ts).
|
|
114
|
+
*
|
|
115
|
+
* Sends no `Authorization` header — the URL itself is the credential, and
|
|
116
|
+
* the caller's bearer token/API key must never reach the object-store host.
|
|
117
|
+
* Resolves on 2xx; rejects with `UploadPutError` (carrying the status) on
|
|
118
|
+
* any other response, or with the underlying error for a network failure.
|
|
119
|
+
*
|
|
120
|
+
* Settles EXACTLY ONCE no matter how the connection ends: a clean 2xx/non-2xx
|
|
121
|
+
* response, a request-level error, a response-level error/abort, the
|
|
122
|
+
* underlying connection closing before a response ever completed (I-2 — a
|
|
123
|
+
* server that sends headers and part of a body, then drops the socket, used
|
|
124
|
+
* to leave this promise unsettled forever), or a 300s stall with no response
|
|
125
|
+
* (`req.setTimeout`, matching the platform's own idle timeout). The file read
|
|
126
|
+
* stream is destroyed whenever the request settles, whichever way.
|
|
127
|
+
*/
|
|
128
|
+
export declare function putFile(url: string, path: string, size: number, headers: Record<string, string>, onProgress?: (sentBytes: number, totalBytes: number) => void, opts?: {
|
|
129
|
+
insecure?: boolean;
|
|
130
|
+
requestFn?: PutRequestFn;
|
|
131
|
+
}): Promise<void>;
|
|
132
|
+
export interface UploadSourceOpts {
|
|
133
|
+
/** Integer percent complete (0-100), called only when the value CHANGES
|
|
134
|
+
* (m-1) — a raw byte-progress callback fires once per 64 KiB chunk, which
|
|
135
|
+
* floods a TUI's React state / a spinner's message with ~16k updates for
|
|
136
|
+
* a 1 GB upload. */
|
|
137
|
+
onProgress?: (percent: number) => void;
|
|
138
|
+
/** Test-only: replaces the real timer-based wait between retries so a test
|
|
139
|
+
* exercising multiple attempts doesn't spend real wall-clock seconds.
|
|
140
|
+
* Defaults to the real `sleep`. */
|
|
141
|
+
sleepFn?: (ms: number) => Promise<void>;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Upload a packed source archive and trigger the build — the one path both
|
|
145
|
+
* `synteq deploy --dir` and the TUI's Deploy walkthrough call.
|
|
146
|
+
*
|
|
147
|
+
* Tries direct upload first: mint a presigned PUT (fresh on every attempt —
|
|
148
|
+
* a used or expired URL must not be reused; a retry's mint names the
|
|
149
|
+
* previous attempt's object key as `replaces`), stream the file to it, then
|
|
150
|
+
* tell the API which object to build. Up to 3 attempts total; a network
|
|
151
|
+
* error or a 5xx from the upload host retries (1s, then 3s backoff) with a
|
|
152
|
+
* brand-new URL; a 403 (signature/size mismatch) is reported immediately,
|
|
153
|
+
* never retried, since retrying with the same bytes would fail identically.
|
|
154
|
+
*
|
|
155
|
+
* Falls back to the existing raw-body upload (`apps.deploySource`, which
|
|
156
|
+
* buffers the whole tarball) when the API's upload-url endpoint answers
|
|
157
|
+
* 501/404/405 — an older server, or a cluster that doesn't support direct
|
|
158
|
+
* upload at all — and the pack is small enough for the proxy's 100 MB body
|
|
159
|
+
* limit (95 MB budget, D6). Otherwise fails with exit 1 (thrown Error) and
|
|
160
|
+
* says so.
|
|
161
|
+
*/
|
|
162
|
+
export declare function uploadSource(api: ApiClient, appId: string, archivePath: string, opts?: UploadSourceOpts): Promise<Build>;
|
|
163
|
+
/**
|
|
164
|
+
* Poll GET /apps/{id}/builds until the build reaches a terminal status or
|
|
165
|
+
* the timeout elapses. `onStatus` fires on every observed transition — of
|
|
166
|
+
* the status, or of the queue position / build VM while the status holds
|
|
167
|
+
* (bpool1) — so a caller can drive a spinner or a checklist. Returns the
|
|
168
|
+
* final build row — the caller decides what "timed out while building"
|
|
169
|
+
* means.
|
|
170
|
+
*/
|
|
171
|
+
export declare function pollBuild(api: ApiClient, appId: string, initial: Build, opts: {
|
|
172
|
+
intervalMs: number;
|
|
173
|
+
timeoutMs: number;
|
|
174
|
+
onStatus?: (status: string, build: Build) => void;
|
|
175
|
+
}): Promise<Build>;
|
|
176
|
+
/**
|
|
177
|
+
* The detail line behind a build's status while it waits or runs (bpool1):
|
|
178
|
+
* "Queued — position 2 of 5" from the orchestrator's build queue. Null when
|
|
179
|
+
* there is nothing to add (which build VM runs it stays internal).
|
|
180
|
+
*/
|
|
181
|
+
export declare function buildDetail(b: Build): string | null;
|
|
182
|
+
/**
|
|
183
|
+
* After a successful build, the release it produced — matched by image
|
|
184
|
+
* digest, polled briefly because the status cron mints it a beat after the
|
|
185
|
+
* build flips to succeeded. Null when it has not appeared in time.
|
|
186
|
+
*/
|
|
187
|
+
export declare function resolveNewRelease(api: ApiClient, appId: string, build: Build): Promise<{
|
|
188
|
+
number: number;
|
|
189
|
+
id: string;
|
|
190
|
+
} | null>;
|
|
191
|
+
/**
|
|
192
|
+
* Wait for a release to reach a terminal outcome — live, start_failed,
|
|
193
|
+
* health_failed, superseded — or return null when the window runs out (still
|
|
194
|
+
* rolling). This is what stops a caller from declaring "Deployed" on a build
|
|
195
|
+
* whose release then fails its rollout.
|
|
196
|
+
*/
|
|
197
|
+
export declare function waitForReleaseOutcome(api: ApiClient, appId: string, releaseNumber: number, timeoutSeconds: number, onTick?: (status: string | null) => void): Promise<string | null>;
|