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.
- package/dist/commands/share.d.ts +1 -1
- package/dist/commands/share.js +13 -7
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/commands/share.d.ts
CHANGED
package/dist/commands/share.js
CHANGED
|
@@ -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.
|
|
53
|
-
parts.push(
|
|
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
|
|
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.
|
|
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
|
-
|
|
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("--
|
|
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
|