@sylphx/cli 0.14.12 → 0.14.13

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @sylphx/cli
2
2
 
3
+ ## 0.14.13
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1798](https://github.com/SylphxAI/platform/pull/1798) [`9b52313`](https://github.com/SylphxAI/platform/commit/9b52313107975e133eb6cdf6028b349f228d075c) Thanks [@shtse8](https://github.com/shtse8)! - Treat `running` deployments as ready in `sylphx deployments wait`.
8
+
3
9
  ## 0.14.12
4
10
 
5
11
  ### Patch Changes
package/dist/main.js CHANGED
@@ -15,7 +15,7 @@ var init_package = __esm({
15
15
  "package.json"() {
16
16
  package_default = {
17
17
  name: "@sylphx/cli",
18
- version: "0.14.12",
18
+ version: "0.14.13",
19
19
  description: "Sylphx Platform CLI \u2014 deploy and manage your applications from the terminal. 63 commands across deployment, logs, env vars, domains, databases, storage, monitoring, self-service (user), admin (users/quotas/audit/invitations/jwt-keys/project-migrate), and more.",
20
20
  type: "module",
21
21
  homepage: "https://sylphx.com",
@@ -26806,7 +26806,8 @@ init_effect_io();
26806
26806
  import { Effect as Effect28, Schedule as Schedule2 } from "effect";
26807
26807
  var DEPLOYMENT_WAIT_POLL_INTERVAL_MS = 2e3;
26808
26808
  var DEPLOYMENT_WAIT_DEFAULT_TIMEOUT_MS = 10 * 60 * 1e3;
26809
- var DEPLOYMENT_TERMINAL_STATUSES = /* @__PURE__ */ new Set(["success", "failed", "cancelled", "canceled"]);
26809
+ var DEPLOYMENT_READY_STATUSES = /* @__PURE__ */ new Set(["success", "running"]);
26810
+ var DEPLOYMENT_TERMINAL_FAILURE_STATUSES = /* @__PURE__ */ new Set(["failed", "cancelled", "canceled"]);
26810
26811
  function parseDeploymentWaitTimeoutMs(raw, defaultMs = DEPLOYMENT_WAIT_DEFAULT_TIMEOUT_MS) {
26811
26812
  const match = raw.match(/^\s*(\d+)\s*(ms|s|m|h)?\s*$/i);
26812
26813
  if (!match) return defaultMs;
@@ -26829,7 +26830,8 @@ function waitForDeploymentSuccessEffect(api2, opts) {
26829
26830
  const tick = Effect28.gen(function* () {
26830
26831
  const detail = yield* opts.orgId ? api2.getDeployment(opts.id, { orgId: opts.orgId }) : api2.getDeployment(opts.id);
26831
26832
  const status3 = (detail.status ?? "").toLowerCase();
26832
- if (!DEPLOYMENT_TERMINAL_STATUSES.has(status3)) {
26833
+ if (DEPLOYMENT_READY_STATUSES.has(status3)) return detail;
26834
+ if (!DEPLOYMENT_TERMINAL_FAILURE_STATUSES.has(status3)) {
26833
26835
  return yield* Effect28.fail(
26834
26836
  new CliCommandError({
26835
26837
  command,
@@ -26838,7 +26840,6 @@ function waitForDeploymentSuccessEffect(api2, opts) {
26838
26840
  })
26839
26841
  );
26840
26842
  }
26841
- if (status3 === "success") return detail;
26842
26843
  return yield* Effect28.fail(
26843
26844
  new CliCommandError({
26844
26845
  command,
@@ -27494,8 +27495,8 @@ function readExt(d) {
27494
27495
  }
27495
27496
  function statusColour3(status3) {
27496
27497
  const s = (status3 || "").toLowerCase();
27497
- if (s === "success") return chalk_default.green(status3);
27498
- if (s === "running" || s === "building" || s === "queued") return chalk_default.yellow(status3);
27498
+ if (s === "success" || s === "running") return chalk_default.green(status3);
27499
+ if (s === "building" || s === "queued") return chalk_default.yellow(status3);
27499
27500
  if (s === "failed" || s === "cancelled" || s === "canceled") return chalk_default.red(status3);
27500
27501
  return chalk_default.white(status3);
27501
27502
  }
@@ -27690,7 +27691,7 @@ function deploymentsWaitEffect(opts) {
27690
27691
  yield* makeFormatter(output).print(
27691
27692
  result,
27692
27693
  (view) => Console18.log(
27693
- chalk_default.green(`\u2713 Deployment ${chalk_default.bold(view.id)} completed: ${view.status ?? "success"}`)
27694
+ chalk_default.green(`\u2713 Deployment ${chalk_default.bold(view.id)} ready: ${view.status ?? "success"}`)
27694
27695
  )
27695
27696
  );
27696
27697
  });
@@ -27807,7 +27808,7 @@ var waitCmd = Command18.make(
27807
27808
  timeoutMs: parseDeploymentWaitTimeoutMs(timeout),
27808
27809
  output
27809
27810
  })
27810
- ).pipe(Command18.withDescription("Wait for a deployment to reach a terminal state"));
27811
+ ).pipe(Command18.withDescription("Wait for a deployment to reach a ready state"));
27811
27812
  var deploymentsCommand = Command18.make(
27812
27813
  "deployments",
27813
27814
  {