@zerodeploy/cli 0.1.9 → 0.1.10

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 (2) hide show
  1. package/dist/cli.js +11 -7
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -5616,6 +5616,9 @@ var deployPromoteCommand = new Command2("promote").description("Promote a previe
5616
5616
  }
5617
5617
  });
5618
5618
 
5619
+ // src/lib/version.ts
5620
+ var VERSION = "0.1.10";
5621
+
5619
5622
  // src/commands/deploy/index.ts
5620
5623
  function slugify(input) {
5621
5624
  return input.toLowerCase().trim().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)+/g, "");
@@ -5909,6 +5912,7 @@ Error: Build failed`);
5909
5912
  }
5910
5913
  }
5911
5914
  console.log(`Deploying: ${deployDir}`);
5915
+ console.log(`CLI version: ${VERSION}`);
5912
5916
  const files = await scanDirectory(deployDir);
5913
5917
  if (files.length === 0) {
5914
5918
  console.log("Error: No files found to deploy");
@@ -5967,15 +5971,18 @@ Error: Build failed`);
5967
5971
  commitsToCheck.push(...parents);
5968
5972
  }
5969
5973
  } catch {}
5970
- if (commitsToCheck.length > 1) {
5971
- console.log(`Checking for existing deployment (commits: ${commitsToCheck.map((s) => s.slice(0, 7)).join(", ")})...`);
5972
- }
5974
+ console.log(`Checking for existing deployment...`);
5975
+ console.log(` Commits: ${commitsToCheck.map((s) => s.slice(0, 7)).join(", ")}`);
5976
+ console.log(` Full SHA lengths: ${commitsToCheck.map((s) => s.length).join(", ")}`);
5973
5977
  const findRes = await client.orgs[":orgSlug"].sites[":siteSlug"].deployments["by-commit"].$get({
5974
5978
  param: { orgSlug, siteSlug },
5975
5979
  query: { commits: commitsToCheck.join(",") }
5976
5980
  });
5977
5981
  if (findRes.ok) {
5978
5982
  const { data: existingDeployment } = await findRes.json();
5983
+ if (!existingDeployment) {
5984
+ console.log(` No matching deployment found`);
5985
+ }
5979
5986
  if (existingDeployment && existingDeployment.status === "ready") {
5980
5987
  const matchedSha = existingDeployment.commit_sha?.slice(0, 8) || "unknown";
5981
5988
  console.log(`Found existing deployment for commit ${matchedSha}`);
@@ -6911,9 +6918,6 @@ var accountCommand = new Command2("account").description("Manage your ZeroDeploy
6911
6918
  }
6912
6919
  }));
6913
6920
 
6914
- // src/lib/version.ts
6915
- var VERSION = "0.1.9";
6916
-
6917
6921
  // src/commands/inspect.ts
6918
6922
  function getCommandByPath(rootCommand, path3) {
6919
6923
  let current = rootCommand;
@@ -7041,7 +7045,7 @@ function createInspectCommand(rootProgram) {
7041
7045
  }
7042
7046
 
7043
7047
  // src/lib/version.ts
7044
- var VERSION2 = "0.1.9";
7048
+ var VERSION2 = "0.1.10";
7045
7049
 
7046
7050
  // src/lib/update-check.ts
7047
7051
  import { existsSync as existsSync3, mkdirSync, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerodeploy/cli",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "zerodeploy": "dist/cli.js"