inflight-cli 2.10.0 → 2.11.0

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.
@@ -5,7 +5,7 @@ export interface ShareOptions {
5
5
  project?: string;
6
6
  provider?: string;
7
7
  deployment?: string;
8
- override?: boolean;
8
+ versionMode?: "override" | "new";
9
9
  skipGitCheck?: boolean;
10
10
  }
11
11
  export declare function shareCommand(opts?: ShareOptions): Promise<void>;
@@ -37,7 +37,7 @@ function isValidHostedUrl(url) {
37
37
  }
38
38
  }
39
39
  /**
40
- * Builds a next_command string carrying forward relevant opts from the current run.
40
+ * Builds a next_command string carrying forward relevant opts from the current run. test
41
41
  */
42
42
  function buildNextCommand(base, opts) {
43
43
  const parts = [base];
@@ -49,8 +49,8 @@ function buildNextCommand(base, opts) {
49
49
  parts.push(`--deployment ${opts.deployment}`);
50
50
  if (opts.project)
51
51
  parts.push(`--project ${opts.project}`);
52
- if (opts.override)
53
- parts.push("--override");
52
+ if (opts.versionMode)
53
+ parts.push(`--version-mode ${opts.versionMode}`);
54
54
  return parts.join(" ");
55
55
  }
56
56
  /**
@@ -357,7 +357,9 @@ async function agentShareFlow(cwd, apiKey, workspaceId, opts) {
357
357
  id: proj.projectId,
358
358
  label: proj.latestVersion.title,
359
359
  hint: [
360
- proj.latestVersion.branch === currentBranch ? "current branch" : proj.latestVersion.branch,
360
+ proj.latestVersion.branch === currentBranch
361
+ ? "current branch"
362
+ : proj.latestVersion.branch,
361
363
  proj.latestVersion.branch === currentBranch ? "(recommended)" : undefined,
362
364
  ]
363
365
  .filter(Boolean)
@@ -369,7 +371,7 @@ async function agentShareFlow(cwd, apiKey, workspaceId, opts) {
369
371
  }
370
372
  }
371
373
  // ── Resolve override vs new version ──
372
- if (selectedProjectId && !opts.override) {
374
+ if (selectedProjectId && !opts.versionMode) {
373
375
  const { projects } = await apiGetRecentProjects(apiKey, workspaceId, 20).catch(() => ({
374
376
  projects: [],
375
377
  }));
@@ -390,11 +392,15 @@ async function agentShareFlow(cwd, apiKey, workspaceId, opts) {
390
392
  hint: "keep both in version history",
391
393
  },
392
394
  ],
393
- nextCommand: `inflight share --skip-git-check --deployment ${resolvedUrl} --project ${selectedProjectId} --override`,
395
+ instructions: {
396
+ override: `Re-run with: inflight share --skip-git-check --deployment ${resolvedUrl} --project ${selectedProjectId} --version-mode override`,
397
+ new_version: `Re-run with: inflight share --skip-git-check --deployment ${resolvedUrl} --project ${selectedProjectId} --version-mode new`,
398
+ },
399
+ nextCommand: `inflight share --skip-git-check --deployment ${resolvedUrl} --project ${selectedProjectId} --version-mode <override|new>`,
394
400
  });
395
401
  }
396
402
  }
397
- if (opts.override && selectedProjectId) {
403
+ if (opts.versionMode === "override" && selectedProjectId) {
398
404
  const { projects } = await apiGetRecentProjects(apiKey, workspaceId, 20).catch(() => ({
399
405
  projects: [],
400
406
  }));
package/dist/index.js CHANGED
@@ -34,7 +34,7 @@ program
34
34
  .option("--project <id>", "Project ID, or 'new' to create")
35
35
  .option("--provider <id>", "Deployment provider: vercel, netlify")
36
36
  .option("--deployment <url>", "Specific deployment URL")
37
- .option("--override", "Override latest version instead of creating new")
37
+ .option("--version-mode <mode>", "Version handling: 'override' or 'new'")
38
38
  .option("--skip-git-check", "Skip git state check (use after agent handled git)")
39
39
  .action((opts) => shareCommand(opts));
40
40
  program
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inflight-cli",
3
- "version": "2.10.0",
3
+ "version": "2.11.0",
4
4
  "description": "Get feedback directly on your staging URL",
5
5
  "bin": {
6
6
  "inflight": "dist/index.js",