@eve-horizon/cli 0.2.18 → 0.2.19

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/README.md CHANGED
@@ -111,6 +111,7 @@ eve org update org_xxx --name "New Name"
111
111
  ### Projects
112
112
 
113
113
  ```bash
114
+ eve project ensure --name my-project --slug MyProj
114
115
  eve project ensure --name my-project --slug MyProj --repo-url https://github.com/org/repo
115
116
  eve project list
116
117
  eve project get proj_xxx
package/dist/index.js CHANGED
@@ -48850,16 +48850,17 @@ var HELP = {
48850
48850
  },
48851
48851
  ensure: {
48852
48852
  description: "Create project if it doesn't exist, or return existing",
48853
- usage: "eve project ensure --name <name> --repo-url <url> [--org <org_id>] [--branch <branch>] [--slug <slug>]",
48853
+ usage: "eve project ensure --name <name> [--repo-url <url>] [--org <org_id>] [--branch <branch>] [--slug <slug>]",
48854
48854
  options: [
48855
48855
  "--name <name> Project name (required)",
48856
- "--repo-url <url> Git repository URL (required)",
48856
+ "--repo-url <url> Git repository URL (optional, can be set later)",
48857
48857
  "--org <id> Organization ID",
48858
48858
  "--branch <branch> Default branch (default: main)",
48859
48859
  "--slug <slug> Short memorable slug (4-8 chars, e.g., MyProj)",
48860
48860
  "--force Re-clone repo even if project exists"
48861
48861
  ],
48862
48862
  examples: [
48863
+ "eve project ensure --name my-app --slug MyApp",
48863
48864
  "eve project ensure --name my-app --slug MyApp --repo-url https://github.com/org/repo",
48864
48865
  "eve project ensure --name my-app --repo-url file:///path/to/repo --force # dev/test only"
48865
48866
  ]
@@ -50901,7 +50902,7 @@ function showMainHelp() {
50901
50902
  console.log("");
50902
50903
  console.log("Examples:");
50903
50904
  console.log(' eve org ensure "My Company"');
50904
- console.log(" eve project ensure --name my-app --slug MyApp --repo-url https://github.com/org/repo");
50905
+ console.log(" eve project ensure --name my-app --slug MyApp");
50905
50906
  console.log(' eve job create --description "Fix the bug in auth.ts"');
50906
50907
  console.log(" eve job list --phase ready");
50907
50908
  console.log(" eve job show MyProj-abc123");
@@ -51300,18 +51301,19 @@ async function handleProject(subcommand, positionals, flags, context2) {
51300
51301
  switch (subcommand) {
51301
51302
  case "ensure": {
51302
51303
  const name = typeof flags.name === "string" ? flags.name : "";
51303
- const repoUrl = typeof flags["repo-url"] === "string" ? flags["repo-url"] : "";
51304
+ const repoUrl = typeof flags["repo-url"] === "string" ? flags["repo-url"] : void 0;
51304
51305
  const branch = typeof flags.branch === "string" ? flags.branch : "main";
51305
51306
  const slug = typeof flags.slug === "string" ? flags.slug : void 0;
51306
51307
  const orgIdRaw = typeof flags.org === "string" ? flags.org : context2.orgId;
51307
51308
  const force = toBoolean(flags.force) ?? false;
51308
- if (!name || !repoUrl) {
51309
- throw new Error("Usage: eve project ensure --name <name> --repo-url <url> [--branch <branch>] [--slug <slug>]");
51309
+ if (!name) {
51310
+ throw new Error("Usage: eve project ensure --name <name> [--repo-url <url>] [--branch <branch>] [--slug <slug>]");
51310
51311
  }
51311
51312
  if (!orgIdRaw) {
51312
51313
  throw new Error("Missing org id. Provide --org or set a profile default.");
51313
51314
  }
51314
- const body = { org_id: orgIdRaw, name, repo_url: repoUrl, branch, force };
51315
+ const body = { org_id: orgIdRaw, name, branch, force };
51316
+ if (repoUrl) body.repo_url = repoUrl;
51315
51317
  if (slug) body.slug = slug;
51316
51318
  const project = await requestJson(context2, "/projects/ensure", {
51317
51319
  method: "POST",
@@ -56190,6 +56192,7 @@ var RepoUrlSchema = external_exports.string().refine((value) => {
56190
56192
  return false;
56191
56193
  }
56192
56194
  }, "repo_url must be an http(s), file://, or SSH git URL");
56195
+ var RepoUrlOrUnsetSchema = external_exports.union([RepoUrlSchema, external_exports.literal("")]);
56193
56196
  var SlugSchema = external_exports.string().regex(/^[A-Za-z][A-Za-z0-9]{3,7}$/, "slug must be 4-8 alphanumeric characters starting with a letter");
56194
56197
  var CreateProjectRequestSchema = external_exports.object({
56195
56198
  org_id: external_exports.string().regex(/^org_[a-zA-Z0-9]+$/, "Invalid org_id format"),
@@ -56200,6 +56203,7 @@ var CreateProjectRequestSchema = external_exports.object({
56200
56203
  branch: external_exports.string().min(1).default("main")
56201
56204
  });
56202
56205
  var EnsureProjectRequestSchema = CreateProjectRequestSchema.extend({
56206
+ repo_url: RepoUrlSchema.optional(),
56203
56207
  force: external_exports.boolean().optional()
56204
56208
  });
56205
56209
  var UpdateProjectRequestSchema = external_exports.object({
@@ -56213,7 +56217,7 @@ var ProjectResponseSchema = external_exports.object({
56213
56217
  org_id: external_exports.string(),
56214
56218
  name: external_exports.string(),
56215
56219
  slug: external_exports.string(),
56216
- repo_url: RepoUrlSchema,
56220
+ repo_url: RepoUrlOrUnsetSchema,
56217
56221
  branch: external_exports.string(),
56218
56222
  deleted: external_exports.boolean(),
56219
56223
  created_at: external_exports.string(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eve-horizon/cli",
3
- "version": "0.2.18",
3
+ "version": "0.2.19",
4
4
  "description": "Eve Horizon CLI",
5
5
  "license": "MIT",
6
6
  "repository": {