replicas-cli 0.2.63 → 0.2.64
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/index.mjs +8 -8
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1390,7 +1390,7 @@ async function replicaListCommand(options) {
|
|
|
1390
1390
|
return;
|
|
1391
1391
|
}
|
|
1392
1392
|
console.log(chalk14.green(`
|
|
1393
|
-
Replicas (Page ${response.page} of ${response.
|
|
1393
|
+
Replicas (Page ${response.page} of ${response.total_pages}, Total: ${response.total}):
|
|
1394
1394
|
`));
|
|
1395
1395
|
for (const replica of response.replicas) {
|
|
1396
1396
|
console.log(chalk14.white(` ${replica.name}`));
|
|
@@ -1470,7 +1470,7 @@ async function replicaCreateCommand(name, options) {
|
|
|
1470
1470
|
}
|
|
1471
1471
|
let replicaName = name;
|
|
1472
1472
|
let message = options.message;
|
|
1473
|
-
let
|
|
1473
|
+
let selectedRepositoryIds = options.repositories?.split(",").map((repository) => repository.trim()).filter((repository) => repository.length > 0);
|
|
1474
1474
|
let codingAgent = options.agent;
|
|
1475
1475
|
if (replicaName && /\s/.test(replicaName)) {
|
|
1476
1476
|
console.log(chalk14.red("Replica name cannot contain spaces."));
|
|
@@ -1493,14 +1493,14 @@ async function replicaCreateCommand(name, options) {
|
|
|
1493
1493
|
}
|
|
1494
1494
|
replicaName = response2.name;
|
|
1495
1495
|
}
|
|
1496
|
-
if (!
|
|
1496
|
+
if (!selectedRepositoryIds || selectedRepositoryIds.length === 0) {
|
|
1497
1497
|
const response2 = await prompts3({
|
|
1498
1498
|
type: "multiselect",
|
|
1499
1499
|
name: "repositories",
|
|
1500
1500
|
message: "Select repositories:",
|
|
1501
1501
|
choices: repositories.map((repo) => ({
|
|
1502
1502
|
title: repo.name,
|
|
1503
|
-
value: repo.
|
|
1503
|
+
value: repo.id,
|
|
1504
1504
|
description: repo.url
|
|
1505
1505
|
})),
|
|
1506
1506
|
min: 1
|
|
@@ -1509,7 +1509,7 @@ async function replicaCreateCommand(name, options) {
|
|
|
1509
1509
|
console.log(chalk14.yellow("\nCancelled."));
|
|
1510
1510
|
return;
|
|
1511
1511
|
}
|
|
1512
|
-
|
|
1512
|
+
selectedRepositoryIds = response2.repositories;
|
|
1513
1513
|
}
|
|
1514
1514
|
if (!message) {
|
|
1515
1515
|
const response2 = await prompts3({
|
|
@@ -1548,7 +1548,7 @@ async function replicaCreateCommand(name, options) {
|
|
|
1548
1548
|
const body = {
|
|
1549
1549
|
name: replicaName,
|
|
1550
1550
|
message,
|
|
1551
|
-
|
|
1551
|
+
repository_ids: selectedRepositoryIds,
|
|
1552
1552
|
coding_agent: codingAgent
|
|
1553
1553
|
};
|
|
1554
1554
|
console.log(chalk14.gray("\nCreating replica..."));
|
|
@@ -1676,7 +1676,7 @@ Conversation History
|
|
|
1676
1676
|
}
|
|
1677
1677
|
console.log(chalk14.gray(` Total Events: ${response.total}`));
|
|
1678
1678
|
console.log(chalk14.gray(` Showing: ${response.events.length} events`));
|
|
1679
|
-
if (response.
|
|
1679
|
+
if (response.has_more) {
|
|
1680
1680
|
console.log(chalk14.gray(` Has More: yes (use --offset to paginate)`));
|
|
1681
1681
|
}
|
|
1682
1682
|
console.log();
|
|
@@ -2514,7 +2514,7 @@ async function interactiveCommand() {
|
|
|
2514
2514
|
}
|
|
2515
2515
|
|
|
2516
2516
|
// src/index.ts
|
|
2517
|
-
var CLI_VERSION = "0.2.
|
|
2517
|
+
var CLI_VERSION = "0.2.64";
|
|
2518
2518
|
var program = new Command();
|
|
2519
2519
|
program.name("replicas").description("CLI for managing Replicas workspaces").version(CLI_VERSION);
|
|
2520
2520
|
program.command("login").description("Authenticate with your Replicas account").action(async () => {
|